• 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: Possible bug.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible bug.


  • Subject: Re: Possible bug.
  • From: Doug McNutt <email@hidden>
  • Date: Mon, 3 May 2004 06:27:24 -0600

At 23:43 -0400 5/2/04, deivy petrescu wrote:
>You are right. It is a problem with periodic fractions.

With all the complaints I have about AppleScript I just don't understand this thread.

1/9 = 0.11111111111. . .(10)

Just what did you expect for an answer? More 1's? A text string like "1/9"? Maple and Mathematica can do that, but C can't and AppleScript shouldn't be expected to.

Actually there's some luck involved in getting 0.2 for 1/5 when the floating point representation of 2/10 is considered. It's not exact in that intermediate format.

And there is a difference between "periodic decimals" and "continued fractions". I'm fairly sure you mean the former but both 1/9 and 1/5 are periodic in base 2.

set x to ((1 / ( - 2 ^ 2 + 1))) -- for phun

--
--> There are 10 kinds of people: those who understand binary, and those who don't <--
_______________________________________________
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: Possible bug.
      • From: Axel Luttgens <email@hidden>
References: 
 >Re: Possible bug. (From: Paul Berkowitz <email@hidden>)
 >Re: Possible bug. (From: Deivy Petrescu <email@hidden>)
 >Re: Possible bug. (From: deivy petrescu <email@hidden>)

  • Prev by Date: Re: Possible bug.
  • Next by Date: Re: Possible bug.
  • Previous by thread: Re: Possible bug.
  • Next by thread: Re: Possible bug.
  • Index(es):
    • Date
    • Thread