@@ -916,6 +916,7 @@ def testHypot(self):
916916
917917 @requires_IEEE_754
918918 @skip_if_double_rounding
919+ @support .skip_on_newlib
919920 def testHypotAccuracy (self ):
920921 # Verify improved accuracy in cases that were known to be inaccurate.
921922 #
@@ -1247,12 +1248,6 @@ def testLog2(self):
12471248 self .assertEqual (math .log2 (4 ), 2.0 )
12481249 self .assertEqual (math .log2 (MyIndexable (4 )), 2.0 )
12491250
1250- # Large integer values
1251- self .assertEqual (math .log2 (2 ** 1023 ), 1023.0 )
1252- self .assertEqual (math .log2 (2 ** 1024 ), 1024.0 )
1253- self .assertEqual (math .log2 (2 ** 2000 ), 2000.0 )
1254- self .assertEqual (math .log2 (MyIndexable (2 ** 2000 )), 2000.0 )
1255-
12561251 self .assertRaises (ValueError , math .log2 , 0.0 )
12571252 self .assertRaises (ValueError , math .log2 , 0 )
12581253 self .assertRaises (ValueError , math .log2 , MyIndexable (0 ))
@@ -1270,12 +1265,19 @@ def testLog2(self):
12701265 @requires_IEEE_754
12711266 # log2() is not accurate enough on Mac OS X Tiger (10.4)
12721267 @support .requires_mac_ver (10 , 5 )
1268+ @support .skip_on_newlib
12731269 def testLog2Exact (self ):
12741270 # Check that we get exact equality for log2 of powers of 2.
12751271 actual = [math .log2 (math .ldexp (1.0 , n )) for n in range (- 1074 , 1024 )]
12761272 expected = [float (n ) for n in range (- 1074 , 1024 )]
12771273 self .assertEqual (actual , expected )
12781274
1275+ # Large integer values
1276+ self .assertEqual (math .log2 (2 ** 1023 ), 1023.0 )
1277+ self .assertEqual (math .log2 (2 ** 1024 ), 1024.0 )
1278+ self .assertEqual (math .log2 (2 ** 2000 ), 2000.0 )
1279+ self .assertEqual (math .log2 (MyIndexable (2 ** 2000 )), 2000.0 )
1280+
12791281 def testLog10 (self ):
12801282 self .assertRaises (TypeError , math .log10 )
12811283 self .ftest ('log10(0.1)' , math .log10 (0.1 ), - 1 )
@@ -2607,6 +2609,7 @@ def test_fma_nan_results(self):
26072609 self .assertIsNaN (math .fma (a , math .nan , b ))
26082610 self .assertIsNaN (math .fma (a , b , math .nan ))
26092611
2612+ @support .skip_on_newlib
26102613 def test_fma_infinities (self ):
26112614 # Cases involving infinite inputs or results.
26122615 positives = [1e-300 , 2.3 , 1e300 , math .inf ]
@@ -2677,7 +2680,7 @@ def test_fma_infinities(self):
26772680 # gh-73468: On some platforms, libc fma() doesn't implement IEE 754-2008
26782681 # properly: it doesn't use the right sign when the result is zero.
26792682 @unittest .skipIf (
2680- sys .platform .startswith (("freebsd" , "wasi" , "netbsd" , "emscripten" ))
2683+ sys .platform .startswith (("freebsd" , "wasi" , "netbsd" , "emscripten" , "cygwin" ))
26812684 or (sys .platform == "android" and platform .machine () == "x86_64" )
26822685 or support .linked_to_musl (), # gh-131032
26832686 f"this platform doesn't implement IEE 754-2008 properly" )
@@ -2735,6 +2738,7 @@ def test_fma_zero_result(self):
27352738 self .assertIsNegativeZero (math .fma (y - x , - (x + y ), - z ))
27362739 self .assertIsPositiveZero (math .fma (x - y , - (x + y ), z ))
27372740
2741+ @support .skip_on_newlib
27382742 def test_fma_overflow (self ):
27392743 a = b = float .fromhex ('0x1p512' )
27402744 c = float .fromhex ('0x1p1023' )
@@ -2768,11 +2772,13 @@ def test_fma_overflow(self):
27682772 c = float .fromhex ('0x1.fffffffffffffp+1023' )
27692773 self .assertEqual (math .fma (a , b , - c ), c )
27702774
2775+ @support .skip_on_newlib
27712776 def test_fma_single_round (self ):
27722777 a = float .fromhex ('0x1p-50' )
27732778 self .assertEqual (math .fma (a - 1.0 , a + 1.0 , 1.0 ), a * a )
27742779
2775- def test_random (self ):
2780+ @support .skip_on_newlib
2781+ def test_fma_random (self ):
27762782 # A collection of randomly generated inputs for which the naive FMA
27772783 # (with two rounds) gives a different result from a singly-rounded FMA.
27782784
0 commit comments