Commit b12ba06e authored by Gus Caplan's avatar Gus Caplan Committed by Commit Bot

[builtins] stop using imprecise fdlibm pow

This CL reinstates the old pow implementation which calls out to the
system implementation of pow.

Bug: v8:9622
Change-Id: I3df997888ced3fb8b5bd4b810098e967649aaa55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1774898Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66303}
parent b0c4f2b0
This diff is collapsed.
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
assertEquals(0.6840442338072671 ** 2.4, 0.4019777798321958);
const constants = {
'0': 1,
'-1': 0.1,
'-2': 0.01,
'-3': 0.001,
'-4': 0.0001,
'-5': 0.00001,
'-6': 0.000001,
'-7': 0.0000001,
'-8': 0.00000001,
'-9': 0.000000001,
};
for (let i = 0; i > -10; i -= 1) {
assertEquals(10 ** i, constants[i]);
assertEquals(10 ** i, 1 / (10 ** -i));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment