Review Request 128672: some fixes for javascript Math object

Albert Astals Cid aacid at kde.org
Wed Dec 21 21:24:26 UTC 2016


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



> The implementations were tested although.

Could you share the tests you did?


src/kjs/math_object.cpp (line 112)
<https://git.reviewboard.kde.org/r/128672/#comment67987>

    Why this change?


- Albert Astals Cid


On Dec. 19, 2016, 3:32 a.m., Viktor Mv wrote:
> 
> -----------------------------------------------------------
> 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/20161221/be0aa6fb/attachment.html>


More information about the Kde-frameworks-devel mailing list