[plt-scheme] Numerical precision (sqrt 2)

From: rw (robert.winslow at gmail.com)
Date: Sat Jun 6 16:16:10 EDT 2009

I am seeking a (hopefully built-in) way to decide the precision of
irrational numbers. By default (PLT 4.1.5) gives:

(sqrt 2) -> 1.4142135623730951

I want to get an answer in (say) 50 or 100 digits precision. I am
considering building a generating function for each digit of the
irrational number, but I expect this to be computationally slow.
Ideally, it would operate like this:

(precision-take (sqrt 2) 50) -> 2^0.5 with 50 significant digits

Is functionality like this already out there?

Thanks!


Posted on the users mailing list.