Home
last modified time | relevance | path

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

12

/third_party/jerryscript/tests/jerry/
Dnumber-prototype-to-precision.js17 assert((123.56).toPrecision() === "123.56");
18 assert((123.56).toPrecision(1) === "1e+2");
19 assert((123.56).toPrecision(2) === "1.2e+2");
20 assert((123.56).toPrecision(6) === "123.560");
21 assert((-1.23).toPrecision(1) === "-1");
22 assert((0.00023).toPrecision(1) === "0.0002");
23 assert((0.356).toPrecision(2) === "0.36");
24 assert((0.0000356).toPrecision(5) === "0.000035600");
25 assert((0.000030056).toPrecision(4) === "0.00003006");
26 assert(Infinity.toPrecision(1) === "Infinity");
[all …]
/third_party/typescript/tests/baselines/reference/
DfunctionExpressionShadowedByParams.symbols6 b1.toPrecision(2); // should not error
7 >b1.toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --))
9 >toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --))
24 b.toPrecision(2); // should not error
25 >b.toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --))
27 >toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --))
DfunctionExpressionShadowedByParams.types6 b1.toPrecision(2); // should not error
7 >b1.toPrecision(2) : string
8 >b1.toPrecision : (precision?: number) => string
10 >toPrecision : (precision?: number) => string
22 >{ b: function b(b: number) { b.toPrecision(2); // should not error b.apply(null, null)…
26 >function b(b: number) { b.toPrecision(2); // should not error b.apply(null, null); // sh…
30 b.toPrecision(2); // should not error
31 >b.toPrecision(2) : string
32 >b.toPrecision : (precision?: number) => string
34 >toPrecision : (precision?: number) => string
DfunctionExpressionShadowedByParams.js3 b1.toPrecision(2); // should not error
10 b.toPrecision(2); // should not error
18 b1.toPrecision(2); // should not error
23 b.toPrecision(2); // should not error
DcontrolFlowInstanceOfGuardPrimitives.types41 console.log("Aha!! It's the number " + thing.toPrecision(3));
42 >console.log("Aha!! It's the number " + thing.toPrecision(3)) : void
46 >"Aha!! It's the number " + thing.toPrecision(3) : string
48 >thing.toPrecision(3) : string
49 >thing.toPrecision : (precision?: number) => string
51 >toPrecision : (precision?: number) => string
DcontrolFlowInstanceOfGuardPrimitives.symbols31 console.log("Aha!! It's the number " + thing.toPrecision(3));
35 >thing.toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --))
37 >toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --))
DoperatorsAndIntersectionTypes.symbols68 const s5 = serialNo.toPrecision(0);
70 >serialNo.toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --))
72 >toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --))
DoperatorsAndIntersectionTypes.types87 const s5 = serialNo.toPrecision(0);
89 >serialNo.toPrecision(0) : string
90 >serialNo.toPrecision : (precision?: number) => string
92 >toPrecision : (precision?: number) => string
DmappedTypeRecursiveInference.errors.txt1toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly respo…
2toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly respo…
26toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly respo…
28toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly respo…
DcontrolFlowInstanceOfGuardPrimitives.js8 console.log("Aha!! It's the number " + thing.toPrecision(3));
25 console.log("Aha!! It's the number " + thing.toPrecision(3));
DfunctionExpressionShadowedByParams.errors.txt8 b1.toPrecision(2); // should not error
18 b.toPrecision(2); // should not error
DassignFromNumberInterface2.symbols24 toPrecision(precision?: number): string;
25 >toPrecision : Symbol(NotNumber.toPrecision, Decl(assignFromNumberInterface2.ts, 7, 51))
DoperatorsAndIntersectionTypes.js25 const s5 = serialNo.toPrecision(0);
51 var s5 = serialNo.toPrecision(0);
DassignFromNumberInterface2.types20 toPrecision(precision?: number): string;
21 >toPrecision : (precision?: number) => string
DassignFromNumberInterface2.js10 toPrecision(precision?: number): string;
DmappedTypes1.types107 >x4 : { toString: void; toFixed: void; toExponential: void; toPrecision: void; valueOf: void; toLoc…
108 >f4() : { toString: void; toFixed: void; toExponential: void; toPrecision: void; valueOf: void; toL…
DmappedTypeRecursiveInference.types94toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly respo…
95toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly respo…
100toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; c…
101toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly respo…
102toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; c…
105 …ength : { toString: unknown; toFixed: unknown; toExponential: unknown; toPrecision: unknown; value…
106 …n; readonly length: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: …
107toPrecision: any; valueOf: any; toLocaleString: any; }; readonly clientLeft: { toString: any; toFi…
108toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; c…
109toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly respo…
[all …]
DassignFromNumberInterface2.errors.txt15 toPrecision(precision?: number): string;
/third_party/quickjs/tests/
Dtest_bignum.js216 assert((1234.125l).toPrecision(6), "1234.13");
217 assert((1234.125l).toPrecision(6, BigFloatEnv.RNDZ), "1234.12");
230 assert((0x123.438l).toPrecision(5, BigFloatEnv.RNDNA, 16), "123.44");
231 assert((0x123.438l).toPrecision(5, BigFloatEnv.RNDZ, 16), "123.43");
232 assert((0x323.438l).toPrecision(5, BigFloatEnv.RNDNA, 16), "323.44");
233 assert((0x723.438l).toPrecision(5, BigFloatEnv.RNDNA, 16), "723.44");
234 assert((-0xf23.438l).toPrecision(5, BigFloatEnv.RNDD, 16), "-f23.44");
317 assert((1234.125m).toPrecision(6), "1234.13");
318 assert((1234.125m).toPrecision(6, "down"), "1234.12");
319 assert((-1234.125m).toPrecision(6, "floor"), "-1234.13");
/third_party/typescript/tests/cases/compiler/
DfunctionExpressionShadowedByParams.ts2 b1.toPrecision(2); // should not error
9 b.toPrecision(2); // should not error
/third_party/jerryscript/tests/jerry/fail/
Dregression-test-issue-3173.js16 var a = d.toPrecision(c);
/third_party/jerryscript/tests/jerry/es2015/
Dregression-test-issue-2724.js17 …Object.defineProperty( obj, 'length', { 'get' : function(toPrecision) { return Object.create(/x/);… argument
/third_party/typescript/tests/cases/conformance/controlFlow/
DcontrolFlowInstanceOfGuardPrimitives.ts7 console.log("Aha!! It's the number " + thing.toPrecision(3));
/third_party/typescript/tests/cases/conformance/types/primitives/number/
DassignFromNumberInterface2.ts9 toPrecision(precision?: number): string; method
/third_party/typescript/tests/cases/conformance/types/intersection/
DoperatorsAndIntersectionTypes.ts24 const s5 = serialNo.toPrecision(0);

12