On Wed, 26 Sep 2007, ok wrote:
[Concerning the fact that fmod(x,y) = -fmod(-x,y)]
I wrote:
Interesting, perhaps. Surprising, no. fmod() is basically there for
the sake of sin(), cos(), and tan() (or any other periodic and
either symmetric or antisymmetric function).
On 25 Sep 2007, at
On Tue, 25 Sep 2007, ok wrote:
On 25 Sep 2007, at 10:55 am, Thomas Conway wrote:
This old chestnut! It's a common problem in practice. As I recall, the
behaviour of C's % operator allows implementations to yield either
behaviour. I just checked ISO 9899:1999 which defines fmod. It
specifies
[Concerning the fact that fmod(x,y) = -fmod(-x,y)]
I wrote:
Interesting, perhaps. Surprising, no. fmod() is basically there for
the sake of sin(), cos(), and tan() (or any other periodic and
either symmetric or antisymmetric function).
On 25 Sep 2007, at 8:58 pm, Henning Thielemann wrote:
On Sun, 23 Sep 2007, Thomas Conway wrote:
In Prelude there is a function properFraction which splits a RealFrac
into its integer part and its fractional part. You can use this to
implement fmod. Assuming properFraction is efficient (which it
probably isn't), you can implement fmod really quite
On 9/24/07, Henning Thielemann [EMAIL PROTECTED] wrote:
Unfortunately, properFraction doesn't work well with negative numbers.
This old chestnut! It's a common problem in practice. As I recall, the
behaviour of C's % operator allows implementations to yield either
behaviour. I just checked ISO
On 25 Sep 2007, at 10:55 am, Thomas Conway wrote:
This old chestnut! It's a common problem in practice. As I recall, the
behaviour of C's % operator allows implementations to yield either
behaviour. I just checked ISO 9899:1999 which defines fmod. It
specifies that the result of fmod(x,y)
On 9/17/07, Peter Verswyvelen [EMAIL PROTECTED] 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
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?
Thanks,
Peter
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
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.*
10 matches
Mail list logo