Lines Matching defs:INF
7 INF = float("inf")
461 self.assertEqual(repr(complex(1., INF)), "(1+infj)")
462 self.assertEqual(repr(complex(1., -INF)), "(1-infj)")
463 self.assertEqual(repr(complex(INF, 1)), "(inf+1j)")
464 self.assertEqual(repr(complex(-INF, INF)), "(-inf+infj)")
469 self.assertEqual(repr(complex(0, INF)), "infj")
470 self.assertEqual(repr(complex(0, -INF)), "-infj")
497 self.assertEqual(complex(0, INF).__getnewargs__(), (0.0, INF))
498 self.assertEqual(complex(INF, 0).__getnewargs__(), (INF, 0.0))
510 self.assertEqual(complex("1e500"), complex(INF, 0.0))
511 self.assertEqual(complex("-1e500j"), complex(0.0, -INF))
512 self.assertEqual(complex("-1e500+1.8e308j"), complex(-INF, INF))
517 vals = [0.0, 1e-500, 1e-315, 1e-200, 0.0123, 3.1415, 1e50, INF, NAN]
531 inf, nan = float('inf'), float('nan')
532 infj, nanj = complex(0.0, inf), complex(0.0, nan)
626 # issue 3382: 'f' and 'F' with inf's and nan's
627 self.assertEqual('{0:f}'.format(INF+0j), 'inf+0.000000j')
628 self.assertEqual('{0:F}'.format(INF+0j), 'INF+0.000000j')
629 self.assertEqual('{0:f}'.format(-INF+0j), '-inf+0.000000j')
630 self.assertEqual('{0:F}'.format(-INF+0j), '-INF+0.000000j')
631 self.assertEqual('{0:f}'.format(complex(INF, INF)), 'inf+infj')
632 self.assertEqual('{0:F}'.format(complex(INF, INF)), 'INF+INFj')
633 self.assertEqual('{0:f}'.format(complex(INF, -INF)), 'inf-infj')
634 self.assertEqual('{0:F}'.format(complex(INF, -INF)), 'INF-INFj')
635 self.assertEqual('{0:f}'.format(complex(-INF, INF)), '-inf+infj')
636 self.assertEqual('{0:F}'.format(complex(-INF, INF)), '-INF+INFj')
637 self.assertEqual('{0:f}'.format(complex(-INF, -INF)), '-inf-infj')
638 self.assertEqual('{0:F}'.format(complex(-INF, -INF)), '-INF-INFj')