Average Error: 33.7 → 33.7
Time: 41.6s
Precision: 64
\[\left|\left(\left(\tan^{-1}_* \frac{\mathsf{expm1}\left(\sin \left(\mathsf{expm1}\left(a\right)\right)\right)}{\tan^{-1} a}\right) \bmod a\right)\right|\]
\[\left|\left(\left(\log \left(e^{\tan^{-1}_* \frac{\mathsf{expm1}\left(\sin \left(\mathsf{expm1}\left(a\right)\right)\right)}{\tan^{-1} a}}\right)\right) \bmod a\right)\right|\]
\left|\left(\left(\tan^{-1}_* \frac{\mathsf{expm1}\left(\sin \left(\mathsf{expm1}\left(a\right)\right)\right)}{\tan^{-1} a}\right) \bmod a\right)\right|
\left|\left(\left(\log \left(e^{\tan^{-1}_* \frac{\mathsf{expm1}\left(\sin \left(\mathsf{expm1}\left(a\right)\right)\right)}{\tan^{-1} a}}\right)\right) \bmod a\right)\right|
double f(double a) {
        double r19146 = a;
        double r19147 = expm1(r19146);
        double r19148 = sin(r19147);
        double r19149 = expm1(r19148);
        double r19150 = atan(r19146);
        double r19151 = atan2(r19149, r19150);
        double r19152 = fmod(r19151, r19146);
        double r19153 = fabs(r19152);
        return r19153;
}

double f(double a) {
        double r19154 = a;
        double r19155 = expm1(r19154);
        double r19156 = sin(r19155);
        double r19157 = expm1(r19156);
        double r19158 = atan(r19154);
        double r19159 = atan2(r19157, r19158);
        double r19160 = exp(r19159);
        double r19161 = log(r19160);
        double r19162 = fmod(r19161, r19154);
        double r19163 = fabs(r19162);
        return r19163;
}

Error

Bits error versus a

Derivation

  1. Initial program 33.7

    \[\left|\left(\left(\tan^{-1}_* \frac{\mathsf{expm1}\left(\sin \left(\mathsf{expm1}\left(a\right)\right)\right)}{\tan^{-1} a}\right) \bmod a\right)\right|\]
  2. Using strategy rm
  3. Applied add-log-exp33.7

    \[\leadsto \left|\left(\color{blue}{\left(\log \left(e^{\tan^{-1}_* \frac{\mathsf{expm1}\left(\sin \left(\mathsf{expm1}\left(a\right)\right)\right)}{\tan^{-1} a}}\right)\right)} \bmod a\right)\right|\]
  4. Final simplification33.7

    \[\leadsto \left|\left(\left(\log \left(e^{\tan^{-1}_* \frac{\mathsf{expm1}\left(\sin \left(\mathsf{expm1}\left(a\right)\right)\right)}{\tan^{-1} a}}\right)\right) \bmod a\right)\right|\]

Reproduce

herbie shell --seed 2019196 +o rules:numerics
(FPCore (a)
  :name "Random Jason Timeout Test 006"
  (fabs (fmod (atan2 (expm1 (sin (expm1 a))) (atan a)) a)))