@@ -111,25 +111,25 @@ impl MaybeOverride<(f32,)> for SpecialCase {
111111 ctx : & CheckCtx ,
112112 ) -> Option < TestResult > {
113113 if ctx. basis == CheckBasis :: Musl {
114- if ctx. fn_name == "expm1f" && input. 0 > 80.0 && actual. is_infinite ( ) {
114+ if ctx. fn_name_str == "expm1f" && input. 0 > 80.0 && actual. is_infinite ( ) {
115115 // we return infinity but the number is representable
116116 return XFAIL ;
117117 }
118118
119- if ctx. fn_name == "sinhf" && input. 0 . abs ( ) > 80.0 && actual. is_nan ( ) {
119+ if ctx. fn_name_str == "sinhf" && input. 0 . abs ( ) > 80.0 && actual. is_nan ( ) {
120120 // we return some NaN that should be real values or infinite
121121 // doesn't seem to happen on x86
122122 return XFAIL ;
123123 }
124124 }
125125
126- if ctx. fn_name == "acoshf" && input. 0 < -1.0 {
126+ if ctx. fn_name_str == "acoshf" && input. 0 < -1.0 {
127127 // acoshf is undefined for x <= 1.0, but we return a random result at lower
128128 // values.
129129 return XFAIL ;
130130 }
131131
132- if ctx. fn_name == "lgammaf" || ctx. fn_name == "lgammaf_r" && input. 0 < 0.0 {
132+ if ctx. fn_name_str == "lgammaf" || ctx. fn_name_str == "lgammaf_r" && input. 0 < 0.0 {
133133 // loggamma should not be defined for x < 0, yet we both return results
134134 return XFAIL ;
135135 }
@@ -146,7 +146,7 @@ impl MaybeOverride<(f32,)> for SpecialCase {
146146 // On MPFR for lgammaf_r, we set -1 as the integer result for negative infinity but MPFR
147147 // sets +1
148148 if ctx. basis == CheckBasis :: Mpfr
149- && ctx. fn_name == "lgammaf_r"
149+ && ctx. fn_name_str == "lgammaf_r"
150150 && input. 0 == f32:: NEG_INFINITY
151151 && actual. abs ( ) == expected. abs ( )
152152 {
@@ -166,13 +166,13 @@ impl MaybeOverride<(f64,)> for SpecialCase {
166166 ctx : & CheckCtx ,
167167 ) -> Option < TestResult > {
168168 if ctx. basis == CheckBasis :: Musl {
169- if cfg ! ( target_arch = "x86" ) && ctx. fn_name == "acosh" && input. 0 < 1.0 {
169+ if cfg ! ( target_arch = "x86" ) && ctx. fn_name_str == "acosh" && input. 0 < 1.0 {
170170 // The function is undefined, both implementations return random results
171171 return SKIP ;
172172 }
173173
174174 if cfg ! ( x86_no_sse)
175- && ctx. fn_name == "ceil"
175+ && ctx. fn_name_str == "ceil"
176176 && input. 0 < 0.0
177177 && input. 0 > -1.0
178178 && expected == F :: ZERO
@@ -183,13 +183,13 @@ impl MaybeOverride<(f64,)> for SpecialCase {
183183 }
184184 }
185185
186- if ctx. fn_name == "acosh" && input. 0 < 1.0 {
186+ if ctx. fn_name_str == "acosh" && input. 0 < 1.0 {
187187 // The function is undefined for the inputs, musl and our libm both return
188188 // random results.
189189 return XFAIL ;
190190 }
191191
192- if ctx. fn_name == "lgamma" || ctx. fn_name == "lgamma_r" && input. 0 < 0.0 {
192+ if ctx. fn_name_str == "lgamma" || ctx. fn_name_str == "lgamma_r" && input. 0 < 0.0 {
193193 // loggamma should not be defined for x < 0, yet we both return results
194194 return XFAIL ;
195195 }
@@ -206,7 +206,7 @@ impl MaybeOverride<(f64,)> for SpecialCase {
206206 // On MPFR for lgamma_r, we set -1 as the integer result for negative infinity but MPFR
207207 // sets +1
208208 if ctx. basis == CheckBasis :: Mpfr
209- && ctx. fn_name == "lgamma_r"
209+ && ctx. fn_name_str == "lgamma_r"
210210 && input. 0 == f64:: NEG_INFINITY
211211 && actual. abs ( ) == expected. abs ( )
212212 {
@@ -219,7 +219,7 @@ impl MaybeOverride<(f64,)> for SpecialCase {
219219
220220/// Check NaN bits if the function requires it
221221fn maybe_check_nan_bits < F : Float > ( actual : F , expected : F , ctx : & CheckCtx ) -> Option < TestResult > {
222- if !( ctx. base_name == "fabs" || ctx. base_name == "copysign" ) {
222+ if !( ctx. base_name_str == "fabs" || ctx. base_name_str == "copysign" ) {
223223 return None ;
224224 }
225225
@@ -277,7 +277,7 @@ fn maybe_skip_binop_nan<F1: Float, F2: Float>(
277277) -> Option < TestResult > {
278278 match ctx. basis {
279279 CheckBasis :: Musl => {
280- if ( ctx. base_name == "fmax" || ctx. base_name == "fmin" )
280+ if ( ctx. base_name_str == "fmax" || ctx. base_name_str == "fmin" )
281281 && ( input. 0 . is_nan ( ) || input. 1 . is_nan ( ) )
282282 && expected. is_nan ( )
283283 {
@@ -287,7 +287,7 @@ fn maybe_skip_binop_nan<F1: Float, F2: Float>(
287287 }
288288 }
289289 CheckBasis :: Mpfr => {
290- if ctx. base_name == "copysign" && input. 1 . is_nan ( ) {
290+ if ctx. base_name_str == "copysign" && input. 1 . is_nan ( ) {
291291 SKIP
292292 } else {
293293 None
@@ -308,7 +308,7 @@ impl MaybeOverride<(i32, f32)> for SpecialCase {
308308 CheckBasis :: Musl => bessel_prec_dropoff ( input, ulp, ctx) ,
309309 CheckBasis :: Mpfr => {
310310 // We return +0.0, MPFR returns -0.0
311- if ctx. fn_name == "jnf"
311+ if ctx. fn_name_str == "jnf"
312312 && input. 1 == f32:: NEG_INFINITY
313313 && actual == F :: ZERO
314314 && expected == F :: ZERO
@@ -333,7 +333,7 @@ impl MaybeOverride<(i32, f64)> for SpecialCase {
333333 CheckBasis :: Musl => bessel_prec_dropoff ( input, ulp, ctx) ,
334334 CheckBasis :: Mpfr => {
335335 // We return +0.0, MPFR returns -0.0
336- if ctx. fn_name == "jn"
336+ if ctx. fn_name_str == "jn"
337337 && input. 1 == f64:: NEG_INFINITY
338338 && actual == F :: ZERO
339339 && expected == F :: ZERO
@@ -353,7 +353,7 @@ fn bessel_prec_dropoff<F: Float>(
353353 ulp : & mut u32 ,
354354 ctx : & CheckCtx ,
355355) -> Option < TestResult > {
356- if ctx. base_name == "jn" {
356+ if ctx. base_name_str == "jn" {
357357 if input. 0 > 4000 {
358358 return XFAIL ;
359359 } else if input. 0 > 2000 {
0 commit comments