Lines Matching refs:NAN

13 NAN = float("nan")
238 # x**NAN is NAN for any x except 1
239 self.assertTrue(isnan(pow_op(-INF, NAN)))
240 self.assertTrue(isnan(pow_op(-2.0, NAN)))
241 self.assertTrue(isnan(pow_op(-1.0, NAN)))
242 self.assertTrue(isnan(pow_op(-0.5, NAN)))
243 self.assertTrue(isnan(pow_op(-0.0, NAN)))
244 self.assertTrue(isnan(pow_op(0.0, NAN)))
245 self.assertTrue(isnan(pow_op(0.5, NAN)))
246 self.assertTrue(isnan(pow_op(2.0, NAN)))
247 self.assertTrue(isnan(pow_op(INF, NAN)))
248 self.assertTrue(isnan(pow_op(NAN, NAN)))
250 # NAN**y is NAN for any y except +-0
251 self.assertTrue(isnan(pow_op(NAN, -INF)))
252 self.assertTrue(isnan(pow_op(NAN, -2.0)))
253 self.assertTrue(isnan(pow_op(NAN, -1.0)))
254 self.assertTrue(isnan(pow_op(NAN, -0.5)))
255 self.assertTrue(isnan(pow_op(NAN, 0.5)))
256 self.assertTrue(isnan(pow_op(NAN, 1.0)))
257 self.assertTrue(isnan(pow_op(NAN, 2.0)))
258 self.assertTrue(isnan(pow_op(NAN, INF)))
296 self.assertEqualAndEqualSign(pow_op(1.0, NAN), 1.0)
309 self.assertEqualAndEqualSign(pow_op(NAN, 0.0), 1.0)
320 self.assertEqualAndEqualSign(pow_op(NAN, -0.0), 1.0)
606 self.assertEqual('{0:f}'.format(NAN), 'nan')
607 self.assertEqual('{0:F}'.format(NAN), 'NAN')
712 self.assertTrue(math.isnan(round(NAN)))
716 self.assertTrue(math.isnan(round(NAN, n)))
720 self.assertRaises(TypeError, round, NAN, "ceci n'est pas un integer")
851 test(fmt, NAN, 'nan')
852 test(fmt, -NAN, 'nan')
857 test(pfmt, NAN, '+nan')
858 test(pfmt, -NAN, '+nan')
863 test(sfmt, NAN, ' nan')
864 test(sfmt, -NAN, ' nan')
926 self.assertEqual(repr(float("NAN")), "nan")
949 self.assertTrue(NAN.is_nan())
955 self.assertFalse(NAN.is_inf())
1059 ('nan', NAN),
1098 self.identical(fromHex('nan'), NAN)
1099 self.identical(fromHex('+NaN'), NAN)
1100 self.identical(fromHex('-NaN'), NAN)
1101 self.identical(fromHex('-nAN'), NAN)
1371 for x in [NAN, INF, self.MAX, self.MIN, self.MIN-self.TINY, self.TINY, 0.0]: