@@ -1288,25 +1288,27 @@ end
1288
1288
end
1289
1289
1290
1290
@testset " fma" begin
1291
- for func in (fma, Base. fma_emulated)
1292
- @test func (nextfloat (1. ),nextfloat (1. ),- 1.0 ) === 4.440892098500626e-16
1293
- @test func (nextfloat (1f0 ),nextfloat (1f0 ),- 1f0 ) === 2.3841858f-7
1294
- @testset " $T " for T in (Float32, Float64)
1295
- @test func (floatmax (T), T (2 ), - floatmax (T)) === floatmax (T)
1296
- @test func (floatmax (T), T (1 ), eps (floatmax ((T)))) === T (Inf )
1297
- @test func (T (Inf ), T (Inf ), T (Inf )) === T (Inf )
1298
- @test isnan_type (T, func (T (Inf ), T (1 ), - T (Inf )))
1299
- @test isnan_type (T, func (T (Inf ), T (0 ), - T (0 )))
1300
- @test func (- zero (T), zero (T), - zero (T)) === - zero (T)
1301
- for _ in 1 : 2 ^ 18
1302
- a, b, c = reinterpret .(T, rand (Base. uinttype (T), 3 ))
1303
- @test isequal (func (a, b, c), fma (a, b, c)) || (a,b,c)
1291
+ if ! (@static Sys. iswindows () && Int=== Int64) # windows fma currently seems broken somehow.
1292
+ for func in (fma, Base. fma_emulated)
1293
+ @test func (nextfloat (1. ),nextfloat (1. ),- 1.0 ) === 4.440892098500626e-16
1294
+ @test func (nextfloat (1f0 ),nextfloat (1f0 ),- 1f0 ) === 2.3841858f-7
1295
+ @testset " $T " for T in (Float32, Float64)
1296
+ @test func (floatmax (T), T (2 ), - floatmax (T)) === floatmax (T)
1297
+ @test func (floatmax (T), T (1 ), eps (floatmax ((T)))) === T (Inf )
1298
+ @test func (T (Inf ), T (Inf ), T (Inf )) === T (Inf )
1299
+ @test isnan_type (T, func (T (Inf ), T (1 ), - T (Inf )))
1300
+ @test isnan_type (T, func (T (Inf ), T (0 ), - T (0 )))
1301
+ @test func (- zero (T), zero (T), - zero (T)) === - zero (T)
1302
+ for _ in 1 : 2 ^ 18
1303
+ a, b, c = reinterpret .(T, rand (Base. uinttype (T), 3 ))
1304
+ @test isequal (func (a, b, c), fma (a, b, c)) || (a,b,c)
1305
+ end
1304
1306
end
1307
+ @test func (floatmax (Float64), nextfloat (1.0 ), - floatmax (Float64)) === 3.991680619069439e292
1308
+ @test func (floatmax (Float32), nextfloat (1f0 ), - floatmax (Float32)) === 4.0564817f31
1309
+ @test func (1.6341681540852291e308 , - 2. , floatmax (Float64)) == - 1.4706431733081426e308 # case where inv(a)*c*a == Inf
1310
+ @test func (- 2. , 1.6341681540852291e308 , floatmax (Float64)) == - 1.4706431733081426e308 # case where inv(b)*c*b == Inf
1311
+ @test func (- 1.9369631f13 , 2.1513551f-7 , - 1.7354427f-24 ) == - 4.1670958f6
1305
1312
end
1306
- @test func (floatmax (Float64), nextfloat (1.0 ), - floatmax (Float64)) === 3.991680619069439e292
1307
- @test func (floatmax (Float32), nextfloat (1f0 ), - floatmax (Float32)) === 4.0564817f31
1308
- @test func (1.6341681540852291e308 , - 2. , floatmax (Float64)) == - 1.4706431733081426e308 # case where inv(a)*c*a == Inf
1309
- @test func (- 2. , 1.6341681540852291e308 , floatmax (Float64)) == - 1.4706431733081426e308 # case where inv(b)*c*b == Inf
1310
- @test func (- 1.9369631f13 , 2.1513551f-7 , - 1.7354427f-24 ) == - 4.1670958f6
1311
1313
end
1312
1314
end
0 commit comments