-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
I noticed that the scalar and simd xexpf versions seem to use slightly different constants to clamp to 0 or inf. In scalar, it is -104 and 104, but simd uses -104 and 100. Is this intentional?
Scalar
Lines 1174 to 1175 in 5533114
| if (d < -104) u = 0; | |
| if (d > 104) u = SLEEF_INFINITYf; |
SIMD
Lines 2047 to 2048 in 5533114
| u = vreinterpret_vf_vm(vandnot_vm_vo32_vm(vlt_vo_vf_vf(d, vcast_vf_f(-104)), vreinterpret_vm_vf(u))); | |
| u = vsel_vf_vo_vf_vf(vlt_vo_vf_vf(vcast_vf_f(100), d), vcast_vf_f(SLEEF_INFINITYf), u); |
It isn't really making a difference to me as I can guarantee the inputs will be inside that range, so mainly a curiosity question. Thanks for making this project, it is really nice.
Metadata
Metadata
Assignees
Labels
No labels