Lines Matching refs:INF
10 INF = float("inf") variable
398 for x in 0.0, -0.0, INF, -INF, NAN:
399 for y in 0.0, -0.0, INF, -INF, NAN:
450 test(complex(1., INF), "(1+infj)")
451 test(complex(1., -INF), "(1-infj)")
452 test(complex(INF, 1), "(inf+1j)")
453 test(complex(-INF, INF), "(-inf+infj)")
458 test(complex(0, INF), "infj")
459 test(complex(0, -INF), "-infj")
507 self.assertEqual(complex(0, INF).__getnewargs__(), (0.0, INF))
508 self.assertEqual(complex(INF, 0).__getnewargs__(), (INF, 0.0))
531 self.assertFloatsAreIdentical(z2.imag, -INF)
535 self.assertEqual(complex("1e500"), complex(INF, 0.0))
536 self.assertEqual(complex("-1e500j"), complex(0.0, -INF))
537 self.assertEqual(complex("-1e500+1.8e308j"), complex(-INF, INF))
541 vals = [0.0, 1e-500, 1e-315, 1e-200, 0.0123, 3.1415, 1e50, INF, NAN]
679 self.assertEqual(format(complex(INF, INF), 'f'), 'inf+infj')
680 self.assertEqual(format(complex(1, INF), 'f'), '1.000000+infj')
681 self.assertEqual(format(complex(INF, 1), 'f'), 'inf+1.000000j')
682 self.assertEqual(format(complex(INF, -1), 'f'), 'inf-1.000000j')
683 self.assertEqual(format(complex(INF, INF), 'F'), 'INF+INFj')
684 self.assertEqual(format(complex(1, INF), 'F'), '1.000000+INFj')
685 self.assertEqual(format(complex(INF, 1), 'F'), 'INF+1.000000j')
686 self.assertEqual(format(complex(INF, -1), 'F'), 'INF-1.000000j')