MCPcopy Create free account
hub / github.com/nodejs/node / precision_sum

Function precision_sum

deps/v8/test/mjsunit/sin-cos.js:80–86  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

78// We sum up in the reverse order for higher precision, as we expect the terms
79// to grow smaller for x reasonably close to 0.
80function precision_sum(array) {
81 var result = 0;
82 while (array.length > 0) {
83 result += array.pop();
84 }
85 return result;
86}
87
88function sin(x) {
89 var sign = 1;

Callers 2

sinFunction · 0.85
cosFunction · 0.85

Calls 1

popMethod · 0.80

Tested by

no test coverage detected