On Mon, Mar 22, 2010 at 8:02 PM, Pierre B. <pierrebai at hotmail.com> wrote: > Sorry to intervene out of the blue, but I find the suggested rule for > fractional to decimal conversion not as clean as I'd expect. > > If fractions are converted to decimals when doing arithmetics, would it be > worthwhile to at least provide a minimum of fractional conversion integrity? > What I have in mind is the following rule: > > When doing conversion from fraction to decimal, always generate a whole number > of repeating digits, always at least twice. > > Examples, with a precision of 5 in Decimal: > > 1/2 -> 0.50000 > > 1/3 -> 0.33333 > > 1/11 -> 0.090909 > # Note that we produced 6 digits, because > # the repeating pattern contains 2 digits. > > 1/7 -> 0.142857142857 > # Always at least two full patterns. And for 1/123123127? The decimal expansion of this fraction has a period of over 15 million! Sorry, but this doesn't seem like a feasible or desirable strategy. Mark
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4