Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Issue 522723002: Port fdlibm implementation for Math.cosh. (Closed)

Created:
6 years, 3 months ago by Yang
Modified:
6 years, 3 months ago
Reviewers:
Raymond Toy
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Port fdlibm implementation for Math.cosh. R=rtoy@chromium.org BUG=v8:3494 LOG=N Committed: https://code.google.com/p/v8/source/detail?r=23548

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -16 lines) Patch
M src/math.js View 2 chunks +1 line, -8 lines 0 comments Download
M test/mjsunit/es6/math-hyperbolic.js View 1 2 chunks +26 lines, -6 lines 0 comments Download
M third_party/fdlibm/fdlibm.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/fdlibm/fdlibm.js View 1 chunk +53 lines, -0 lines 0 comments Download
M tools/generate-runtime-tests.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Yang
6 years, 3 months ago (2014-08-29 14:03:29 UTC) #1
Raymond Toy
lgtm with some nits. https://codereview.chromium.org/522723002/diff/1/test/mjsunit/es6/math-hyperbolic.js File test/mjsunit/es6/math-hyperbolic.js (right): https://codereview.chromium.org/522723002/diff/1/test/mjsunit/es6/math-hyperbolic.js#newcode111 test/mjsunit/es6/math-hyperbolic.js:111: assertEqualsDelta(74.209948524787, Math.cosh(-5), 1E-12); Is there ...
6 years, 3 months ago (2014-08-29 16:23:32 UTC) #2
Yang
https://codereview.chromium.org/522723002/diff/1/test/mjsunit/es6/math-hyperbolic.js File test/mjsunit/es6/math-hyperbolic.js (right): https://codereview.chromium.org/522723002/diff/1/test/mjsunit/es6/math-hyperbolic.js#newcode111 test/mjsunit/es6/math-hyperbolic.js:111: assertEqualsDelta(74.209948524787, Math.cosh(-5), 1E-12); On 2014/08/29 16:23:31, Raymond Toy wrote: ...
6 years, 3 months ago (2014-09-01 09:35:42 UTC) #3
Yang
Committed patchset #3 (id:40001) manually as 23548 (presubmit successful).
6 years, 3 months ago (2014-09-01 09:36:11 UTC) #4
Raymond Toy
6 years, 3 months ago (2014-09-02 22:33:27 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/522723002/diff/1/test/mjsunit/es6/math-hyperb...
File test/mjsunit/es6/math-hyperbolic.js (right):

https://codereview.chromium.org/522723002/diff/1/test/mjsunit/es6/math-hyperb...
test/mjsunit/es6/math-hyperbolic.js:111: assertEqualsDelta(74.209948524787,
Math.cosh(-5), 1E-12);
On 2014/09/01 09:35:42, Yang wrote:
> On 2014/08/29 16:23:31, Raymond Toy wrote:
> > Is there any reason to keep the tests in 108-111? If yes, then you should
> > probably use the correct values and test for equality: cosh(0.5) =
> > 1.1276259652063807d0, and cosh(5) = 74.20994852478785d0
> > 
> > The same goes for the sinh tests in lines 105-106: sinh(5) =
> 74.20321057778875d0
> > 
> > If you want some further tests, you could use the properties cosh(x) +
sinh(x)
> =
> > exp(x) and cosh(x)^2-sinh(x)^2 = 1.
> 
> I corrected those test expectations. I think we are fine regarding tests so
far.
> Actually I was hoping that we would eventually get some coverage in Test262
once
> we have formal specification on accuracy.

I was assuming you'd change the assertEqualsDelta to assertEquals, since there's
no delta required now. Oh well.

Powered by Google App Engine
This is Rietveld 408576698