home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-04-07 | 1.5 KB | [TEXT/ToyS] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: Round Off Example
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Wed Apr 7 14:05:07 1993, modified Wed Apr 7 14:05:07 1993, creator 'ToyS', type ASCII, 630 bytes "Round Off Example" , at 0x2f6 722 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [ToyS] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 52 6f 75 6e 64 20 | 4f 66 66 20 45 78 61 6d |..Round |Off Exam|
|00000010| 70 6c 65 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ple.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 54 6f 79 | 53 01 00 00 00 00 00 00 |.TEXTToy|S.......|
|00000050| 00 00 00 00 00 02 76 00 | 00 02 d2 a7 e8 c8 53 a7 |......v.|......S.|
|00000060| e8 c8 53 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..S.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3e 44 00 00 |........|....>D..|
|00000080| 73 65 74 20 78 20 74 6f | 20 28 28 22 39 37 37 36 |set x to| (("9776|
|00000090| 2e 35 35 32 22 20 61 73 | 20 72 65 61 6c 29 20 61 |.552" as| real) a|
|000000a0| 73 20 73 74 72 69 6e 67 | 29 20 2d 2d 20 73 74 72 |s string|) -- str|
|000000b0| 69 6e 67 20 74 6f 20 72 | 65 61 6c 20 74 6f 20 73 |ing to r|eal to s|
|000000c0| 74 72 69 6e 67 0d 2d 2d | 20 74 68 65 20 70 72 65 |tring.--| the pre|
|000000d0| 76 69 6f 75 73 20 6c 69 | 6e 65 20 73 68 6f 77 73 |vious li|ne shows|
|000000e0| 20 68 6f 77 20 74 68 65 | 20 6e 75 6d 62 65 72 20 | how the| number |
|000000f0| 63 68 61 6e 67 65 73 20 | 61 73 20 69 74 20 69 73 |changes |as it is|
|00000100| 20 63 6f 65 72 63 65 64 | 20 74 6f 20 61 20 72 65 | coerced| to a re|
|00000110| 61 6c 0d 73 65 74 20 79 | 20 74 6f 20 22 39 37 37 |al.set y| to "977|
|00000120| 36 2e 35 35 32 22 20 20 | 2d 2d 20 74 68 69 73 20 |6.552" |-- this |
|00000130| 69 73 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |is the o|riginal |
|00000140| 73 74 72 69 6e 67 0d 39 | 37 37 36 2e 35 35 32 20 |string.9|776.552 |
|00000150| 2d 2d 20 77 61 74 63 68 | 20 74 68 69 73 20 77 68 |-- watch| this wh|
|00000160| 65 6e 20 79 6f 75 20 63 | 6f 6d 70 69 6c 65 20 69 |en you c|ompile i|
|00000170| 74 21 20 20 49 74 20 6e | 6f 20 6c 6f 6e 67 65 72 |t! It n|o longer|
|00000180| 20 69 73 20 39 37 37 36 | 2e 35 35 32 0d 2d 2d 20 | is 9776|.552.-- |
|00000190| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 69 |the foll|owing di|
|000001a0| 73 70 6c 61 79 73 20 76 | 61 6c 75 65 73 20 69 6e |splays v|alues in|
|000001b0| 20 74 68 65 20 72 65 73 | 75 6c 74 20 77 69 6e 64 | the res|ult wind|
|000001c0| 6f 77 0d 2d 2d 20 78 20 | 69 73 20 74 68 65 20 63 |ow.-- x |is the c|
|000001d0| 6f 6e 76 65 72 74 65 64 | 20 73 74 72 69 6e 67 2c |onverted| string,|
|000001e0| 20 79 20 69 73 20 74 68 | 65 20 6f 72 69 67 69 6e | y is th|e origin|
|000001f0| 61 6c 20 73 74 72 69 6e | 67 0d 2d 2d 20 78 20 3d |al strin|g.-- x =|
|00000200| 20 79 20 69 73 20 61 20 | 73 74 72 69 6e 67 20 63 | y is a |string c|
|00000210| 6f 6d 70 61 72 69 73 69 | 6f 6e 2c 20 77 68 69 6c |omparisi|on, whil|
|00000220| 65 20 74 68 65 20 6e 65 | 78 74 20 6f 6e 65 20 69 |e the ne|xt one i|
|00000230| 73 20 61 20 70 61 69 72 | 20 6f 66 20 72 65 61 6c |s a pair| of real|
|00000240| 73 0d 2d 2d 20 46 69 6e | 61 6c 6c 79 2c 20 61 6e |s.-- Fin|ally, an|
|00000250| 20 65 78 61 6d 70 6c 65 | 20 6f 66 20 68 6f 77 20 | example| of how |
|00000260| 74 77 6f 20 6e 75 6d 62 | 65 72 73 20 77 68 69 63 |two numb|ers whic|
|00000270| 68 20 64 6f 6e 27 74 20 | 73 75 66 66 65 72 20 66 |h don't |suffer f|
|00000280| 72 6f 6d 20 72 6f 75 6e | 64 20 6f 66 66 0d 2d 2d |rom roun|d off.--|
|00000290| 20 63 61 6e 20 65 71 75 | 61 6c 20 6f 6e 65 20 74 | can equ|al one t|
|000002a0| 68 61 74 20 64 6f 65 73 | 0d 7b 78 2c 20 79 2c 20 |hat does|.{x, y, |
|000002b0| 78 20 3d 20 79 2c 20 28 | 78 20 61 73 20 72 65 61 |x = y, (|x as rea|
|000002c0| 6c 29 20 3d 20 28 79 20 | 61 73 20 72 65 61 6c 29 |l) = (y |as real)|
|000002d0| 2c 20 37 36 2e 35 35 32 | 20 2b 20 39 37 30 30 20 |, 76.552| + 9700 |
|000002e0| 3d 20 39 37 37 36 2e 35 | 35 31 39 39 39 39 39 39 |= 9776.5|51999999|
|000002f0| 39 39 39 37 7d 0d 00 00 | 00 00 00 00 00 00 00 00 |9997}...|........|
|00000300| 00 00 01 00 00 00 02 78 | 00 00 01 78 00 00 00 5a |.......x|...x...Z|
|00000310| c5 10 b7 3a 09 ae 83 77 | 4a a8 43 9c 01 30 34 45 |...:...w|J.C..04E|
|00000320| 2e 31 0e 12 32 48 7e a4 | 1d 91 20 81 21 89 67 04 |.1..2H~.|.. .!.g.|
|00000330| 11 52 6f 75 6e 64 20 4f | 66 66 20 45 78 61 6d 70 |.Round O|ff Examp|
|00000340| 6c 65 02 00 00 00 54 45 | 58 54 54 6f 79 53 01 00 |le....TE|XTToyS..|
|00000350| 00 00 54 45 58 54 54 6f | 79 53 01 00 00 00 00 40 |..TEXTTo|yS.....@|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 a7 d4 d6 7c 00 00 | 02 76 00 00 02 d2 01 7e |.....|..|.v.....~|
|00000380| f2 6d 95 2b 14 5e 05 24 | 1e 07 49 8e 44 26 30 88 |.m.+.^.$|..I.D&0.|
|00000390| 49 0f 62 1f 87 b4 63 0b | f3 ac 43 d8 3e 1d 19 50 |I.b...c.|..C.>..P|
|000003a0| 41 46 b6 95 7d b2 d1 f4 | 6d b6 87 4d 44 a4 15 0d |AF..}...|m..MD...|
|000003b0| e3 88 a2 9c 02 d8 8e 5b | 9a 40 8f 92 a6 e5 4c 47 |.......[|.@....LG|
|000003c0| 2c 0c c4 4a 43 94 45 0e | 7f 0e 34 aa c2 fe 6e 94 |,..JC.E.|..4...n.|
|000003d0| bf a4 51 80 4a 28 ef 6f | a8 f4 2b 6e 59 20 88 f6 |..Q.J(.o|..+nY ..|
|000003e0| 2e ee 69 84 31 76 6c d6 | 46 b8 b9 48 38 3c a8 98 |..i.1vl.|F..H8<..|
|000003f0| 9a 6c e2 1f ed 85 37 98 | b0 e5 dc 01 2e 7f 2e 60 |.l....7.|.......`|
|00000400| 00 00 01 44 54 68 69 73 | 20 69 73 20 61 6e 20 65 |...DThis| is an e|
|00000410| 78 61 6d 70 6c 65 20 6f | 66 20 61 20 66 6f 72 6d |xample o|f a form|
|00000420| 20 6f 66 20 72 6f 75 6e | 64 6f 66 66 20 65 72 72 | of roun|doff err|
|00000430| 6f 72 20 77 68 69 63 68 | 20 6f 63 63 75 72 73 20 |or which| occurs |
|00000440| 64 75 72 69 6e 67 20 63 | 6f 6e 76 65 72 73 69 6f |during c|onversio|
|00000450| 6e 73 20 66 72 6f 6d 20 | 73 74 72 69 6e 67 73 20 |ns from |strings |
|00000460| 74 6f 20 72 65 61 6c 20 | 6e 75 6d 62 65 72 73 2e |to real |numbers.|
|00000470| 20 20 54 68 69 73 20 63 | 6f 6e 76 65 72 74 73 20 | This c|onverts |
|00000480| 61 20 72 65 61 6c 20 62 | 61 63 6b 20 74 6f 20 61 |a real b|ack to a|
|00000490| 20 73 74 72 69 6e 67 20 | 74 6f 20 69 6c 6c 75 73 | string |to illus|
|000004a0| 74 72 61 74 65 20 74 68 | 65 20 70 72 6f 62 6c 65 |trate th|e proble|
|000004b0| 6d 20 61 6e 64 20 64 6f | 65 73 20 63 6f 6d 70 61 |m and do|es compa|
|000004c0| 72 69 73 6f 6e 73 20 61 | 73 20 73 74 72 69 6e 67 |risons a|s string|
|000004d0| 73 20 61 6e 64 20 72 65 | 61 6c 73 2e 20 20 54 68 |s and re|als. Th|
|000004e0| 65 72 65 20 61 72 65 20 | 6d 61 6e 79 20 6f 74 68 |ere are |many oth|
|000004f0| 65 72 20 70 6c 61 63 65 | 73 20 77 68 65 72 65 20 |er place|s where |
|00000500| 74 68 69 73 20 63 61 6e | 20 61 66 66 65 63 74 20 |this can| affect |
|00000510| 73 63 72 69 70 74 73 20 | 73 6f 20 70 72 6f 67 72 |scripts |so progr|
|00000520| 61 6d 6d 65 72 73 20 73 | 68 6f 75 6c 64 20 62 65 |ammers s|hould be|
|00000530| 20 61 77 61 72 65 20 6f | 66 20 74 68 69 73 20 62 | aware o|f this b|
|00000540| 65 68 61 76 69 6f 72 2e | 00 00 00 16 00 01 00 00 |ehavior.|........|
|00000550| 00 00 00 0e 00 0a 00 10 | 00 00 00 0c 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 12 00 2b | 00 04 01 3a 02 15 00 2b |.......+|...:...+|
|00000570| 00 02 01 7e 02 5d 00 00 | 00 00 01 00 00 00 02 78 |...~.]..|.......x|
|00000580| 00 00 01 78 00 00 00 5a | 01 7d c8 d0 21 ca 00 00 |...x...Z|.}..!...|
|00000590| 00 1c 00 5a 00 02 54 45 | 58 54 00 00 00 1a 73 74 |...Z..TE|XT....st|
|000005a0| 79 6c 00 00 00 26 57 50 | 6f 73 00 00 00 32 04 68 |yl...&WP|os...2.h|
|000005b0| ff ff 00 00 00 00 01 7d | c9 7c 04 68 ff ff 00 00 |.......}|.|.h....|
|000005c0| 01 48 01 7d ca 20 00 80 | ff ff 00 00 01 62 01 7d |.H.}. ..|.....b.}|
|000005d0| c8 5c 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.\......|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+