[Haskell-cafe] C's fmod in Haskell

Peter Verswyvelen bf3 at telenet.be
Mon Sep 17 10:06:23 EDT 2007

Odd place it is, indeed!

QUOTE: "Data.Fixed... DESCRIPTION... This module defines a Fixed 
<file:///D:/app/ghc-6.6.1/doc/html/libraries/base/Fixed.html> type for 
fixed-precision arithmetic...*This module also contains generalisations 
of div, mod, and divmod to work with any Real instance.*"

Thanks a lot. I wouldn't have found that myself ;-)

Jules Bean wrote:
> Peter Verswyvelen wrote:
>> Maybe this is a stupid question, but I don't find something similar 
>> in Haskell.
>> I find mod and rem, which work on integers. But I'm looking for a 
>> function similar to C's fmod.
>> Of course I can write it myself, but I guess it must already exist 
>> under a different name?
> There's one in Data.Fixed called mod'
> Yes, that is an odd place for it :)
> Jules

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070917/6ee47532/attachment.htm

More information about the Haskell-Cafe mailing list