Re: Where to report Script Editor bug?
Re: Where to report Script Editor bug?
- Subject: Re: Where to report Script Editor bug?
- From: Richard Rönnbäck <email@hidden>
- Date: Sat, 21 Feb 2004 06:28:39 +0100
Chris,
As my original question implied, this behavior is not consistent, it only
appears when run from the Script Editor 2.0. If you try the following saved
as an app or run from the script menu it gives you a string
set myConvertedTemp to (32 as degrees Fahrenheit) as degrees Celsius
display dialog (myConvertedTemp as string)
So perhaps I should rephrase the question to "why do I get different
results?"
On 04-02-20 23.32, "Chris Espinosa" <email@hidden> wrote:
>
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.
--
Richard Rvnnbdck
08-444 06 08
070-774 06 08
_______________________________________________
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.