[Haskell-cafe] Fractional sqrt

Lennart Augustsson lennart at augustsson.net
Fri Jan 19 08:15:19 EST 2007

If it's arbitrary precision floating point that you want then sqrt  
should where it already is, as a member of Floating.  (I find  
"arbitrary precision real" to be an oxymoron, the real numbers are  
the real numbers, they already have arbitrary precision.)
For a real number module, you can use, e.g., David Lester's  
implementation, http://www.augustsson.net/Darcs/CReal/

	-- Lennart

On Jan 19, 2007, at 07:13 , Novák Zoltán wrote:

> Hi,
> Thanks for the answers. The best solution would be a general purpose
>  arbitrary precision math library for Haskell. I found two:
> http://medialab.freaknet.org/bignum/
> http://r6.ca/FewDigits/
> I think both uses power series and have trigonometric functions  
> too. (I only
> need sqrt, so probably I will not use them, just the simple Newton  
> alg.)
> It would be great, if a fast implementation of arbitrary precision  
> real
> arithmetic Class would be part of the Standard libraries. Because   
> Haskell is
> so great for numerical computations already (functions, composing  
> functions,
> higher order f. with typechecking), a good math library would make  
> Matlab
> obsolete. :)
>                         Zoltan Novak
> ps. Call me Zoltan (that is my first name), just we write it in  
> different
> order in Hungary. (Names are in hungarian notation here: the type  
> description
> precedes the actual name)
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list