Re: magic integer converter number 62?
Re: magic integer converter number 62?
- Subject: Re: magic integer converter number 62?
- From: Nigel Garvey <email@hidden>
- Date: Fri, 23 Feb 2001 02:34:10 +0000
Chris Nebel wrote on Thu, 22 Feb 2001 14:49:18 -0800:
>
M Shaw wrote:
>
>
> Can anybody figure out why this works:
>
>
>
> set x to 62
>
> set b to ((x + (2.6 - (2.6 mod 1))) - x) as integer
>
>
>
> and this doesn't:
>
>
>
> set x to 61
>
> set b to ((x + (2.6 - (2.6 mod 1))) - x) as integer
>
>
OK, this has gone on quite long enough. The basic problem has to do
>
with the limitations of finite-precision numbers. What scripting
>
additions you have installed makes no difference, but the version of
>
AppleScript does, since we've tweaked the behavior several times.
>
(Obviously, it's still not quite right.)
It's probably rounding 'like taught in school'. ;-)
NG