What to do about divMod'.

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat Nov 15 00:20:27 EST 2008

On 2008 Nov 14, at 22:58, Christopher Lane Hinson wrote:
> Data.Fixed contains divMod' :: (Real a, Integral b) => a -> a -> (b,  
> a)
> as well as div' and mod'.
> There are two problems:
> 1) Implementation of this type signature requires conversion to  
> Rational, which is extremely slow.  It really isn't usable in any  
> kind of significant loop at all.

I dunno, Data.Fixed seems to me to be Rational's cousin, and I can  
also see how divMod' would be needed to implement Fixed.

> 2) This has nothing specific to do with fixed precision arithmetic  
> despite being in the Data.Fixed module.

Last I checked the Haddock noted that it has wider use than Data.Fixed.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Libraries mailing list