I added a half-sentence to the description to say that it originates from
fdlibm's pow implementation.
I was using TWO54 because it was defined further above. But I realized that
for
both 2^53 and 2^54 the double representation has an empty lower half, so
loading
from an array is just as fast as having the constant inline. So I removed
TWO54
from the array.
https://codereview.chromium.org/786823003/diff/1/src/third_party/fdlibm/fdlibm.js
File src/third_party/fdlibm/fdlibm.js (right):
https://codereview.chromium.org/786823003/diff/1/src/third_party/fdlibm/fdlibm.js#newcode931
src/third_party/fdlibm/fdlibm.js:931: n -= 54;
On 2014/12/09 20:37:38, Raymond Toy wrote:
Why 54? The original code multiplied by 2^53. I suspect this is
probably ok,
though, but would prefer 53 since that's what the fdlibm pow code did.
Done.
https://codereview.chromium.org/786823003/diff/1/src/third_party/fdlibm/fdlibm.js#newcode966
src/third_party/fdlibm/fdlibm.js:966: var t_h = %_ConstructDouble(((ix
1) | 0x20000000) + th_offset, 0);
On 2014/12/09 20:37:38, Raymond Toy wrote:
If the comment on line 965 is correct, and I believe it is, then line
966 can be
replaced by
var t_h = %_ConstructDouble(%_DoubleHi(ax + bp), 0)
I ran the tests and this passes. This is certainly a lot clearer than
the
current bit-banging code, and th_offset can be removed.
Done.
https://codereview.chromium.org/786823003/
--
--
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.