Lines Matching refs:from_float
31 return op(F.from_float(self.value), other)
250 self.assertRaises(TypeError, F.from_float, 3+4j)
251 self.assertEqual((10, 1), _components(F.from_float(10)))
253 self.assertEqual((bigint, 1), _components(F.from_float(bigint)))
254 self.assertEqual((0, 1), _components(F.from_float(-0.0)))
255 self.assertEqual((10, 1), _components(F.from_float(10.0)))
256 self.assertEqual((-5, 2), _components(F.from_float(-2.5)))
258 _components(F.from_float(1e23)))
259 self.assertEqual(float(10**23), float(F.from_float(1e23)))
261 _components(F.from_float(3.2)))
262 self.assertEqual(3.2, float(F.from_float(3.2)))
268 F.from_float, inf)
271 F.from_float, -inf)
274 F.from_float, nan)