Review Request 128672: some fixes for javascript Math object

Viktor Mv vic99999 at yandex.ru
Thu Apr 27 15:11:07 UTC 2017



> On Dec. 21, 2016, 9:24 p.m., Albert Astals Cid wrote:
> > src/kjs/math_object.cpp, line 112
> > <https://git.reviewboard.kde.org/r/128672/diff/2/?file=474495#file474495line112>
> >
> >     Why this change?

`1.0 / log(10.0)` gives `0.43429448190325176`, not `0.4342944819032518`


- Viktor


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


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/20170427/608597bd/attachment.html>


More information about the Kde-frameworks-devel mailing list