@@ -26,7 +26,7 @@ pub fn default_ulp(ctx: &CheckCtx) -> u32 {
26
26
// Overrides that apply to either basis
27
27
// FMA is expected to be infinite precision.
28
28
( _, Id :: Fma | Id :: Fmaf ) => 0 ,
29
- ( _, Id :: J0 | Id :: J0f | Id :: J1 | Id :: J1f | Id :: Y0 | Id :: Y0f | Id :: Y1 | Id :: Y1f ) => 800_000 ,
29
+ ( _, Id :: J0 | Id :: J0f | Id :: J1 | Id :: J1f | Id :: Y0 | Id :: Y0f | Id :: Y1 | Id :: Y1f ) => 8_000_000 ,
30
30
( _, Id :: Jn | Id :: Jnf | Id :: Yn | Id :: Ynf ) => 1000 ,
31
31
( _, Id :: Erfc | Id :: Erfcf ) => 4 ,
32
32
@@ -45,6 +45,7 @@ pub fn default_ulp(ctx: &CheckCtx) -> u32 {
45
45
( Mpfr , Id :: Acoshf ) => 4 ,
46
46
( Mpfr , Id :: Asinh | Id :: Asinhf ) => 2 ,
47
47
( Mpfr , Id :: Atanh | Id :: Atanhf ) => 2 ,
48
+ ( Mpfr , Id :: Atan2 | Id :: Atan2f ) => 2 ,
48
49
( Mpfr , Id :: Exp10 | Id :: Exp10f ) => 6 ,
49
50
( Mpfr , Id :: Lgamma | Id :: LgammaR | Id :: Lgammaf | Id :: LgammafR ) => 16 ,
50
51
( Mpfr , Id :: Sinh | Id :: Sinhf ) => 2 ,
@@ -128,6 +129,20 @@ impl MaybeOverride<(f32,)> for SpecialCase {
128
129
return XFAIL ;
129
130
}
130
131
132
+ if ( ctx. base_name == BaseName :: Lgamma || ctx. base_name == BaseName :: LgammaR )
133
+ && input. 0 > 4e36
134
+ && expected. is_infinite ( )
135
+ && !actual. is_infinite ( )
136
+ {
137
+ // This result should saturate but we return a finite value.
138
+ return XFAIL ;
139
+ }
140
+
141
+ if ctx. base_name == BaseName :: J0 && input. 0 < -1e34 {
142
+ // Errors get huge close to -inf
143
+ return XFAIL ;
144
+ }
145
+
131
146
maybe_check_nan_bits ( actual, expected, ctx)
132
147
}
133
148
@@ -189,6 +204,11 @@ impl MaybeOverride<(f64,)> for SpecialCase {
189
204
return XFAIL ;
190
205
}
191
206
207
+ if ctx. base_name == BaseName :: J0 && input. 0 < -1e300 {
208
+ // Errors get huge close to -inf
209
+ return XFAIL ;
210
+ }
211
+
192
212
maybe_check_nan_bits ( actual, expected, ctx)
193
213
}
194
214
@@ -305,6 +325,7 @@ impl MaybeOverride<(i32, f32)> for SpecialCase {
305
325
}
306
326
}
307
327
}
328
+
308
329
impl MaybeOverride < ( i32 , f64 ) > for SpecialCase {
309
330
fn check_float < F : Float > (
310
331
input : ( i32 , f64 ) ,
0 commit comments