Page 1 of 1

comparing fractions

Posted: Tue Aug 09, 2005 12:41 am
by jack
does anyone know of a good algorithm to compare fractions, eg 1/2 < 1/8 ?
you can convert the fractions to float and then compare but i would like to avoid that.

Re: comparing fractions

Posted: Tue Aug 09, 2005 1:56 am
by Dare2
jack wrote:does anyone know of a good algorithm to compare fractions, eg 1/2 < 1/8 ?
you can convert the fractions to float and then compare but i would like to avoid that.
Convert to common denominator. Quickest and easiest way is to just multiply by opposite denominators:

So 1/2 < 1/8 ~~ 8 < 2 (sixteenths)
Or 3/7 < 2/5 ~~ 15 < 14 (thirty-fifths)

Or did I misunderstand?

Posted: Tue Aug 09, 2005 2:49 am
by jack
thanks Dare2, I am embarassed :oops:

Posted: Tue Aug 09, 2005 5:23 am
by Dare2
jack wrote:thanks Dare2, I am embarassed :oops:
:)
I can relate. I hate it when I get so detailed that I miss the obvious. :?

I'm curious - how do you store the fractions, and what advantage in using them?



BTW, this sort of thing is not uncommon in my home ..
Conversation .. wrote:Youngest Daughter: Planet Earth to dad ... you're in the clouds again!
Me: Just trying to work out a solution to something.
YD: What is it?
Me: *Thinking this will go way over her head* Looking for a quick way to initiate hyperobsfucatedeventilation of the thingagummychacallit.
YD: Why can't you just press the start button?
Me: Weeeeell, the thought had crossed my mind ... *but only right at that moment*
YD: *Looks amused*
Me: *Defensive* .. however I am a bit concerned about the implications ...
YD: *chuckles*
Me: *More defensive* .. so I thought I might explore ..
YD: *laughing*
Me: *Defiantly* .. alternatives!
YD: *laughing out loud, great merriment*

Later:

YD: So did you come up with a solution?
Me: Yes.
YD: What?
Me: *reluctant* I pressed the start button.