On 27 March 2010 02:14, Walter Bright <[email protected]> wrote: > > > Andrei Alexandrescu wrote: >> >> * Some asserts before division by zero would be helpful. Carrying through >> with silent NaNs annoy the heck out of anyone. >> > > I don't agree. Complex arithmetic behavior should mirror IEEE 754 floating > point behavior as far as exceptions and NaNs go.
Yes, enable the division by zero exception if you don't want NaNs. Secondly, the modulus operation should use std.math.hypot(). You can copy the implementation from std.math.abs. I think it should probably be called abs() rather than mod(). Mod has such as strong connotation of %, that it's bound to cause confusion. Everything else looks pretty good. > _______________________________________________ > phobos mailing list > [email protected] > http://lists.puremagic.com/mailman/listinfo/phobos > _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
