• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Where to report Script Editor bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Where to report Script Editor bug?
      • From: Richard Rönnbäck <email@hidden>
    • Re: Where to report Script Editor bug?
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: Where to report Script Editor bug? (From: Paul Berkowitz <email@hidden>)
 >Re: Where to report Script Editor bug? (From: Michelle Steiner <email@hidden>)
 >Re: Where to report Script Editor bug? (From: Mr Tea <email@hidden>)

  • Prev by Date: Are there any good QuickTime Player 6 Movie Exporting Examples?
  • Next by Date: Re: Mac Mail Questions
  • Previous by thread: Re: Where to report Script Editor bug?
  • Next by thread: Re: Where to report Script Editor bug?
  • Index(es):
    • Date
    • Thread