More great Floating Point learning ..

Tony Hardie-Bick tony at entity.net
Sat Mar 10 14:14:02 CET 2012


On 10/03/12 12:12, Jay Vaughan wrote:
> Wow, a really, really good set of articles on the subject:
>
> http://altdevblogaday.com/2012/03/07/float-precisionfrom-zero-to-100-digits-2/
>
> Nice reading for this sunny Saturday afternoon here in Vienna ..

I know what you're all thinking... you're all thinking "Hey, I had no idea that 
floating point had so many idiosyncracies, inaccuracies and downright weirdness. 
What if I want to compute the number theoretic tensor structure of a wormhole 
linking the core of our galaxy to a neighbouring 5-brane universe (for example)?".

No problem. gp is a command-line calculator written by number theorists:

http://en.wikipedia.org/wiki/PARI/GP
http://pari.math.u-bordeaux.fr

I have been using it in a full screen terminal instead of an ordinary calculator:

gp -q [invokes gp without any startup message]
\p 1000 [selects 1000 digits of precision]
Pi [shows the value of pi]

and because it's written by number theorists, strange things happen to fractions 
(among other things):

3/27 [shows 1/9]

a whole new universe!

\? [help]
\q [quit]

Have a great weekend!

Tony (HB)


More information about the music-bar mailing list