@@ -111,25 +111,25 @@ impl MaybeOverride<(f32,)> for SpecialCase {
111
111
ctx : & CheckCtx ,
112
112
) -> Option < TestResult > {
113
113
if ctx. basis == CheckBasis :: Musl {
114
- if ctx. fn_name_str == "expm1f" && input. 0 > 80.0 && actual. is_infinite ( ) {
114
+ if ctx. fn_name == "expm1f" && input. 0 > 80.0 && actual. is_infinite ( ) {
115
115
// we return infinity but the number is representable
116
116
return XFAIL ;
117
117
}
118
118
119
- if ctx. fn_name_str == "sinhf" && input. 0 . abs ( ) > 80.0 && actual. is_nan ( ) {
119
+ if ctx. fn_name == "sinhf" && input. 0 . abs ( ) > 80.0 && actual. is_nan ( ) {
120
120
// we return some NaN that should be real values or infinite
121
121
// doesn't seem to happen on x86
122
122
return XFAIL ;
123
123
}
124
124
}
125
125
126
- if ctx. fn_name_str == "acoshf" && input. 0 < -1.0 {
126
+ if ctx. fn_name == "acoshf" && input. 0 < -1.0 {
127
127
// acoshf is undefined for x <= 1.0, but we return a random result at lower
128
128
// values.
129
129
return XFAIL ;
130
130
}
131
131
132
- if ctx. fn_name_str == "lgammaf" || ctx. fn_name_str == "lgammaf_r" && input. 0 < 0.0 {
132
+ if ctx. fn_name == "lgammaf" || ctx. fn_name == "lgammaf_r" && input. 0 < 0.0 {
133
133
// loggamma should not be defined for x < 0, yet we both return results
134
134
return XFAIL ;
135
135
}
@@ -146,7 +146,7 @@ impl MaybeOverride<(f32,)> for SpecialCase {
146
146
// On MPFR for lgammaf_r, we set -1 as the integer result for negative infinity but MPFR
147
147
// sets +1
148
148
if ctx. basis == CheckBasis :: Mpfr
149
- && ctx. fn_name_str == "lgammaf_r"
149
+ && ctx. fn_name == "lgammaf_r"
150
150
&& input. 0 == f32:: NEG_INFINITY
151
151
&& actual. abs ( ) == expected. abs ( )
152
152
{
@@ -166,13 +166,13 @@ impl MaybeOverride<(f64,)> for SpecialCase {
166
166
ctx : & CheckCtx ,
167
167
) -> Option < TestResult > {
168
168
if ctx. basis == CheckBasis :: Musl {
169
- if cfg ! ( target_arch = "x86" ) && ctx. fn_name_str == "acosh" && input. 0 < 1.0 {
169
+ if cfg ! ( target_arch = "x86" ) && ctx. fn_name == "acosh" && input. 0 < 1.0 {
170
170
// The function is undefined, both implementations return random results
171
171
return SKIP ;
172
172
}
173
173
174
174
if cfg ! ( x86_no_sse)
175
- && ctx. fn_name_str == "ceil"
175
+ && ctx. fn_name == "ceil"
176
176
&& input. 0 < 0.0
177
177
&& input. 0 > -1.0
178
178
&& expected == F :: ZERO
@@ -183,13 +183,13 @@ impl MaybeOverride<(f64,)> for SpecialCase {
183
183
}
184
184
}
185
185
186
- if ctx. fn_name_str == "acosh" && input. 0 < 1.0 {
186
+ if ctx. fn_name == "acosh" && input. 0 < 1.0 {
187
187
// The function is undefined for the inputs, musl and our libm both return
188
188
// random results.
189
189
return XFAIL ;
190
190
}
191
191
192
- if ctx. fn_name_str == "lgamma" || ctx. fn_name_str == "lgamma_r" && input. 0 < 0.0 {
192
+ if ctx. fn_name == "lgamma" || ctx. fn_name == "lgamma_r" && input. 0 < 0.0 {
193
193
// loggamma should not be defined for x < 0, yet we both return results
194
194
return XFAIL ;
195
195
}
@@ -206,7 +206,7 @@ impl MaybeOverride<(f64,)> for SpecialCase {
206
206
// On MPFR for lgamma_r, we set -1 as the integer result for negative infinity but MPFR
207
207
// sets +1
208
208
if ctx. basis == CheckBasis :: Mpfr
209
- && ctx. fn_name_str == "lgamma_r"
209
+ && ctx. fn_name == "lgamma_r"
210
210
&& input. 0 == f64:: NEG_INFINITY
211
211
&& actual. abs ( ) == expected. abs ( )
212
212
{
@@ -308,7 +308,7 @@ impl MaybeOverride<(i32, f32)> for SpecialCase {
308
308
CheckBasis :: Musl => bessel_prec_dropoff ( input, ulp, ctx) ,
309
309
CheckBasis :: Mpfr => {
310
310
// We return +0.0, MPFR returns -0.0
311
- if ctx. fn_name_str == "jnf"
311
+ if ctx. fn_name == "jnf"
312
312
&& input. 1 == f32:: NEG_INFINITY
313
313
&& actual == F :: ZERO
314
314
&& expected == F :: ZERO
@@ -333,7 +333,7 @@ impl MaybeOverride<(i32, f64)> for SpecialCase {
333
333
CheckBasis :: Musl => bessel_prec_dropoff ( input, ulp, ctx) ,
334
334
CheckBasis :: Mpfr => {
335
335
// We return +0.0, MPFR returns -0.0
336
- if ctx. fn_name_str == "jn"
336
+ if ctx. fn_name == "jn"
337
337
&& input. 1 == f64:: NEG_INFINITY
338
338
&& actual == F :: ZERO
339
339
&& expected == F :: ZERO
0 commit comments