mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-14 10:59:24 +02:00
The i32 multiplication fast path in Mul::execute_impl was producing +0 instead of -0 when one operand was negative and the other was zero (e.g. `var a = -1, b = 0; a * b`). This happened because i32 can't represent -0, so `Value(0)` was always positive zero. We now fall through to the double path when the i32 result is zero, which correctly handles the sign. Also add comprehensive multiplication tests covering negative zero, basic arithmetic, large integers, type coercion, NaN, and Infinity.
151 KiB
151 KiB