Average Error: 0.8 → 0.5
Time: 13.7s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\sqrt{\log 10}} \cdot \left(\frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\frac{\sqrt[3]{\sqrt{\log 10}} \cdot \sqrt[3]{\sqrt{\log 10}}}{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt[3]{\sqrt{\log 10}}}\right)\right)\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\sqrt{\log 10}} \cdot \left(\frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\frac{\sqrt[3]{\sqrt{\log 10}} \cdot \sqrt[3]{\sqrt{\log 10}}}{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt[3]{\sqrt{\log 10}}}\right)\right)\right)
double f(double re, double im) {
        double r42647 = im;
        double r42648 = re;
        double r42649 = atan2(r42647, r42648);
        double r42650 = 10.0;
        double r42651 = log(r42650);
        double r42652 = r42649 / r42651;
        return r42652;
}

double f(double re, double im) {
        double r42653 = 1.0;
        double r42654 = 10.0;
        double r42655 = log(r42654);
        double r42656 = sqrt(r42655);
        double r42657 = r42653 / r42656;
        double r42658 = im;
        double r42659 = re;
        double r42660 = atan2(r42658, r42659);
        double r42661 = cbrt(r42660);
        double r42662 = cbrt(r42656);
        double r42663 = r42662 * r42662;
        double r42664 = r42663 / r42661;
        double r42665 = r42661 / r42664;
        double r42666 = r42661 / r42662;
        double r42667 = r42665 * r42666;
        double r42668 = r42657 * r42667;
        double r42669 = expm1(r42668);
        double r42670 = log1p(r42669);
        return r42670;
}

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 log1p-expm1-u0.7

    \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\right)\right)}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.7

    \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\right)\right)\]
  6. Applied *-un-lft-identity0.7

    \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}}\right)\right)\]
  7. Applied times-frac0.7

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

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

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

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

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

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

Reproduce

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