Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert decimal to fraction
Message
De
10/02/2003 17:42:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00751688
Message ID:
00751693
Vues:
25
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform