From Fraction to Decimal and Back?
Posted
by CC
on Stack Overflow
See other posts from Stack Overflow
or by CC
Published on 2009-03-15T23:12:30Z
Indexed on
2010/05/07
11:48 UTC
Read the original article
Hit count: 196
Hi folks...
Is it possible to store a fraction like 3/6 in a variable of some sort? When I try this it only stores the numbers before the /. I know that I can use 2 variables and divide them, but the input is from a single text field. Is this at all possible?
I want to do this because I need to calculate the fractions to decimal odds.
A bonus question ;) - Is there an easy way to calculate a decimal value to a fraction? Thanks..
© Stack Overflow or respective owner