Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert decimal to fraction
Message
From
10/02/2003 17:42:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00751688
Message ID:
00751693
Views:
33
>I need to convert a decimal to a fraction... anyone have/know of a function for this?
>
>
>.5 --> 1/2
>
>.1875 --> 3/16
>
>TIA

The problem here is approximate numbers. For instance, you have 0.14. What is your criterion to decide whether you want this as 7/50 (exact) or as 1/7 (almost)? And do you want 0.333333 as 333333/1000000, or as 1/3?

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform