Re: ASTest redux
Re: ASTest redux
- Subject: Re: ASTest redux
- From: John W Baxter <email@hidden>
- Date: Fri, 27 Sep 2002 20:09:28 -0700
At 22:46 +0100 9/27/2002, has wrote:
>
Oh, and if anyone has any ideas what I might do to compensate for AS's
>
stupid treatment of reals, eg:
>
>
0.7 * 0.7 = 0.49
>
--> false
The way to avoid that particular aspect of the nature of binary floating
point is not to compare floating point values for equality. Decide how
much of a difference is appropriate to the task at hand to indicate "not
equal", and compare that for greater than the absolute value of the
difference of the two values.
--john
--
John Baxter, Port Ludlow, WA USA
The floating point is the natural enemy of the equals.
The bowling ball is the natural enemy of the egg.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.