diff options
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index ddfb9d01..8ce83adf 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1499,7 +1499,9 @@ function getFastValue(a, op, b, type) { } if (op in MUL_DIV) { if (op == '*') { - if (a == 0 || b == 0) { + // We can't eliminate where a or b are 0 as that would break things for creating + // a negative 0. + if ((a == 0 || b == 0) && !(type in Runtime.FLOAT_TYPES)) { return '0'; } else if (a == 1) { return b; |