Average Error: 0.8 → 0.8
Time: 3.6s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\left(\left(\frac{1}{\sqrt{\log 10}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\left(\left(\frac{1}{\sqrt{\log 10}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}
double f(double re, double im) {
        double r29428 = im;
        double r29429 = re;
        double r29430 = atan2(r29428, r29429);
        double r29431 = 10.0;
        double r29432 = log(r29431);
        double r29433 = r29430 / r29432;
        return r29433;
}

double f(double re, double im) {
        double r29434 = 1.0;
        double r29435 = 10.0;
        double r29436 = log(r29435);
        double r29437 = sqrt(r29436);
        double r29438 = r29434 / r29437;
        double r29439 = im;
        double r29440 = re;
        double r29441 = atan2(r29439, r29440);
        double r29442 = r29434 / r29436;
        double r29443 = sqrt(r29442);
        double r29444 = r29441 * r29443;
        double r29445 = cbrt(r29444);
        double r29446 = r29438 * r29445;
        double r29447 = r29446 * r29445;
        double r29448 = expm1(r29444);
        double r29449 = log1p(r29448);
        double r29450 = cbrt(r29449);
        double r29451 = r29447 * r29450;
        return r29451;
}

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.8

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.8

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\]
  4. Applied *-un-lft-identity0.8

    \[\leadsto \frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}}\]
  5. Applied times-frac0.8

    \[\leadsto \color{blue}{\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\]
  6. Taylor expanded around 0 0.8

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)}\]
  7. Using strategy rm
  8. Applied log1p-expm1-u0.8

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\]
  9. Using strategy rm
  10. Applied add-cube-cbrt1.0

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\left(\sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)} \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\right) \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\right)}\]
  11. Applied associate-*r*1.0

    \[\leadsto \color{blue}{\left(\frac{1}{\sqrt{\log 10}} \cdot \left(\sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)} \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\right)\right) \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}}\]
  12. Simplified0.8

    \[\leadsto \color{blue}{\left(\left(\frac{1}{\sqrt{\log 10}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right)} \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\]
  13. Final simplification0.8

    \[\leadsto \left(\left(\frac{1}{\sqrt{\log 10}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\]

Reproduce

herbie shell --seed 2020036 +o rules:numerics
(FPCore (re im)
  :name "math.log10 on complex, imaginary part"
  :precision binary64
  (/ (atan2 im re) (log 10)))