This script courtesy of Rich Herz <[EMAIL PROTECTED]>
Aloha, Scott:
I call this a bug in the round function. I get the same results on a
Windows PC. I believe some would disagree. What do you think?
Whatever it is called, I find I have to compensate for it doing
dollar arithmetic where one penny off is unacceptable. Thus, my
request is either a bug fix, or a money-friendly rounding routine.
Have anything handy?
Thank you!
Regards,
Sadhu
| A test of round() on Mac G3 with MC 2.3.2
|
| on mouseUp
| repeat with i = 0 to 9
| put "38.1" & i & "5" into tNum
| put round(tNum, 2) into line i+1 of field 1
| end repeat
| end mouseUp
|
| Results displayed in field:
|
| 38.1 <- 38.105 should result in 38.11
| 38.12
| 38.13
| 38.14
| 38.15
| 38.16
| 38.17
| 38.17 <- 38.175 should result in 38.18
| 38.19
| 38.2
|
| Some other series show this behavior, though not always at the same
| positions in the series; some others do not (put "100.1" & i & "5" into
| tNum).
| -----------------------------
Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.