Searched refs:from_decimal (Results 1 – 2 of 2) sorted by relevance
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/ |
D | test_fractions.py | 273 self.assertRaises(TypeError, F.from_decimal, 3+4j) 274 self.assertEqual(F(10, 1), F.from_decimal(10)) 275 self.assertEqual(F(0), F.from_decimal(Decimal("-0"))) 276 self.assertEqual(F(5, 10), F.from_decimal(Decimal("0.5"))) 277 self.assertEqual(F(5, 1000), F.from_decimal(Decimal("5e-3"))) 278 self.assertEqual(F(5000), F.from_decimal(Decimal("5e3"))) 280 F.from_decimal(Decimal("0." + "9" * 30))) 284 F.from_decimal, Decimal("inf")) 287 F.from_decimal, Decimal("-inf")) 290 F.from_decimal, Decimal("nan")) [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/ |
D | fractions.py | 115 value = Fraction.from_decimal(numerator) 185 def from_decimal(cls, dec): member in Fraction
|