Looks good, but I have one last comment.

https://codereview.chromium.org/457643002/diff/1/test/mjsunit/es6/math-log1p.js
File test/mjsunit/es6/math-log1p.js (right):

https://codereview.chromium.org/457643002/diff/1/test/mjsunit/es6/math-log1p.js#newcode20
test/mjsunit/es6/math-log1p.js:20:
On 2014/08/11 07:51:06, Yang wrote:
On 2014/08/08 17:32:16, Raymond Toy wrote:
> Although not part of the CL, I noticed this. I think this test
should avoid
> testing down to 0.1, where log(x+1) and log1p(x) are supposed to be
different.
> Based on the comments from fdlibm log1p(x) = log(1+x) when x > 2^53.
 Then
your
> delta should be zero, or at least closer to 1.1e-16 (float epsilon).

Done.

Why 1e2 and not 2^53?. It's obviously true for x > 2^53 that 1+x = x so
log1p(x) == log(1+x). In fact, testing a few random values quickly
finds, for example,

x = 203.02512450909163d0
log(1+x) = 5.318243145619017d0
log1p(x) = 5.318243145619018d0

(Both log and log1p used fdlibm algorithm)

So, what is the intent of this test? That log1p is close to log(1+x)? If
so, you should say so in a comment, and describe why 1e-14 is a good
threshold for this.

https://codereview.chromium.org/457643002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to