Average Error: 31.8 → 0.3
Time: 7.7s
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.7 Cost 78464
\[\frac{\sqrt[3]{\frac{1}{\log base}} \cdot \sqrt[3]{\frac{1}{\log base}}}{\sqrt[3]{\frac{1}{\tan^{-1}_* \frac{im}{re}}} \cdot \sqrt[3]{\frac{1}{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\sqrt[3]{\frac{1}{\log base}}}{\sqrt[3]{\frac{1}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 2 Error 1.8 Cost 78336
\[\frac{\frac{1}{\sqrt[3]{\log base} \cdot \sqrt[3]{\log base}}}{\sqrt[3]{\frac{1}{\tan^{-1}_* \frac{im}{re}}} \cdot \sqrt[3]{\frac{1}{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\frac{1}{\sqrt[3]{\log base}}}{\sqrt[3]{\frac{1}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 3 Error 1.4 Cost 78080
\[\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}} \cdot \sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\sqrt[3]{1}}{\sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 4 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 5 Error 32.7 Cost 64768
\[\frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt{\log base}} \cdot \frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt{\log base}}\]
Alternative 6 Error 31.0 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 7 Error 1.4 Cost 58752
\[\frac{1}{\sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}} \cdot \sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{1}{\sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 8 Error 1.4 Cost 58624
\[\frac{1}{\sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}} \cdot \left(\sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}} \cdot \sqrt[3]{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}\right)}\]
Alternative 9 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 10 Error 32.5 Cost 52288
\[\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\sqrt{\frac{1}{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\frac{\sqrt[3]{1}}{\log base}}{\sqrt{\frac{1}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 11 Error 1.6 Cost 45824
\[\frac{\sqrt[3]{\frac{1}{\log base}} \cdot \left(\sqrt[3]{\frac{1}{\log base}} \cdot \sqrt[3]{\frac{1}{\log base}}\right)}{\frac{1}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 12 Error 1.4 Cost 45696
\[\tan^{-1}_* \frac{im}{re} \cdot \left(\sqrt[3]{\frac{1}{\log base}} \cdot \left(\sqrt[3]{\frac{1}{\log base}} \cdot \sqrt[3]{\frac{1}{\log base}}\right)\right)\]
Alternative 13 Error 1.4 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 14 Error 1.2 Cost 45440
\[\frac{1}{\sqrt[3]{\log base} \cdot \sqrt[3]{\log base}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt[3]{\log base}}\]
Alternative 15 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 16 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 17 Error 31.8 Cost 39552
\[\frac{\log base \cdot \tan^{-1}_* \frac{im}{re} + \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base}\]
Alternative 18 Error 32.9 Cost 39104
\[\frac{\frac{1}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 19 Error 32.9 Cost 39104
\[\frac{1}{\sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}} \cdot \sqrt{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 20 Error 31.0 Cost 38976
\[\sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}} \cdot \sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}\]
Alternative 21 Error 32.5 Cost 32960
\[\frac{1}{\sqrt{\frac{1}{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\frac{1}{\log base}}{\sqrt{\frac{1}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 22 Error 32.4 Cost 32832
\[\frac{\frac{\frac{1}{\log base}}{\sqrt{\frac{1}{\tan^{-1}_* \frac{im}{re}}}}}{\sqrt{\frac{1}{\tan^{-1}_* \frac{im}{re}}}}\]
Alternative 23 Error 32.1 Cost 32640
\[\sqrt{\frac{1}{\log base}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log base}}\right)\]
Alternative 24 Error 32.2 Cost 32512
\[\frac{\frac{1}{\sqrt{\log base}}}{\frac{\sqrt{\log base}}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 25 Error 32.1 Cost 32512
\[\frac{1}{\sqrt{\log base}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log base}}\]
Alternative 26 Error 32.2 Cost 32512
\[\frac{1}{\frac{\sqrt{\log base}}{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log base}}}}\]
Alternative 27 Error 30.8 Cost 32448
\[\sqrt{\tan^{-1}_* \frac{im}{re}} \cdot \frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\log base}\]
Alternative 28 Error 32.1 Cost 32384
\[\frac{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log base}}}{\sqrt{\log base}}\]
Alternative 29 Error 7.6 Cost 26176
\[\frac{\frac{1}{\log base}}{\sqrt[3]{{\left(\frac{1}{\tan^{-1}_* \frac{im}{re}}\right)}^{3}}}\]
Alternative 30 Error 0.7 Cost 26048
\[\tan^{-1}_* \frac{im}{re} \cdot \sqrt[3]{{\left(\frac{1}{\log base}\right)}^{3}}\]
Alternative 31 Error 7.7 Cost 26048
\[\frac{1}{\sqrt[3]{{\left(\frac{\log base}{\tan^{-1}_* \frac{im}{re}}\right)}^{3}}}\]
Alternative 32 Error 32.4 Cost 25920
\[\tan^{-1}_* \frac{im}{re} \cdot e^{-\log \log base}\]
Alternative 33 Error 7.6 Cost 25920
\[\sqrt[3]{{\left(\frac{\tan^{-1}_* \frac{im}{re}}{\log base}\right)}^{3}}\]
Alternative 34 Error 14.7 Cost 25856
\[\log \left(e^{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}\right)\]
Alternative 35 Error 31.6 Cost 25856
\[e^{\log \left(\frac{\tan^{-1}_* \frac{im}{re}}{\log base}\right)}\]
Alternative 36 Error 11.8 Cost 19648
\[\frac{1}{\log \left({base}^{\left(\frac{1}{\tan^{-1}_* \frac{im}{re}}\right)}\right)}\]
Alternative 37 Error 0.5 Cost 13312
\[\frac{\frac{1}{\log base}}{\frac{1}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 38 Error 0.6 Cost 13312
\[\frac{1}{\log base \cdot \frac{1}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 39 Error 0.5 Cost 13312
\[\frac{1}{\frac{1}{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}}\]
Alternative 40 Error 0.4 Cost 13184
\[\frac{1}{\log base} \cdot \tan^{-1}_* \frac{im}{re}\]
Alternative 41 Error 0.5 Cost 13184
\[\frac{1}{\frac{\log base}{\tan^{-1}_* \frac{im}{re}}}\]
Alternative 42 Error 59.6 Cost 64
\[1\]
Alternative 43 Error 58.0 Cost 64
\[0\]
Alternative 44 Error 59.5 Cost 64
\[-1\]
Error Derivation Initial program 31.8
\[\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 2021042
(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))))