Re: Where to report Script Editor bug?
Re: Where to report Script Editor bug?
- Subject: Re: Where to report Script Editor bug?
- From: Chris Espinosa <email@hidden>
- Date: Fri, 20 Feb 2004 14:32:37 -0800
On Feb 20, 2004, at 1:56 PM, Mr Tea wrote:
So why does only zero degrees present the exponential notation when
displayed as string?
BTW, degrees Fahrenheit does the same thing.
Hmm. Sounds like a bug. ;-)
No, it doesn't. Most likely is that the conversion doesn't result in
*exactly zero*, but in some very, very small number that is very close
to zero, because of the impossibility of representing certain ratios as
exact binary numbers. AppleScript's string coercions round to 13 or 14
places (less than the full range of floating point numbers) so it's not
showing up as 1e-15.
Some calculations will hit zero exactly, in whch case you get 0; others
come very very close, where you'll get 0e+0; others may be off enough
that you'll see an actual non-zero value.
Cf. the discussion on "equality comparison of real numbers considered
harmful."
Chris
_______________________________________________
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.