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

Issue 2079233005: [builtins] Make sure the Math functions and constants agree. (Closed)

Created:
4 years, 6 months ago by Benedikt Meurer
Modified:
4 years, 6 months ago
Reviewers:
Yang, Raymond Toy
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[builtins] Make sure the Math functions and constants agree. While the EcmaScript specification doesn't define precise values for the Math constants or the Math functions, we should at least ensure that the values of the constants and the functions agree, i.e. Math.E should be exactly the same value as Math.exp(1). Also make sure that Math.exp(1) returns the expected value; we should revisit the fdlibm algorithm and figure out why it's wrong in the last bit. CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel BUG=chromium:626111, v8:3266, v8:3468, v8:3493, v8:5086, v8:5108 R=yangguo@chromium.org Committed: https://crrev.com/7877ddecdbf226c312a3008195912103c4d8a552 Cr-Commit-Position: refs/heads/master@{#37128}

Patch Set 1 #

Patch Set 2 : Update the unittests. #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -11 lines) Patch
M src/base/ieee754.cc View 2 chunks +7 lines, -1 line 4 comments Download
M src/bootstrapper.cc View 2 chunks +23 lines, -0 lines 2 comments Download
M src/js/math.js View 1 chunk +0 lines, -9 lines 2 comments Download
A test/mjsunit/regress/regress-crbug-621611.js View 1 chunk +11 lines, -0 lines 0 comments Download
M test/unittests/base/ieee754-unittest.cc View 1 1 chunk +1 line, -1 line 4 comments Download

Messages

Total messages: 19 (6 generated)
Benedikt Meurer
4 years, 6 months ago (2016-06-21 05:28:47 UTC) #1
Benedikt Meurer
Hey Yang, Here's the quickfix for Math.E vs Math.exp(1). Please take a look. Thanks, Benedikt ...
4 years, 6 months ago (2016-06-21 05:30:24 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2079233005/1
4 years, 6 months ago (2016-06-21 05:30:42 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2079233005/20001
4 years, 6 months ago (2016-06-21 05:34:44 UTC) #7
Yang
lgtm https://codereview.chromium.org/2079233005/diff/20001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2079233005/diff/20001/src/bootstrapper.cc#newcode1712 src/bootstrapper.cc:1712: static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY)); Maybe we can ...
4 years, 6 months ago (2016-06-21 05:40:30 UTC) #8
Benedikt Meurer
https://codereview.chromium.org/2079233005/diff/20001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2079233005/diff/20001/src/bootstrapper.cc#newcode1712 src/bootstrapper.cc:1712: static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY)); Yeah, but let's do ...
4 years, 6 months ago (2016-06-21 05:42:55 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2079233005/20001
4 years, 6 months ago (2016-06-21 05:43:34 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-21 07:02:08 UTC) #13
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/7877ddecdbf226c312a3008195912103c4d8a552 Cr-Commit-Position: refs/heads/master@{#37128}
4 years, 6 months ago (2016-06-21 07:02:25 UTC) #15
Raymond Toy
https://codereview.chromium.org/2079233005/diff/20001/src/base/ieee754.cc File src/base/ieee754.cc (right): https://codereview.chromium.org/2079233005/diff/20001/src/base/ieee754.cc#newcode1290 src/base/ieee754.cc:1290: if (x == 1.0) return E; It's probably not ...
4 years, 6 months ago (2016-06-21 16:20:12 UTC) #16
Benedikt Meurer
https://codereview.chromium.org/2079233005/diff/20001/src/base/ieee754.cc File src/base/ieee754.cc (right): https://codereview.chromium.org/2079233005/diff/20001/src/base/ieee754.cc#newcode1290 src/base/ieee754.cc:1290: if (x == 1.0) return E; Since exp is ...
4 years, 6 months ago (2016-06-22 03:55:59 UTC) #17
Raymond Toy
https://codereview.chromium.org/2079233005/diff/20001/src/base/ieee754.cc File src/base/ieee754.cc (right): https://codereview.chromium.org/2079233005/diff/20001/src/base/ieee754.cc#newcode1290 src/base/ieee754.cc:1290: if (x == 1.0) return E; On 2016/06/22 03:55:59, ...
4 years, 6 months ago (2016-06-22 22:11:48 UTC) #18
Benedikt Meurer
4 years, 6 months ago (2016-06-23 03:30:58 UTC) #19
Message was sent while issue was closed.
https://codereview.chromium.org/2079233005/diff/20001/src/base/ieee754.cc
File src/base/ieee754.cc (right):

https://codereview.chromium.org/2079233005/diff/20001/src/base/ieee754.cc#new...
src/base/ieee754.cc:1290: if (x == 1.0) return E;
This would be super awesome and highly appreciated if you could take over the
improvements to the Math functions (again). :-)
We'll hopefully finish the move of the remaining Math functions to this file,
and then it should be easier to experiment and change, since everything has only
a single C++ implementation.

Powered by Google App Engine
This is Rietveld 408576698