• 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: Fraction Maker Revisited Solved?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fraction Maker Revisited Solved?


  • Subject: Re: Fraction Maker Revisited Solved?
  • From: David Andrews <email@hidden>
  • Date: Sat, 6 Nov 2004 22:34:55 -0500

Jason,

Is this what you are trying to do:

set vNumberToFraction to 0.874
set vBottomNumber to 32

set parts to 1 / vBottomNumber
set num to round (vNumberToFraction / parts)
set denom to vBottomNumber
repeat while (num div 2) is (round (num / 2))
set num to num div 2
set denom to denom div 2
end repeat

set vFractionFound to "" & num & "/" & denom --> "7/8"

David A

On Nov 6, 2004, at 10:10 PM, Jason Bourque wrote:

Ok, one fix it now catches matches instead of going to the higher number.
I.e. .875 return 7/8 instead of 29/32
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Fraction Maker Revisited Solved? (From: Jason Bourque <email@hidden>)

  • Prev by Date: Re: Alias Forms as Property
  • Next by Date: Re: Alias Forms as Property
  • Previous by thread: Re: Fraction Maker Revisited Solved?
  • Next by thread: Re: Fraction Maker Revisited Solved?
  • Index(es):
    • Date
    • Thread