Home
last modified time | relevance | path

Searched refs:toPrecision (Results 1 – 19 of 19) sorted by relevance

/external/v8/test/mjsunit/
Dto-precision.js29 assertEquals("1e+27", (1.2345e+27).toPrecision(1));
30 assertEquals("1.2e+27", (1.2345e+27).toPrecision(2));
31 assertEquals("1.23e+27", (1.2345e+27).toPrecision(3));
32 assertEquals("1.234e+27", (1.2345e+27).toPrecision(4));
33 assertEquals("1.2345e+27", (1.2345e+27).toPrecision(5));
34 assertEquals("1.23450e+27", (1.2345e+27).toPrecision(6));
35 assertEquals("1.234500e+27", (1.2345e+27).toPrecision(7));
37 assertEquals("-1e+27", (-1.2345e+27).toPrecision(1));
38 assertEquals("-1.2e+27", (-1.2345e+27).toPrecision(2));
39 assertEquals("-1.23e+27", (-1.2345e+27).toPrecision(3));
[all …]
Dnumber-tostring-small.js309 (NaN).toPrecision(1);
310 (Infinity).toPrecision(2);
311 (-Infinity).toPrecision(2);
312 (0.000555).toPrecision(15);
313 (0.000000555).toPrecision(15);
314 (-0.000000555).toPrecision(15);
315 (123456789).toPrecision(1);
316 (123456789).toPrecision(9);
317 (123456789).toPrecision(8);
318 (123456789).toPrecision(7);
[all …]
Dnumber-tostring.js307 assertEquals("NaN", (NaN).toPrecision(1));
308 assertEquals("Infinity", (Infinity).toPrecision(2));
309 assertEquals("-Infinity", (-Infinity).toPrecision(2));
310 assertEquals("0.000555000000000000", (0.000555).toPrecision(15));
311 assertEquals("5.55000000000000e-7", (0.000000555).toPrecision(15));
312 assertEquals("-5.55000000000000e-7", (-0.000000555).toPrecision(15));
313 assertEquals("1e+8", (123456789).toPrecision(1));
314 assertEquals("123456789", (123456789).toPrecision(9));
315 assertEquals("1.2345679e+8", (123456789).toPrecision(8));
316 assertEquals("1.234568e+8", (123456789).toPrecision(7));
[all …]
Dnumber-tostring-func.js331 assertEquals(a, b.toPrecision(c));
363 assertEquals("1.3", 1.25.toPrecision(2), "1.25.toPrecision(2)");
364 assertEquals("1.4", 1.35.toPrecision(2), "1.35.toPrecision(2)");
Dlength.js46 assertEquals(1, Number.prototype.toPrecision.length, "Number.prototype.toPrecision.length");
Dfunction-call.js89 Number.prototype.toPrecision,
/external/v8/test/webkit/fast/js/
Dnumber-toprecision-expected.txt24 This test checks a few Number.toPrecision cases, including 15145: (0.999).toPrecision(1) returns in…
29 PASS (0.999).toPrecision(1) is "1"
30 PASS (0.999).toPrecision(2) is "1.0"
31 PASS (0.999).toPrecision(3) is "0.999"
32 PASS (0.0).toPrecision(4) is "0.000"
33 PASS (-0.0).toPrecision(4) is "0.000"
34 PASS (0.0).toPrecision() is "0"
35 PASS (-0.0).toPrecision() is "0"
36 PASS (1234.567).toPrecision() is "1234.567"
37 PASS (1234.567).toPrecision(0) threw exception RangeError: toPrecision() argument must be between 1…
[all …]
DObject-getOwnPropertyNames-expected.txt77 …ype) is ['constructor', 'toExponential', 'toFixed', 'toLocaleString', 'toPrecision', 'toString', '…
/external/v8/test/webkit/fast/js/kde/
DNumber-expected.txt330 PASS try { Number(1).toPrecision(-1); } catch (e) { String(e).indexOf('Range') >= 0; } is true
331 PASS try { Number(1).toPrecision(0); } catch (e) { String(e).indexOf('Range') >= 0; } is true
332 PASS try { Number(1).toPrecision(1); } catch (e) { String(e); } is "1"
333 PASS try { Number(1).toPrecision(21); } catch (e) { String(e); } is "1.00000000000000000000"
334 PASS try { Number(1).toPrecision(22); } catch (e) { String(e).indexOf('Range') >= 0; } is true
335 PASS Number(NaN).toPrecision() is "NaN"
336 PASS Number(NaN).toPrecision(1) is "NaN"
337 PASS Number(Infinity).toPrecision() is "Infinity"
338 PASS Number(Infinity).toPrecision(1) is "Infinity"
339 PASS Number(-Infinity).toPrecision() is "-Infinity"
[all …]
/external/v8/test/mjsunit/regress/
Dregress-2443.js33 assertThrows(function() { Number.prototype.toPrecision.call({}) }, method in Number
58 Number.prototype.toPrecision.call(x_obj, 2));
68 Number.prototype.toPrecision.call(1, 2));
101 Number.prototype.toPrecision.call(NaN, f_obj));
106 Number.prototype.toPrecision.call(1/0, f_obj));
111 Number.prototype.toPrecision.call(-1/0, f_obj));
Dregress-1134697.js31 (-90).toPrecision(6);
Dregress-117794.js54 (-(true)).toPrecision(0x30, 'lib1-f1');
/external/v8/benchmarks/
Dbase.js163 return value.toPrecision(3);
/external/deqp/modules/gles31/functional/
Des31fShaderIntegerFunctionTests.cpp1040 static deUint32 toPrecision (deUint32 value, int numIntegerBits) in toPrecision() function
1045 static deInt32 toPrecision (deInt32 value, int numIntegerBits) in toPrecision() function
1086 …const int minRef = isSigned ? findMSB(toPrecision(deInt32(value), integerLength)) : findMSB(toPre… in compare()
/external/v8/test/perf-test/Collections/
Dbase.js210 return value.toPrecision(3);
/external/v8/test/mozilla/
Dmozilla.status235 # toPrecision argument restricted to range 1..21 in JSC/V8 and ECMA-262
/external/chromium-trace/trace-viewer/third_party/Paste/paste/evalexception/media/
DMochiKit.packed.js4650 var mid=(ccc(c.h,360).toFixed(0)+","+ccc(c.s,100).toPrecision(4)+"%"+","+ccc(c.l,100).toPrecision(4…
/external/chromium-trace/trace-viewer/tracing/third_party/css-element-queries/test/
Dmootools-more-yui-compressed.min.js1 …suffix");if(D!==""&&D>=0&&D<=20){t=t.toFixed(D)}if(w>=1&&w<=21){t=(+t).toPrecision(w)}t+="";var u;…
/external/chromium-trace/trace-viewer/tracing/third_party/d3/
Dd3.min.js3 …ction(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(…