Review Request 128672: some fixes for javascript Math object

Viktor Mv vic99999 at yandex.ru
Mon Dec 19 03:32:08 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128672/
-----------------------------------------------------------

(Updated Dec. 19, 2016, 3:32 a.m.)


Review request for KDE Frameworks, Bernd Buschinski and Maksim Melnikau.


Repository: kjs


Description
-------

some fixes for Math methods:

Math.exmp1 - the name should be expm1;
Math.hypot.length should give 2;
Math.abs(+0) should give positive zero;
Math.round(0.49999999999999994) should give 0, not 1, Math.round(-9007199254740991) should give -9007199254740991, not -9007199254740990, Math.round(+9007199254740991) should give +9007199254740991, not +9007199254740992;
Math.hypot - Implementations should take care to avoid the loss of precision from overflows and underflows that are prone to occur in naive implementations when this function is called with two or more arguments. (https://tc39.github.io/ecma262/#sec-math.hypot);
Math.imul() should give 0;
Math.asinh was not exposed;
Math.LOG10E has an inaccurate value


Diffs
-----

  src/kjs/math_object.h 1a1a256 
  src/kjs/math_object.cpp 31bf7a1 

Diff: https://git.reviewboard.kde.org/r/128672/diff/


Testing
-------

I am sorry, but I did not compile this code, so there could be some mistakes... The implementations were tested although.


Thanks,

Viktor Mv

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161219/4299faf7/attachment.html>


More information about the Kde-frameworks-devel mailing list