On Wednesday 27 October 2004 06:14 pm, Steven Jenkins wrote:
| It's been done. Google for "matula floating slash". As a graduate
| student long ago, I did a little Fortran programming on the topic for
| David Matula.

Nice. I'm impressed. Unfortunately I couldn't find anything very detailed on 
that method. (Have a good link?) But I did discover SLI arithmetic --not 
perfect but it is more precise then f.p. and apparently is poised to have 
great effects in supercomputing.

But what was more interesting were the very real and practical solutions 
coming into play. Take one part GMP and add:

  MPFR: http://www.mpfr.org/

or

  ARITHMOS: http://www.win.ua.ac.be/~cant/arithmos/

and presto! That was easy ;) Looks like the standards guys are way behind.

So are there bindings to GMP for Ruby? I beleive I've heard them mentioned...

(Note: ARITHMOS looks more promising, but MPFR may make it's way into GMP)

| It's also worth pointing out that, from an information-theoretic point
| of view, you can also represent irrational numbers in a finite number of
| bits. For example, 'pi' or 'sqrt(2)'. But, as you note, that may not be
| the most convenient representation for doing arithmetic.

He he. Well, there's a difference between a representation and computationally 
useful notation. But, hey, who's counting? ;)

Thanks Steve,
T.