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

Brad Jorsch <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Assignee|[email protected]. |[email protected]
                   |org                         |

--- Comment #1 from Brad Jorsch <[email protected]> ---
Gerrit change 37368 change did change the behavior of {{#expr: X mod Y }}. The
old code,

 $stack[] = $left % $right;

is more or less equivalent to

 $stack[] = fmod( floor( (float)$left ), floor( (float)$right ) );

rather than to

 $stack[] = fmod( (float)$left, (float)$right );

Note that PHP doesn't have different precision floating point types (according
to http://php.net/manual/en/language.types.float.php), so (float)$x and
(double)$x are equivalent and therefore Gerrit change 38278 was a no-op.

While this change in behavior was requested in bug 6068, it seems that many
templates are relying on the rounding behavior of the old implementation.

If we really want to solve bug 6068, it might be best to keep "mod" with the
old rounding behavior and to introduce a new "fmod" operator. Change I6114c6e7
will do that.

-- 
You are receiving this mail because:
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