Review Request 114454: kjs: Implement ES6 Math.hypot
Martin Tobias Holmedahl Sandsmark
martin.sandsmark at kde.org
Sat Dec 14 16:46:36 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114454/#review45690
-----------------------------------------------------------
how about just a single loop, but store if we've found a nan? then exit early if you find an inf, or return nan after the loop is over if a nan was found.
- Martin Tobias Holmedahl Sandsmark
On Dec. 14, 2013, 4:30 p.m., Bernd Buschinski wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114454/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2013, 4:30 p.m.)
>
>
> Review request for kdelibs.
>
>
> Repository: kdelibs
>
>
> Description
> -------
>
> kjs: Implement ES6 Math.hypot
>
> I agree that the loop, that is just checking for Inf looks weird, but thats what the spec says.
> We MUST check everything first for Inf, NaN checks must come later.
>
> So a (1, NaN, Inf) must return Inf.
>
>
> Diffs
> -----
>
> kjs/math_object.h 3d193dd
> kjs/math_object.cpp 89835e5
>
> Diff: http://git.reviewboard.kde.org/r/114454/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bernd Buschinski
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131214/c9ea49b0/attachment.htm>
More information about the kde-core-devel
mailing list