/external/python/cpython2/Lib/test/ |
D | test_decimal.py | 337 v = Decimal(v, self.context) 416 self.assertEqual(Decimal(), Decimal("0")) 419 self.assertRaises(TypeError, Decimal, None) 424 d = Decimal(45) 428 d = Decimal(500000123) 432 d = Decimal(-45) 436 d = Decimal(0) 442 self.assertEqual(str(Decimal('')), 'NaN') 445 self.assertEqual(str(Decimal('45')), '45') 448 self.assertEqual(str(Decimal('45.34')), '45.34') [all …]
|
D | test_fractions.py | 3 from decimal import Decimal 167 _components(F(Decimal('1.1')))) 169 _components(F(Decimal('3.5e-2')))) 171 _components(F(Decimal('.000e20')))) 172 self.assertRaises(TypeError, F, Decimal('nan')) 173 self.assertRaises(TypeError, F, Decimal('snan')) 174 self.assertRaises(TypeError, F, Decimal('inf')) 175 self.assertRaises(TypeError, F, Decimal('-inf')) 279 self.assertEqual(F(0), F.from_decimal(Decimal("-0"))) 280 self.assertEqual(F(5, 10), F.from_decimal(Decimal("0.5"))) [all …]
|
/external/python/cpython3/Lib/test/ |
D | test_decimal.py | 283 return self.decimal.Decimal(v, context) 493 Decimal = self.decimal.Decimal 494 self.assertEqual(Decimal(), Decimal("0")) 497 Decimal = self.decimal.Decimal 498 self.assertRaises(TypeError, Decimal, None) 501 Decimal = self.decimal.Decimal 504 d = Decimal(45) 508 d = Decimal(500000123) 512 d = Decimal(-45) 516 d = Decimal(0) [all …]
|
D | test_statistics.py | 15 from decimal import Decimal 295 args1 = [2456, 37.8, -12.45, Decimal('2.54'), Fraction(17, 54)] 296 args2 = [2459, 37.2, -12.41, Decimal('2.59'), Fraction(15, 54)] 318 for type_ in (int, float, Decimal, Fraction): 374 D = Decimal 391 self.do_exactly_equal_test(Decimal("3.571"), Decimal("0.01"), 0) 392 self.do_exactly_equal_test(-Decimal("81.3971"), Decimal("0.01"), 0) 398 self.do_exactly_equal_test(Decimal("11.68"), 0, Decimal("0.01")) 404 D = Decimal 435 for d in map(Decimal, "3.1415 298.12 3.47 18.996 0.00245".split()): [all …]
|
D | test_fractions.py | 3 from decimal import Decimal 168 _components(F(Decimal('1.1')))) 170 _components(F(Decimal('3.5e-2')))) 172 _components(F(Decimal('.000e20')))) 174 self.assertRaises(ValueError, F, Decimal('nan')) 175 self.assertRaises(ValueError, F, Decimal('snan')) 176 self.assertRaises(OverflowError, F, Decimal('inf')) 177 self.assertRaises(OverflowError, F, Decimal('-inf')) 279 self.assertEqual(F(0), F.from_decimal(Decimal("-0"))) 280 self.assertEqual(F(5, 10), F.from_decimal(Decimal("0.5"))) [all …]
|
/external/python/cpython2/Doc/library/ |
D | decimal.rst | 2 :mod:`decimal` --- Decimal fixed point and floating point arithmetic 6 :synopsis: Implementation of the General Decimal Arithmetic Specification. 32 * Decimal "is based on a floating-point model which was designed with people 37 * Decimal numbers can be represented exactly. In contrast, numbers like 62 >>> Decimal(1) / Decimal(7) 63 Decimal('0.142857') 65 >>> Decimal(1) / Decimal(7) 66 Decimal('0.1428571428571428571428571429') 111 * IBM's General Decimal Arithmetic Specification, `The General Decimal Arithmetic 134 Decimal instances can be constructed from integers, strings, floats, or tuples. [all …]
|
D | fractions.rst | 32 either a :class:`float` or a :class:`decimal.Decimal` instance, and return a 72 >>> from decimal import Decimal 73 >>> Fraction(Decimal('1.1')) 85 :class:`decimal.Decimal` instances. 101 value of *dec*, which must be a :class:`decimal.Decimal`. 104 :class:`Fraction` instance directly from a :class:`decimal.Decimal`
|
D | tokenize.rst | 119 Example of a script re-writer that transforms float literals into Decimal 125 >>> from decimal import Decimal 128 "print +Decimal ('21.3e-5')*-Decimal ('.1234')/Decimal ('81.7')" 141 (NAME, 'Decimal'),
|
/external/parameter-framework/upstream/test/test-fixed-point-parameter/ |
D | Main.py | 34 from decimal import Decimal 83 Decimal(0), 84 Decimal(self._lowerAllowedBound), 85 Decimal(self._upperAllowedBound) 93 Decimal(self._lowerAllowedBound) - Decimal(bigValue), 94 Decimal(self._upperAllowedBound) + Decimal(bigValue), 95 Decimal(self._lowerAllowedBound) - Decimal(littleValue), 96 Decimal(self._upperAllowedBound) + Decimal(littleValue) 159 returnValue = Decimal(firstGet) 164 upperAllowedValue = Decimal(valuePreviouslySet) + (Decimal(self._quantum) / Decimal(2)) [all …]
|
/external/python/cpython3/Doc/library/ |
D | decimal.rst | 1 :mod:`decimal` --- Decimal fixed point and floating point arithmetic 5 :synopsis: Implementation of the General Decimal Arithmetic Specification. 37 * Decimal "is based on a floating-point model which was designed with people 42 * Decimal numbers can be represented exactly. In contrast, numbers like 67 >>> Decimal(1) / Decimal(7) 68 Decimal('0.142857') 70 >>> Decimal(1) / Decimal(7) 71 Decimal('0.1428571428571428571428571429') 116 * IBM's General Decimal Arithmetic Specification, `The General Decimal Arithmetic 139 Decimal instances can be constructed from integers, strings, floats, or tuples. [all …]
|
D | fractions.rst | 32 either a :class:`float` or a :class:`decimal.Decimal` instance, and return a 72 >>> from decimal import Decimal 73 >>> Fraction(Decimal('1.1')) 85 :class:`decimal.Decimal` instances. 112 value of *dec*, which must be a :class:`decimal.Decimal` instance. 117 :class:`Fraction` instance directly from a :class:`decimal.Decimal`
|
/external/python/cpython3/Lib/test/test_asyncio/ |
D | test_context.py | 12 a = decimal.Decimal(x) / decimal.Decimal(y) 14 b = decimal.Decimal(x) / decimal.Decimal(y ** 2)
|
/external/python/cpython2/Doc/tutorial/ |
D | stdlib2.rst | 352 Decimal Floating Point Arithmetic 355 The :mod:`decimal` module offers a :class:`~decimal.Decimal` datatype for 372 >>> x = Decimal('0.70') * Decimal('1.05') 374 Decimal('0.7350') 375 >>> x.quantize(Decimal('0.01')) # round to nearest cent 376 Decimal('0.74') 380 The :class:`~decimal.Decimal` result keeps a trailing zero, automatically 382 significance. Decimal reproduces mathematics as done by hand and avoids 386 Exact representation enables the :class:`~decimal.Decimal` class to perform 390 >>> Decimal('1.00') % Decimal('.10') [all …]
|
/external/python/cpython3/Doc/tutorial/ |
D | stdlib2.rst | 354 Decimal Floating Point Arithmetic 357 The :mod:`decimal` module offers a :class:`~decimal.Decimal` datatype for 374 >>> round(Decimal('0.70') * Decimal('1.05'), 2) 375 Decimal('0.74') 379 The :class:`~decimal.Decimal` result keeps a trailing zero, automatically 381 significance. Decimal reproduces mathematics as done by hand and avoids 385 Exact representation enables the :class:`~decimal.Decimal` class to perform 389 >>> Decimal('1.00') % Decimal('.10') 390 Decimal('0.00') 394 >>> sum([Decimal('0.1')]*10) == Decimal('1.0') [all …]
|
/external/llvm/lib/Target/PowerPC/ |
D | p9-instrs.txt | 15 // 6.17.2 Decimal Integer Format Conversion Instructions 17 // Decimal Convert From National VX-form p352 20 // Decimal Convert From Zoned VX-form p353 23 // Decimal Convert To National VX-form p354 26 // Decimal Convert To Zoned VX-form p355 29 // Decimal Convert From Signed Quadword VX-form p356 32 // Decimal Convert To Signed Quadword VX-form p356 35 // 6.17.3 Decimal Integer Sign Manipulation Instructions 37 // Decimal Copy Sign VX-form p358 40 // Decimal Set Sign VX-form p358 [all …]
|
/external/python/cpython3/Lib/ |
D | _pydecimal.py | 509 class Decimal(object): class 593 if isinstance(value, Decimal): 659 value = Decimal.from_float(value) 708 if cls is Decimal: 937 return Decimal(self._cmp(other)) 1127 ans = Decimal(self) 1174 return Decimal(self) 1176 return Decimal(other) # Can't both be infinity here 1235 ans = Decimal(result) 1525 ans = Decimal(self) [all …]
|
/external/python/cpython3/Modules/_decimal/tests/ |
D | deccheck.py | 381 cmp = 1 if x.compare_total(P.Decimal("+0")) >= 0 else -1 424 if P.Decimal("-0.6") < err < P.Decimal("0.6"): 427 if P.Decimal("-0.1") < err < P.Decimal("1.1"): 430 if P.Decimal("-1.1") < err < P.Decimal("0.1"): 433 if P.Decimal("-1.1") < err < P.Decimal("1.1"): 457 rounded = P.Decimal(t.cresults[0]) 628 c = C.Decimal(op) 717 if isinstance(t.rc, C.Decimal) and isinstance(t.rp, P.Decimal): 1065 check_untested(Functions, C.Decimal, P.Decimal)
|
D | bench.py | 38 D = C.Decimal 50 D = P.Decimal 110 x = factorial(C.Decimal(n), 0)
|
/external/python/cpython2/Lib/ |
D | decimal.py | 505 class Decimal(object): class 589 if isinstance(value, Decimal): 650 value = Decimal.from_float(value) 693 if cls is Decimal: 932 return Decimal(self._cmp(other)) 966 if Decimal.from_float(self_as_float) == self: 1098 ans = Decimal(self) 1145 return Decimal(self) 1147 return Decimal(other) # Can't both be infinity here 1206 ans = Decimal(result) [all …]
|
/external/python/cpython2/Lib/json/tests/ |
D | test_decode.py | 9 rval = self.loads('1.1', parse_float=decimal.Decimal) 10 self.assertTrue(isinstance(rval, decimal.Decimal)) 11 self.assertEqual(rval, decimal.Decimal('1.1'))
|
/external/openssh/ |
D | moduli.0 | 23 type Decimal number specifying the internal structure of 36 tests Decimal number indicating the type of primality tests 50 trials Decimal number indicating the number of primality 53 size Decimal number indicating the size of the prime in
|
/external/python/cpython2/Doc/whatsnew/ |
D | 2.4.rst | 471 PEP 327: Decimal Data Type 478 accurately. The new :class:`Decimal` type can represent these fractions 482 Why is Decimal needed? 533 Hence, the :class:`Decimal` type was created. 536 The :class:`Decimal` type 540 contains two classes, :class:`Decimal` and :class:`Context`. :class:`Decimal` 544 :class:`Decimal` instances are immutable, like regular Python integers and FP 546 represents. :class:`Decimal` instances can be created from integers or 550 >>> decimal.Decimal(1972) 551 Decimal("1972") [all …]
|
/external/python/cpython3/Doc/whatsnew/ |
D | 2.4.rst | 471 PEP 327: Decimal Data Type 478 accurately. The new :class:`Decimal` type can represent these fractions 482 Why is Decimal needed? 533 Hence, the :class:`Decimal` type was created. 536 The :class:`Decimal` type 540 contains two classes, :class:`Decimal` and :class:`Context`. :class:`Decimal` 544 :class:`Decimal` instances are immutable, like regular Python integers and FP 546 represents. :class:`Decimal` instances can be created from integers or 550 >>> decimal.Decimal(1972) 551 Decimal("1972") [all …]
|
/external/fonttools/Tests/misc/ |
D | py23_test.py | 374 from decimal import Decimal 377 (Decimal('1.00000001'), Decimal('1.0')), 378 (Decimal('1.00000001e-20'), Decimal('1.0e-20')), 379 (Decimal('1.00000001e-100'), Decimal('1.0e-100'))]
|
/external/python/cpython3/Lib/test/test_json/ |
D | test_decode.py | 9 rval = self.loads('1.1', parse_float=decimal.Decimal) 10 self.assertTrue(isinstance(rval, decimal.Decimal)) 11 self.assertEqual(rval, decimal.Decimal('1.1'))
|