[Ecls-list] Example of: The Gnu Multiprecision library for fast bignum operations.

Chris Baker electro at 1939worldsfair.com
Sat Dec 14 11:54:02 UTC 2002


Armin Roehrl <armin at xss.de> writes:

> What if I need floats with let's say 50 digits accuracy or so?
> > (+ 1.2342342134187346716345712345712354176341274   
> 2.34215345233452456713248756234875623845628365)
> 
> 3.576388
> The result seems (has?)  to have far less acuracy.

There's no "bigfloat" in CL.  You can use rationals, though:

> (+ 12342342134187346716345712345712354176341274/10000000000000000000000000000000000000000000
     234215345233452456713248756234875623845628365/100000000000000000000000000000000000000000000)
71527753315065184775341175938399833121808221/20000000000000000000000000000000000000000000
> 

HTH,

cbb

-- 
 11:45:59 up 53 days, 13:28,  1 user,  load average: 0.04, 0.10, 0.09




More information about the ecl-devel mailing list