Average Error: 31.0 → 0.3
Time: 9.4s
Precision: binary64
Cost: 13056
Math TeX FPCore C \[\frac{\tan^{-1}_* \frac{im}{re} \cdot \log base - \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
↓
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log base}\]
\frac{\tan^{-1}_* \frac{im}{re} \cdot \log base - \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base + 0 \cdot 0} ↓
\frac{\tan^{-1}_* \frac{im}{re}}{\log base} (FPCore (re im base)
:precision binary64
(/
(- (* (atan2 im re) (log base)) (* (log (sqrt (+ (* re re) (* im im)))) 0.0))
(+ (* (log base) (log base)) (* 0.0 0.0)))) ↓
(FPCore (re im base) :precision binary64 (/ (atan2 im re) (log base))) double code(double re, double im, double base) {
return ((atan2(im, re) * log(base)) - (log(sqrt((re * re) + (im * im))) * 0.0)) / ((log(base) * log(base)) + (0.0 * 0.0));
}
↓
double code(double re, double im, double base) {
return atan2(im, re) / log(base);
}
Try it out Enter valid numbers for all inputs
Alternatives Alternative 1 Error 1.8 Cost 77696
\[\frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt[3]{\log base} \cdot \sqrt[3]{\log base}} \cdot \frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt[3]{\log base}}\]
Alternative 2 Error 31.3 Cost 64704
\[\frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\sqrt[3]{\log base} \cdot \sqrt[3]{\log base}} \cdot \frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\sqrt[3]{\log base}}\]
Alternative 3 Error 33.2 Cost 58560
\[\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\sqrt[3]{1}}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 4 Error 1.5 Cost 58496
\[\sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}} \cdot \left(\sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}} \cdot \sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}\right)\]
Alternative 5 Error 32.0 Cost 51968
\[\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\sqrt{\log base}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt{\log base}}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 6 Error 47.7 Cost 51776
\[\frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\sqrt{\log base}} \cdot \frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\sqrt{\log base}}\]
Alternative 7 Error 1.5 Cost 45696
\[\sqrt[3]{\frac{1}{\log base}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \left(\sqrt[3]{\frac{1}{\log base}} \cdot \sqrt[3]{\frac{1}{\log base}}\right)\right)\]
Alternative 8 Error 1.2 Cost 45440
\[\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt[3]{\log base}} \cdot \frac{1}{\sqrt[3]{\log base} \cdot \sqrt[3]{\log base}}\]
Alternative 9 Error 1.7 Cost 45440
\[\left(\sqrt[3]{\tan^{-1}_* \frac{im}{re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re}}\right) \cdot \frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\log base}\]
Alternative 10 Error 1.2 Cost 45312
\[\frac{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt[3]{\log base} \cdot \sqrt[3]{\log base}}}{\sqrt[3]{\log base}}\]
Alternative 11 Error 31.0 Cost 39552
\[\frac{\tan^{-1}_* \frac{im}{re} \cdot \log base + \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base}\]
Alternative 12 Error 33.2 Cost 39232
\[\frac{1}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{1}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 13 Error 33.1 Cost 39104
\[\frac{\frac{1}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 14 Error 0.9 Cost 39040
\[\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt[3]{\log base}} \cdot \frac{1}{{\left({\log base}^{2}\right)}^{0.3333333333333333}}\]
Alternative 15 Error 0.8 Cost 38976
\[\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt[3]{\log base}} \cdot \frac{1}{\sqrt[3]{{\log base}^{2}}}\]
Alternative 16 Error 31.3 Cost 38976
\[\sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}} \cdot \sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}\]
Alternative 17 Error 31.9 Cost 32640
\[\sqrt{\frac{1}{\log base}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log base}}\right)\]
Alternative 18 Error 32.1 Cost 32576
\[\frac{1}{{\log base}^{0.6666666666666666}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt[3]{\log base}}\]
Alternative 19 Error 32.0 Cost 32512
\[\frac{1}{\sqrt{\log base} \cdot \frac{\sqrt{\log base}}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 20 Error 32.0 Cost 32512
\[\frac{\frac{1}{\sqrt{\log base}}}{\frac{\sqrt{\log base}}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 21 Error 31.9 Cost 32512
\[\frac{1}{\sqrt{\log base}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log base}}\]
Alternative 22 Error 31.1 Cost 32448
\[\frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\frac{\log base}{\sqrt{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 23 Error 31.1 Cost 32448
\[\sqrt{\tan^{-1}_* \frac{im}{re}} \cdot \frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\log base}\]
Alternative 24 Error 31.9 Cost 32384
\[\frac{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log base}}}{\sqrt{\log base}}\]
Alternative 25 Error 0.8 Cost 26048
\[\tan^{-1}_* \frac{im}{re} \cdot \sqrt[3]{{\left(\frac{1}{\log base}\right)}^{3}}\]
Alternative 26 Error 7.7 Cost 26048
\[\frac{1}{\sqrt[3]{{\left(\frac{\log base}{\tan^{-1}_* \frac{im}{re}}\right)}^{3}}}\]
Alternative 27 Error 32.2 Cost 25920
\[\tan^{-1}_* \frac{im}{re} \cdot e^{-\log \log base}\]
Alternative 28 Error 7.7 Cost 25920
\[\sqrt[3]{{\left(\frac{\tan^{-1}_* \frac{im}{re}}{\log base}\right)}^{3}}\]
Alternative 29 Error 15.0 Cost 25856
\[\log \left(e^{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}\right)\]
Alternative 30 Error 31.9 Cost 25856
\[e^{\log \left(\frac{\tan^{-1}_* \frac{im}{re}}{\log base}\right)}\]
Alternative 31 Error 12.2 Cost 19648
\[\frac{1}{\log \left({base}^{\left(\frac{1}{\tan^{-1}_* \frac{im}{re}}\right)}\right)}\]
Alternative 32 Error 0.6 Cost 13312
\[\frac{1}{\log base \cdot \frac{1}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 33 Error 0.6 Cost 13312
\[\frac{\frac{1}{\log base}}{\frac{1}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 34 Error 0.5 Cost 13184
\[\frac{1}{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 35 Error 0.4 Cost 13184
\[\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\log base}\]
Alternative 36 Error 59.7 Cost 64
\[1\]
Alternative 37 Error 58.0 Cost 64
\[0\]
Alternative 38 Error 59.5 Cost 64
\[-1\]
Error Derivation Initial program 31.0
\[\frac{\tan^{-1}_* \frac{im}{re} \cdot \log base - \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Simplified0.3
\[\leadsto \color{blue}{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}\]
Simplified0.3
\[\leadsto \color{blue}{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}\]
Final simplification0.3
\[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\log base}\]
Reproduce herbie shell --seed 2021022
(FPCore (re im base)
:name "math.log/2 on complex, imaginary part"
:precision binary64
(/ (- (* (atan2 im re) (log base)) (* (log (sqrt (+ (* re re) (* im im)))) 0.0)) (+ (* (log base) (log base)) (* 0.0 0.0))))