https://bugzilla.wikimedia.org/show_bug.cgi?id=6068

Brad Jorsch <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #63 from Brad Jorsch <[email protected]> ---
A few notes:

PHP doesn't have different-precision floating point types, "float" and "double"
are the same. Both are implemented in terms of a C double, which is probably
going to be an IEEE 754 64-bit representation.

On my local test wiki, {{#expr: 0.9900000001 mod 0.03 }} returns
1.0000003602961E-10 both before and after change 38278 is applied. Similarly,
{{#expr: (2*PI) mod (PI/6) }} returns 4.4408920985006E-16 both with and without
change 38278. I don't know what you were doing to get those different results.

As for the situation now, note that the extension has been rolled back on WMF
wikis to a version before I32c9ca6 due to many templates explicitly relying on
the old integer-casting behavior of 'mod'. So the result of 0.9900000001 mod
0.03 is actually coming out as boolean false due to division by zero, which
winds up being displayed as an empty string.

Gerrit change I6114c6e7 reverts the behavior of 'mod' while still fixing bug
35866, and at the same time adds a new 'fmod' with the floating-point behavior
requested here.

-- 
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

Reply via email to