Highlighted

Fractions

Avatar

Guest

30-06-2008

First, thanks to all who helped me with my last post. I was able to get it to work most of the time.



On to something completely different. Can Livecycle handle fractions? I need to show results in fractional format if possible.



Thanks in advance!

Replies

Highlighted

gkaiseril

30-06-2008

Yes, but you will have to create the text fromatted text strings. Now if you need to use the results displayed as a fraction, you will need to convert the formatted string into a decimal number or use a second hidden field for computation use.
Highlighted

Avatar

Guest

30-06-2008

All I really need to do is take the result of some calculations and display them as a fraction. So I guess that would be converting them from a decimal into a fraction.
Highlighted

Avatar

Guest

02-07-2008

Well I've searched the forums and haven't found anything on converting a computed result from a decimal into a fraction. Any thoughts?
Highlighted

gkaiseril

02-07-2008

Have you looked at Convert From a Decimal To a Fraction , http://www.webmath.com/dec2fract.html?



If you enter a decimal number and press the convert number it will show you the steps taken to compute the resulting fraction.



You need to determine the number of decimal places and the Greatest Common Divisor (GCD)or Greatest Common Factor (GCF).



Or use Gooogle to search for "decimal to fractions JavaScript", http://www.google.com/search?hl=en&q=decimal+to+fractions+JavaScript&start=0&sa=N ?