Re: Possible bug.
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.