From: Eddie R. <er...@bm...> - 2008-07-07 21:20:28
|
> > // mod of a double > > x::double mod y::int = (x - intx) + (intx mod y) when intx = (int x) end; > > If memory serves me, Common Lisp has this, but not any Algol-like > language I know. I can add it to math.pure if there's enough demand. I've had to deal with this once in Pascal somewhere before but I cant recall. In that occasion I found that mod(double, double) may be defined in two ways in order to stay consistent with something else ... Dang I can't find it on google. I don't know if you should add "double mod double" to the list or not but I sure would hate to have to look it up again. If memory servers me (probably doesn't) C's definition of fmod really should be called frem instead because there is a difference between real mod and real remainder. I guess I better shut up now before I stick my foot in my mouth. e.r. |