[Haskell-cafe] library(s) for numeric constant folding?

Robert Dockins robdockins at fastmail.fm
Sun Jan 29 17:58:47 EST 2006


Does anyone know of a good library or libraries which will allow me  
to perform arithmetic operations on

   1) binary integers (signed and unsigned) of various fixed sizes?
   2) IEEE 754 floating point numbers (single and double precision).

Pure Haskell is preferable, but I'll make do with C bindings.  I need  
to do constant folding for integral and floating point types for a  
compiler front-end, and I'm hoping that I don't have to write this  
stuff myself....

Why not just use Float and Double for 2) you ask?  Because I need to  
to EXACTLY IEEE 754 computation, and the Haskell report is pretty  
dodgy about what implementations are required to provide.

Thanks



Rob Dockins

Speak softly and drive a Sherman tank.
Laugh hard; it's a long way to the bank.
           -- TMBG




More information about the Haskell-Cafe mailing list