Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert Fractions to Decimal
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00476506
Message ID:
00476753
Views:
30
>>Actually, the second half of the question is kind of intriguing.
>
>Definately. You'll notice I didn't even try to answer that part!

Me too!< g >

My initial reaction was along the lines of first finding out the number of digits to the right of the decimal point. That'll give us the denominator via 10 ^ n. Then it'd be a matter of finding the common factors. The problem would get easier if all the fractions had a value that could be reached via 2 ^ n in the denominator. From the look of John's problem, that may be the case, since it looks like some sort of measurement. I can't recall seeing a measurement that used a fraction that didn't.

Hey, John, are all the fraction a power of 2 in the denominator (1/2, 1/4, 1/8, etc.)?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform