zloirock / core-js

Standard Library
MIT License
24.61k stars 1.66k forks source link

Fix IEEE754 rounding rule from truncation to roundTiesToEven #1279

Closed petamoriken closed 1 year ago

petamoriken commented 1 year ago

The decimal part of mantissa variable is truncated by bitwise operations, but it should be rounded (to even).

related https://github.com/petamoriken/float16/issues/952

zloirock commented 1 year ago

Thanks -)