Fractional to Decimal Form.
Posted
by ThePower
on Stack Overflow
See other posts from Stack Overflow
or by ThePower
Published on 2010-03-08T11:16:41Z
Indexed on
2010/03/08
11:21 UTC
Read the original article
Hit count: 426
Hi, there probably isn't an answer to this apart from "Create it yourself", but you never know, there might be some string representation for this.
Basically, I would like to display number values as fractional instead of decimal when displaying the values as a string.
Instead of a value displaying as:
1.1428571428571428571428571428571
I would prefer it to display as
8/7
Is there any way of doing this without writing the functionality myself?
Regards
Lloyd
© Stack Overflow or respective owner