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

Re: Fraction Maker


  • Subject: Re: Fraction Maker
  • From: Martin Orpen <email@hidden>
  • Date: Wed, 20 Oct 2004 17:38:20 +0100

on 20/10/04 2:44 pm, Jason Bourque at email@hidden wrote:

> Does anyone have a Fraction Maker?
>
> I have the larger value 1 and a smaller decimal .66
>
> And I want to get 2/3. I now it will take some rounding.
>
> I appreciate the help.

Interesting problem.

Haven't thought about scripting that sort of thing, but I'd guess the
approach would be to multiply 0.66 by a series of numbers to see how close
you can get to a whole number:

0.66 * 2 = 1.32
0.66 * 3 = 1.98
0.66 * 4 = 2.64

3 is about as close as we'll get, so the fraction is 1.98 rounded to 2 over
3

Not quite sure what the most effective number range would be, as you can see
the same result would be generated using 30:

0.66 * 30 = 19.8

Which would round to 20/30 and could then be rounded down to 2/3

HTH

--
Martin Orpen
Idea Digital Imaging Ltd -- The Image Specialists
http://www.idea-digital.com


 _______________________________________________
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: 
 >Fraction Maker (From: Jason Bourque <email@hidden>)

  • Prev by Date: Re: Best tool for large (500MB) text manipulation
  • Next by Date: Script to Cycle Through Apps?
  • Previous by thread: Fraction Maker
  • Next by thread: Re: Fraction Maker
  • Index(es):
    • Date
    • Thread