https://bugzilla.wikimedia.org/show_bug.cgi?id=6068
--- Comment #62 from Philippe Verdy <[email protected]> --- The result is always correct when using PHP's and MEdiawiki's floor(), but not when using PHP's fmod(). May be it is PHP's fmod() which is bogous, and that returns a NaN double whose output is an empty string. Couldn't you just use PHP's floor() instead to implement the Mediawiki's MOD operator ? For now I'll stick on using floor() for ALL cyclic computations. MOD is completely broken and unreliable. Really, you should be more aware of basic rounding modes (towards zero, for the symetry around zero, or towards minus infinity for cyclic uses). The maths' MOD uses floor() for cyclic computations; the financial's MOD uses trunc() for performing roundings). The IEEE scientific MOD uses rounding towards the nearest even number (in order to balance rounding errors). -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
