Home
last modified time | relevance | path

Searched full:rounding (Results 1 – 25 of 82) sorted by relevance

1234

/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/arkts/@arkts/math/Decimal/
DsetTests.ets26 suite.addTest("Decimal set with rounding", testSetWithRounding);
45 arktest.assertEQ(Decimal.rounding, expected);
79 …Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15, cry…
81 arktest.assertEQ(Decimal.rounding, 4);
89 …Decimal.set({ precision: 40, rounding : 4, toExpNeg: -1000, toExpPos: 1000, minE: -1e9, maxE: 1e9,…
91 arktest.assertEQ(Decimal.rounding, 4);
115 tRounding(0, { rounding: 0 });
116 tRounding(1, { rounding: 1 });
117 tRounding(2, { rounding: 2 });
118 tRounding(3, { rounding: 3 });
[all …]
DisFiniteTests.ets34 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
44 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
54 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
64 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
74 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
84 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
93 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
103 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
113 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
123 … Decimal.set({ precision: 20, rounding: 4, toExpNeg: -7, toExpPos: 21, minE: -9e15, maxE: 9e15 });
DRounding.ets16 import {Modulo, Rounding} from "@arkts.math.Decimal"
20 let b: Rounding = 6
21 assertTrue(typeof b == "number", "Rounding type is not a number!")
DtoNearestTests.ets20 …Decimal.set({ precision: 20, rounding: 4, toExpNeg: -9e15, toExpPos: 9e15, minE: -9e15, maxE: 9e15…
129 Decimal.rounding = 1;
177 Decimal.rounding = 0;
179 Decimal.rounding = 1;
181 Decimal.rounding = 2;
183 Decimal.rounding = 3;
185 Decimal.rounding = 4;
187 Decimal.rounding = 5;
189 Decimal.rounding = 6;
191 Decimal.rounding = 7;
[all …]
DtoFixedTests.ets20 …Decimal.set({ precision: 20, rounding: 4, toExpNeg: -9e15, toExpPos: 9e15, minE: -9e15, maxE: 9e15…
25 suite.addTest("Decimal toFixed with rounding is 0", testToFixedWithRMIsZero001);
26 suite.addTest("Decimal toFixed with rounding is 0", testToFixedWithRMIsZero002);
27 suite.addTest("Decimal toFixed with rounding is 1", testToFixedWithRMIsOne001);
28 suite.addTest("Decimal toFixed with rounding is 1", testToFixedWithRMIsOne002);
29 suite.addTest("Decimal toFixed with rounding is 2", testToFixedWithRMIsTwo001);
30 suite.addTest("Decimal toFixed with rounding is 2", testToFixedWithRMIsTwo002);
31 suite.addTest("Decimal toFixed with rounding is 3", testToFixedWithRMIsThree001);
32 suite.addTest("Decimal toFixed with rounding is 3", testToFixedWithRMIsThree002);
33 suite.addTest("Decimal toFixed with rounding is 4", testToFixedWithRMIsFour001);
[all …]
DtoHexadecimalTests.ets20 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
21 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
22 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
23 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
24 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
25 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
26 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
27 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
28 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
29 …suite.addTest("Decimal toHexadecimal with different precision and rounding", testToHexadecimalWith…
[all …]
DtoBinaryTestsPart1.ets20 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
21 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
22 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
23 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
24 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
25 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
26 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
27 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
28 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
29 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
[all …]
DtoOctalTests.ets20 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
21 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
22 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
23 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
24 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
25 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
26 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
27 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
28 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
29 …suite.addTest("Decimal toOctal with different precision and rounding", testToOctalWithDiffPRAndRM0…
[all …]
DtoPrecisionTests.ets23 suite.addTest("Decimal toPrecision with rounding is 0", testToPrecisionWithRMIsZero001);
24 suite.addTest("Decimal toPrecision with rounding is 0", testToPrecisionWithRMIsZero002);
25 suite.addTest("Decimal toPrecision with rounding is 0", testToPrecisionWithRMIsZero003);
26 suite.addTest("Decimal toPrecision with rounding is 1", testToPrecisionWithRMIsOne001);
27 suite.addTest("Decimal toPrecision with rounding is 1", testToPrecisionWithRMIsOne002);
28 suite.addTest("Decimal toPrecision with rounding is 2", testToPrecisionWithRMIsTwo001);
29 suite.addTest("Decimal toPrecision with rounding is 2", testToPrecisionWithRMIsTwo002);
30 suite.addTest("Decimal toPrecision with rounding is 3", testToPrecisionWithRMIsThree001);
31 suite.addTest("Decimal toPrecision with rounding is 3", testToPrecisionWithRMIsThree002);
32 suite.addTest("Decimal toPrecision with rounding is 4", testToPrecisionWithRMIsFour001);
[all …]
DtoExponentialTests.ets24 suite.addTest("Decimal toExponential with rounding is 0", testToExponentialWithRMIsZero001);
25 suite.addTest("Decimal toExponential with rounding is 0", testToExponentialWithRMIsZero002);
26 suite.addTest("Decimal toExponential with rounding is 1", testToExponentialWithRMIsOne001);
27 suite.addTest("Decimal toExponential with rounding is 1", testToExponentialWithRMIsOne002);
28 suite.addTest("Decimal toExponential with rounding is 2", testToExponentialWithRMIsTwo001);
29 suite.addTest("Decimal toExponential with rounding is 2", testToExponentialWithRMIsTwo002);
30 suite.addTest("Decimal toExponential with rounding is 3", testToExponentialWithRMIsThree001);
31 suite.addTest("Decimal toExponential with rounding is 3", testToExponentialWithRMIsThree002);
32 suite.addTest("Decimal toExponential with rounding is 4", testToExponentialWithRMIsFour001);
33 suite.addTest("Decimal toExponential with rounding is 4", testToExponentialWithRMIsFour002);
[all …]
DtoBinaryTestsPart2.ets20 …suite.addTest("Decimal toBinary with different precision and rounding", testToBinaryWithDiffPRAndR…
27 Decimal.rounding = rm;
DvalueOfTests.ets27 …Decimal.set({ precision: 20, rounding: 4, toExpNeg: -9e15, toExpPos: 9e15, minE: -9e15, maxE: 9e15…
58 Decimal.set({ precision: 20, rounding: 4, toExpNeg: 0, toExpPos: 0, minE: -9e15, maxE: 9e15 });
DhypotTests.ets20 Decimal.rounding = rm;
92 Decimal.rounding = 4;
/arkcompiler/runtime_core/static_core/plugins/ets/sdk/arkts/
D@arkts.math.Decimal.ets18 export type Rounding = number
65 rounding?: number;
84 public static rounding: number = DEFAULTS_ROUNDING;
285 * significant digits using rounding mode `rounding`.
288 * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
290 …* @throws { BusinessError } 10200001 - The value of `significantDigits | rounding` is out of range.
292 public toBinary(significantDigits: number, rounding: Rounding): string {
293 return this.toStringBinary(2, significantDigits, rounding);
318 * digits using rounding mode `rounding`.
321 * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/addition/
Daddition_float.params.yaml49 - { left: 1.25, right: 3.75, result: 5.0 } # no rounding errors
50 - { left: -1.25, right: -3.75, result: -5.0 } # no rounding errors
51 - { left: 1.25, right: -3.75, result: -2.5 } # no rounding errors
52 - { left: -1.25, right: 3.75, result: 2.5 } # no rounding errors
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/multiplication/
Dmultiplication_float.params.yaml52 - { left: 1.25, right: 3.75, result: 4.6875 } # no rounding errors
53 - { left: -1.25, right: -3.75, result: 4.6875 } # no rounding errors
54 - { left: 1.25, right: -3.75, result: -4.6875 } # no rounding errors
55 - { left: -1.25, right: 3.75, result: -4.6875 } # no rounding errors
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/subtraction/
Dsubtraction_float.params.yaml54 - { left: 1.25, right: 3.75, result: -2.5 } # no rounding errors
55 - { left: -1.25, right: -3.75, result: 2.5 } # no rounding errors
56 - { left: 1.25, right: -3.75, result: 5.0 } # no rounding errors
57 - { left: -1.25, right: 3.75, result: -5.0 } # no rounding errors
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/division/
Ddivision_float.params.yaml64 - { left: 4.6875, right: 1.25, result: 3.75 } # no rounding errors
65 - { left: 4.6875, right: -1.25, result: -3.75 } # no rounding errors
66 - { left: -4.6875, right: -3.75, result: 1.25 } # no rounding errors
67 - { left: -4.6875, right: 3.75, result: -1.25 } # no rounding errors
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/less_than/
Dless_than_float.params.yaml54 - { left: 3.1415927, right: 3.14159265, result: "false" } # rounding error
55 - { left: 3.1415927, right: 3.1415928, result: "false" } # rounding error
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/not_equal/
Dnot_equal_float.params.yaml54 - { left: 3.1415927, right: 3.14159265, result: "false" } # rounding error
55 - { left: 3.1415927, right: 3.1415928, result: "false" } # rounding error
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/less_or_equal/
Dless_or_equal_float.params.yaml54 - { left: 3.1415927, right: 3.14159265, result: "true" } # rounding error
55 - { left: 3.1415927, right: 3.1415928, result: "true" } # rounding error
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/greater_or_equal/
Dgreater_or_equal_float.params.yaml54 - { left: 3.1415927, right: 3.14159265, result: "true" } # rounding error
55 - { left: 3.1415927, right: 3.1415928, result: "true" } # rounding error
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/equal/
Dequal_float.params.yaml54 - { left: 3.1415927, right: 3.14159265, result: "true" } # rounding error
55 - { left: 3.1415927, right: 3.1415928, result: "true" } # rounding error
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/greater_than/
Dgreater_than_float.params.yaml54 - { left: 3.1415927, right: 3.14159265, result: "false" } # rounding error
55 - { left: 3.1415927, right: 3.1415928, result: "false" } # rounding error
/arkcompiler/runtime_core/static_core/tests/cts-generator/cts-template/
Df32toi64.yaml72 description: It is rounding toward zero.
79 description: Check f32toi64 rounding with various values.

1234