rlwhitcomb / utilities

Some of my personal utility programs
MIT License
2 stars 0 forks source link

Calc should return the best fractional values of pi in rational mode #288

Closed rlwhitcomb closed 2 years ago

rlwhitcomb commented 2 years ago

But MathUtil always returns a decimal value even when this is calculated for under 25 digits from the fraction. I believe there are a number of fractional approximations good to an appropriate number of places, which would be good to return for small precisions instead of producing ridiculous values such as 39269908169872415480783 / 12500000000000000000000.

BTW we already do this with phi and ratphi.

rlwhitcomb commented 2 years ago

See http://oeis.org/A002485 and http://oeis.org/A002486 (numerators and denominators respectively).

rlwhitcomb commented 2 years ago

After the last commit, we need to: