Re: div bug
Re: div bug
- Subject: Re: div bug
- From: julifos <email@hidden>
- Date: Tue, 04 Aug 2009 22:02:46 +0200
- Thread-topic: div bug
> That binary representation of 1.015 is not exact and is likely to be a little
> (of order 10^-15) smaller than the decimal value.. Add multiply by 100
> (integers are exact until they exceed 10^15 or so) and add 1/2 (which is
> exact) to it and the result will be a tiny bit less than 102.000. Now do an
> integer division of a float by an integer and it will start with discarding
> the fractional part of the float. That is a little bit less than one but the
> whole non-integer part gets tossed. It's truncation, not rounding.
So, when I coerce to small real, AppleScript is rounding (from 8 to 4 bytes)
the number (instead of truncating) and that's because I get the desired
result?
Someone should write the rulez in the ASLG ;--)
jj
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden