@@ -251,17 +251,6 @@ def testAcosh(self):
251251 self .assertRaises (ValueError , math .acosh , NINF )
252252 self .assertTrue (math .isnan (math .acosh (NAN )))
253253
254- def testAcospi (self ):
255- self .assertRaises (TypeError , math .acospi )
256- self .ftest ('acospi(-1)' , math .acospi (- 1 ), 1 )
257- self .ftest ('acospi(0)' , math .acospi (0 ), 1 / 2 )
258- self .ftest ('acospi(1)' , math .acospi (1 ), 0 )
259- self .assertRaises (ValueError , math .acospi , INF )
260- self .assertRaises (ValueError , math .acospi , NINF )
261- self .assertRaises (ValueError , math .acospi , 1 + eps )
262- self .assertRaises (ValueError , math .acospi , - 1 - eps )
263- self .assertTrue (math .isnan (math .acospi (NAN )))
264-
265254 def testAsin (self ):
266255 self .assertRaises (TypeError , math .asin )
267256 self .ftest ('asin(-1)' , math .asin (- 1 ), - math .pi / 2 )
@@ -282,17 +271,6 @@ def testAsinh(self):
282271 self .assertEqual (math .asinh (NINF ), NINF )
283272 self .assertTrue (math .isnan (math .asinh (NAN )))
284273
285- def testAsinpi (self ):
286- self .assertRaises (TypeError , math .asinpi )
287- self .ftest ('asinpi(-1)' , math .asinpi (- 1 ), - 1 / 2 )
288- self .ftest ('asinpi(0)' , math .asinpi (0 ), 0 )
289- self .ftest ('asinpi(1)' , math .asinpi (1 ), 1 / 2 )
290- self .assertRaises (ValueError , math .asinpi , INF )
291- self .assertRaises (ValueError , math .asinpi , NINF )
292- self .assertRaises (ValueError , math .asinpi , 1 + eps )
293- self .assertRaises (ValueError , math .asinpi , - 1 - eps )
294- self .assertTrue (math .isnan (math .asinpi (NAN )))
295-
296274 def testAtan (self ):
297275 self .assertRaises (TypeError , math .atan )
298276 self .ftest ('atan(-1)' , math .atan (- 1 ), - math .pi / 4 )
@@ -313,15 +291,6 @@ def testAtanh(self):
313291 self .assertRaises (ValueError , math .atanh , NINF )
314292 self .assertTrue (math .isnan (math .atanh (NAN )))
315293
316- def testAtanpi (self ):
317- self .assertRaises (TypeError , math .atanpi )
318- self .ftest ('atanpi(-1)' , math .atanpi (- 1 ), - 1 / 4 )
319- self .ftest ('atanpi(0)' , math .atanpi (0 ), 0 )
320- self .ftest ('atanpi(1)' , math .atanpi (1 ), 1 / 4 )
321- self .ftest ('atanpi(inf)' , math .atanpi (INF ), 1 / 2 )
322- self .ftest ('atanpi(-inf)' , math .atanpi (NINF ), - 1 / 2 )
323- self .assertTrue (math .isnan (math .atanpi (NAN )))
324-
325294 @unittest .skipIf (sys .platform .startswith ("sunos" ),
326295 "skipping, see gh-138573" )
327296 def testAtan2 (self ):
@@ -386,70 +355,6 @@ def testAtan2(self):
386355 self .assertTrue (math .isnan (math .atan2 (NAN , INF )))
387356 self .assertTrue (math .isnan (math .atan2 (NAN , NAN )))
388357
389- @unittest .skipIf (sys .platform .startswith ("sunos" ),
390- "skipping, see gh-138573" )
391- def testAtanpi2 (self ):
392- self .assertRaises (TypeError , math .atan2pi )
393- self .ftest ('atan2pi(-1, 0)' , math .atan2pi (- 1 , 0 ), - 1 / 2 )
394- self .ftest ('atan2pi(-1, 1)' , math .atan2pi (- 1 , 1 ), - 1 / 4 )
395- self .ftest ('atan2pi(0, 1)' , math .atan2pi (0 , 1 ), 0 )
396- self .ftest ('atan2pi(1, 1)' , math .atan2pi (1 , 1 ), 1 / 4 )
397- self .ftest ('atan2pi(1, 0)' , math .atan2pi (1 , 0 ), 1 / 2 )
398- self .ftest ('atan2pi(1, -1)' , math .atan2pi (1 , - 1 ), 3 / 4 )
399-
400- # math.atan2pi(0, x)
401- self .ftest ('atan2pi(0., -inf)' , math .atan2pi (0. , NINF ), 1 )
402- self .ftest ('atan2pi(0., -2.3)' , math .atan2pi (0. , - 2.3 ), 1 )
403- self .ftest ('atan2pi(0., -0.)' , math .atan2pi (0. , - 0. ), 1 )
404- self .assertEqual (math .atan2pi (0. , 0. ), 0. )
405- self .assertEqual (math .atan2pi (0. , 2.3 ), 0. )
406- self .assertEqual (math .atan2pi (0. , INF ), 0. )
407- self .assertTrue (math .isnan (math .atan2pi (0. , NAN )))
408- # math.atan2pi(-0, x)
409- self .ftest ('atan2pi(-0., -inf)' , math .atan2pi (- 0. , NINF ), - 1 )
410- self .ftest ('atan2pi(-0., -2.3)' , math .atan2pi (- 0. , - 2.3 ), - 1 )
411- self .ftest ('atan2pi(-0., -0.)' , math .atan2pi (- 0. , - 0. ), - 1 )
412- self .assertEqual (math .atan2pi (- 0. , 0. ), - 0. )
413- self .assertEqual (math .atan2pi (- 0. , 2.3 ), - 0. )
414- self .assertEqual (math .atan2pi (- 0. , INF ), - 0. )
415- self .assertTrue (math .isnan (math .atan2pi (- 0. , NAN )))
416- # math.atan2pi(INF, x)
417- self .ftest ('atan2pi(inf, -inf)' , math .atan2pi (INF , NINF ), 3 / 4 )
418- self .ftest ('atan2pi(inf, -2.3)' , math .atan2pi (INF , - 2.3 ), 1 / 2 )
419- self .ftest ('atan2pi(inf, -0.)' , math .atan2pi (INF , - 0.0 ), 1 / 2 )
420- self .ftest ('atan2pi(inf, 0.)' , math .atan2pi (INF , 0.0 ), 1 / 2 )
421- self .ftest ('atan2pi(inf, 2.3)' , math .atan2pi (INF , 2.3 ), 1 / 2 )
422- self .ftest ('atan2pi(inf, inf)' , math .atan2pi (INF , INF ), 1 / 4 )
423- self .assertTrue (math .isnan (math .atan2pi (INF , NAN )))
424- # math.atan2pi(NINF, x)
425- self .ftest ('atan2pi(-inf, -inf)' , math .atan2pi (NINF , NINF ), - 3 / 4 )
426- self .ftest ('atan2pi(-inf, -2.3)' , math .atan2pi (NINF , - 2.3 ), - 1 / 2 )
427- self .ftest ('atan2pi(-inf, -0.)' , math .atan2pi (NINF , - 0.0 ), - 1 / 2 )
428- self .ftest ('atan2pi(-inf, 0.)' , math .atan2pi (NINF , 0.0 ), - 1 / 2 )
429- self .ftest ('atan2pi(-inf, 2.3)' , math .atan2pi (NINF , 2.3 ), - 1 / 2 )
430- self .ftest ('atan2pi(-inf, inf)' , math .atan2pi (NINF , INF ), - 1 / 4 )
431- self .assertTrue (math .isnan (math .atan2pi (NINF , NAN )))
432- # math.atan2pi(+finite, x)
433- self .ftest ('atan2pi(2.3, -inf)' , math .atan2pi (2.3 , NINF ), 1 )
434- self .ftest ('atan2pi(2.3, -0.)' , math .atan2pi (2.3 , - 0. ), 1 / 2 )
435- self .ftest ('atan2pi(2.3, 0.)' , math .atan2pi (2.3 , 0. ), 1 / 2 )
436- self .assertEqual (math .atan2pi (2.3 , INF ), 0. )
437- self .assertTrue (math .isnan (math .atan2pi (2.3 , NAN )))
438- # math.atan2pi(-finite, x)
439- self .ftest ('atan2pi(-2.3, -inf)' , math .atan2pi (- 2.3 , NINF ), - 1 )
440- self .ftest ('atan2pi(-2.3, -0.)' , math .atan2pi (- 2.3 , - 0. ), - 1 / 2 )
441- self .ftest ('atan2pi(-2.3, 0.)' , math .atan2pi (- 2.3 , 0. ), - 1 / 2 )
442- self .assertEqual (math .atan2pi (- 2.3 , INF ), - 0. )
443- self .assertTrue (math .isnan (math .atan2pi (- 2.3 , NAN )))
444- # math.atan2pi(NAN, x)
445- self .assertTrue (math .isnan (math .atan2pi (NAN , NINF )))
446- self .assertTrue (math .isnan (math .atan2pi (NAN , - 2.3 )))
447- self .assertTrue (math .isnan (math .atan2pi (NAN , - 0. )))
448- self .assertTrue (math .isnan (math .atan2pi (NAN , 0. )))
449- self .assertTrue (math .isnan (math .atan2pi (NAN , 2.3 )))
450- self .assertTrue (math .isnan (math .atan2pi (NAN , INF )))
451- self .assertTrue (math .isnan (math .atan2pi (NAN , NAN )))
452-
453358 def testCbrt (self ):
454359 self .assertRaises (TypeError , math .cbrt )
455360 self .ftest ('cbrt(0)' , math .cbrt (0 ), 0 )
@@ -576,20 +481,6 @@ def testCosh(self):
576481 self .assertEqual (math .cosh (NINF ), INF )
577482 self .assertTrue (math .isnan (math .cosh (NAN )))
578483
579- def testCospi (self ):
580- self .assertRaises (TypeError , math .cospi )
581- self .ftest ('cospi(-1/2)' , math .cospi (- 1 / 2 ), 0 )
582- self .ftest ('cospi(0)' , math .cospi (0 ), 1 )
583- self .ftest ('cospi(1/2)' , math .cospi (1 / 2 ), 0 )
584- self .ftest ('cospi(1)' , math .cospi (1 ), - 1 )
585- try :
586- self .assertTrue (math .isnan (math .cospi (INF )))
587- self .assertTrue (math .isnan (math .cospi (NINF )))
588- except ValueError :
589- self .assertRaises (ValueError , math .cospi , INF )
590- self .assertRaises (ValueError , math .cospi , NINF )
591- self .assertTrue (math .isnan (math .cospi (NAN )))
592-
593484 def testDegrees (self ):
594485 self .assertRaises (TypeError , math .degrees )
595486 self .ftest ('degrees(pi)' , math .degrees (math .pi ), 180.0 )
@@ -2035,19 +1926,6 @@ def testSqrt(self):
20351926 self .assertRaises (ValueError , math .sqrt , NINF )
20361927 self .assertTrue (math .isnan (math .sqrt (NAN )))
20371928
2038- def testSinpy (self ):
2039- self .assertRaises (TypeError , math .sinpi )
2040- self .ftest ('sinpi(0)' , math .sinpi (0 ), 0 )
2041- self .ftest ('sinpi(1/2)' , math .sinpi (1 / 2 ), 1 )
2042- self .ftest ('sinpi(-1/2)' , math .sinpi (- 1 / 2 ), - 1 )
2043- try :
2044- self .assertTrue (math .isnan (math .sinpi (INF )))
2045- self .assertTrue (math .isnan (math .sinpi (NINF )))
2046- except ValueError :
2047- self .assertRaises (ValueError , math .sinpi , INF )
2048- self .assertRaises (ValueError , math .sinpi , NINF )
2049- self .assertTrue (math .isnan (math .sinpi (NAN )))
2050-
20511929 def testTan (self ):
20521930 self .assertRaises (TypeError , math .tan )
20531931 self .ftest ('tan(0)' , math .tan (0 ), 0 )
@@ -2109,20 +1987,6 @@ class TestBadTrunc:
21091987 self .assertRaises (TypeError , math .trunc , TestNoTrunc ())
21101988 self .assertRaises (ValueError , math .trunc , TestBadTrunc ())
21111989
2112- def testTanpi (self ):
2113- self .assertRaises (TypeError , math .tanpi )
2114- self .ftest ('tanpi(0)' , math .tanpi (0 ), 0 )
2115- self .ftest ('tanpi(1/4)' , math .tanpi (1 / 4 ), 1 )
2116- self .ftest ('tanpi(-1/4)' , math .tanpi (- 1 / 4 ), - 1 )
2117- try :
2118- self .assertTrue (math .isnan (math .tanpi (INF )))
2119- self .assertTrue (math .isnan (math .tanpi (NINF )))
2120- except ValueError :
2121- self .assertRaises (ValueError , math .tanpi , INF )
2122- self .assertRaises (ValueError , math .tanpi , NINF )
2123- self .assertTrue (math .isnan (math .tanpi (NAN )))
2124-
2125-
21261990 def testIsfinite (self ):
21271991 self .assertTrue (math .isfinite (0.0 ))
21281992 self .assertTrue (math .isfinite (- 0.0 ))
0 commit comments