@@ -1970,16 +1970,15 @@ def test_nextafter(self):
19701970 self .assertEqualSign (math .nextafter (+ 0.0 , - 0.0 ), - 0.0 )
19711971
19721972 # around 0.0
1973- # TODO: RUSTPYTHON
1974- # smallest_subnormal = sys.float_info.min * sys.float_info.epsilon
1975- # self.assertEqual(math.nextafter(+0.0, INF), smallest_subnormal)
1976- # self.assertEqual(math.nextafter(-0.0, INF), smallest_subnormal)
1977- # self.assertEqual(math.nextafter(+0.0, -INF), -smallest_subnormal)
1978- # self.assertEqual(math.nextafter(-0.0, -INF), -smallest_subnormal)
1979- # self.assertEqualSign(math.nextafter(smallest_subnormal, +0.0), +0.0)
1980- # self.assertEqualSign(math.nextafter(-smallest_subnormal, +0.0), -0.0)
1981- # self.assertEqualSign(math.nextafter(smallest_subnormal, -0.0), +0.0)
1982- # self.assertEqualSign(math.nextafter(-smallest_subnormal, -0.0), -0.0)
1973+ smallest_subnormal = sys .float_info .min * sys .float_info .epsilon
1974+ self .assertEqual (math .nextafter (+ 0.0 , INF ), smallest_subnormal )
1975+ self .assertEqual (math .nextafter (- 0.0 , INF ), smallest_subnormal )
1976+ self .assertEqual (math .nextafter (+ 0.0 , - INF ), - smallest_subnormal )
1977+ self .assertEqual (math .nextafter (- 0.0 , - INF ), - smallest_subnormal )
1978+ self .assertEqualSign (math .nextafter (smallest_subnormal , + 0.0 ), + 0.0 )
1979+ self .assertEqualSign (math .nextafter (- smallest_subnormal , + 0.0 ), - 0.0 )
1980+ self .assertEqualSign (math .nextafter (smallest_subnormal , - 0.0 ), + 0.0 )
1981+ self .assertEqualSign (math .nextafter (- smallest_subnormal , - 0.0 ), - 0.0 )
19831982
19841983 # around infinity
19851984 largest_normal = sys .float_info .max
@@ -2002,9 +2001,8 @@ def test_ulp(self):
20022001 self .assertEqual (math .ulp (2 ** 64 ), 4096.0 )
20032002
20042003 # min and max
2005- # TODO: RUSTPYTHON
2006- # self.assertEqual(math.ulp(0.0),
2007- # sys.float_info.min * sys.float_info.epsilon)
2004+ self .assertEqual (math .ulp (0.0 ),
2005+ sys .float_info .min * sys .float_info .epsilon )
20082006 self .assertEqual (math .ulp (FLOAT_MAX ),
20092007 FLOAT_MAX - math .nextafter (FLOAT_MAX , - INF ))
20102008
0 commit comments