Lines Matching refs:Decimal
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")))
281 self.assertEqual(F(5, 1000), F.from_decimal(Decimal("5e-3")))
282 self.assertEqual(F(5000), F.from_decimal(Decimal("5e3")))
284 F.from_decimal(Decimal("0." + "9" * 30)))
288 F.from_decimal, Decimal("inf"))
291 F.from_decimal, Decimal("-inf"))
294 F.from_decimal, Decimal("nan"))
297 F.from_decimal, Decimal("snan"))
405 operator.add, F(3,11), Decimal('3.1415926'))
409 operator.add, Decimal('3.1415926'), F(3,11))
410 self.assertNotEqual(F(5, 2), Decimal('2.5'))