Average Error: 0.9 → 0.1
Time: 8.8s
Precision: binary64
Cost: 45504
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
↓
\[\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}↓
\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right)(FPCore (re im) :precision binary64 (/ (atan2 im re) (log 10.0)))
↓
(FPCore (re im)
:precision binary64
(*
(sqrt (/ 1.0 (sqrt (log 10.0))))
(* (atan2 im re) (pow (/ 1.0 (sqrt (log 10.0))) 1.5))))
double code(double re, double im) {
return atan2(im, re) / log(10.0);
}
↓
double code(double re, double im) {
return sqrt(1.0 / sqrt(log(10.0))) * (atan2(im, re) * pow((1.0 / sqrt(log(10.0))), 1.5));
}
Try it out
Enter valid numbers for all inputs
Alternatives
| Alternative 1 |
|---|
| Error | 1.1 |
|---|
| Cost | 109952 |
|---|
\[\frac{1}{\sqrt{\log 10}} \cdot \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)\]
| Alternative 2 |
|---|
| Error | 1.3 |
|---|
| Cost | 109824 |
|---|
\[\frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt[3]{\sqrt{\log 10}}} \cdot \frac{\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}}}}{\sqrt{\log 10}}\]
| Alternative 3 |
|---|
| Error | 0.2 |
|---|
| Cost | 97152 |
|---|
\[\frac{1}{\sqrt{\log 10}} \cdot \left(\frac{\sqrt[3]{1}}{\sqrt[3]{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \left(\frac{\sqrt[3]{1}}{\sqrt[3]{\sqrt{\log 10}}} \cdot \frac{\sqrt[3]{1}}{\sqrt[3]{\sqrt{\log 10}}}\right)\right)\right)\]
| Alternative 4 |
|---|
| Error | 1.0 |
|---|
| Cost | 97024 |
|---|
\[\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\sqrt[3]{\sqrt{\log 10}} \cdot \sqrt[3]{\sqrt{\log 10}}} \cdot \left(\frac{\sqrt[3]{1}}{\sqrt[3]{\sqrt{\log 10}}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}\right)\]
| Alternative 5 |
|---|
| Error | 30.1 |
|---|
| Cost | 90688 |
|---|
\[\left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\right) \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\right)\]
| Alternative 6 |
|---|
| Error | 1.4 |
|---|
| Cost | 90624 |
|---|
\[\sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}} \cdot \frac{\sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}} \cdot \sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}}{\sqrt{\log 10}}\]
| Alternative 7 |
|---|
| Error | 2.4 |
|---|
| Cost | 90496 |
|---|
\[\frac{\frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10}}}{\left|\sqrt[3]{\log 10}\right|} \cdot \frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt{\sqrt[3]{\log 10}}}\]
| Alternative 8 |
|---|
| Error | 2.3 |
|---|
| Cost | 84032 |
|---|
\[\frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\frac{{\left(\sqrt{\sqrt{\log 10}}\right)}^{3}}{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}} \cdot \frac{\sqrt[3]{\tan^{-1}_* \frac{im}{re}}}{\sqrt{\sqrt{\log 10}}}\]
| Alternative 9 |
|---|
| Error | 0.9 |
|---|
| Cost | 77760 |
|---|
\[\sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}} \cdot \left(\left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right) \cdot \sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}}\right)\]
| Alternative 10 |
|---|
| Error | 1.1 |
|---|
| Cost | 77568 |
|---|
\[\frac{1}{\sqrt[3]{\sqrt{\log 10}} \cdot \sqrt[3]{\sqrt{\log 10}}} \cdot \frac{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}{\sqrt[3]{\sqrt{\log 10}}}\]
| Alternative 11 |
|---|
| Error | 30.3 |
|---|
| Cost | 64832 |
|---|
\[\frac{1}{\sqrt{\log 10}} \cdot \left(\sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}} \cdot \sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\right)\]
| Alternative 12 |
|---|
| Error | 1.5 |
|---|
| Cost | 58496 |
|---|
\[\sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}} \cdot \left(\sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}} \cdot \sqrt[3]{\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}}\right)\]
| Alternative 13 |
|---|
| Error | 6.7 |
|---|
| Cost | 58368 |
|---|
\[\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \sqrt[3]{{\left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right)}^{3}}\]
| Alternative 14 |
|---|
| Error | 0.9 |
|---|
| Cost | 58368 |
|---|
\[\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}\right)\]
| Alternative 15 |
|---|
| Error | 0.1 |
|---|
| Cost | 45504 |
|---|
\[\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right) \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\]
| Alternative 16 |
|---|
| Error | 1.9 |
|---|
| 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 10}\]
| Alternative 17 |
|---|
| Error | 0.8 |
|---|
| Cost | 45376 |
|---|
\[\frac{\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}}{\sqrt{\sqrt{\log 10}}}\]
| Alternative 18 |
|---|
| Error | 7.4 |
|---|
| Cost | 45376 |
|---|
\[\frac{1}{\sqrt{\log 10}} \cdot \sqrt[3]{{\left(\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}\right)}^{3}}\]
| Alternative 19 |
|---|
| Error | 30.1 |
|---|
| Cost | 38976 |
|---|
\[\sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}} \cdot \sqrt{\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}}\]
| Alternative 20 |
|---|
| Error | 0.8 |
|---|
| Cost | 32640 |
|---|
\[\frac{1}{\sqrt{\log 10}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\]
| Alternative 21 |
|---|
| Error | 1.0 |
|---|
| Cost | 32640 |
|---|
\[\frac{1}{\sqrt{\log 10}} \cdot \frac{1}{\frac{\sqrt{\log 10}}{\tan^{-1}_* \frac{im}{re}}}\]
| Alternative 22 |
|---|
| Error | 0.8 |
|---|
| Cost | 32512 |
|---|
\[\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}\]
| Alternative 23 |
|---|
| Error | 30.5 |
|---|
| Cost | 32448 |
|---|
\[\frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\frac{\log 10}{\sqrt{\tan^{-1}_* \frac{im}{re}}}}\]
| Alternative 24 |
|---|
| Error | 30.5 |
|---|
| Cost | 32448 |
|---|
\[\sqrt{\tan^{-1}_* \frac{im}{re}} \cdot \frac{\sqrt{\tan^{-1}_* \frac{im}{re}}}{\log 10}\]
| Alternative 25 |
|---|
| Error | 0.9 |
|---|
| Cost | 32384 |
|---|
\[\frac{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}{\sqrt{\log 10}}\]
| Alternative 26 |
|---|
| Error | 6.7 |
|---|
| Cost | 25920 |
|---|
\[\sqrt[3]{{\left(\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\right)}^{3}}\]
| Alternative 27 |
|---|
| Error | 30.8 |
|---|
| Cost | 25856 |
|---|
\[e^{\log \left(\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\right)}\]
| Alternative 28 |
|---|
| Error | 1.0 |
|---|
| Cost | 13184 |
|---|
\[\frac{1}{\frac{\log 10}{\tan^{-1}_* \frac{im}{re}}}\]
| Alternative 29 |
|---|
| Error | 0.9 |
|---|
| Cost | 13056 |
|---|
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
| Alternative 30 |
|---|
| Error | 58.1 |
|---|
| Cost | 64 |
|---|
\[1\]
| Alternative 31 |
|---|
| Error | 58.2 |
|---|
| Cost | 64 |
|---|
\[0\]
| Alternative 32 |
|---|
| Error | 58.2 |
|---|
| Cost | 64 |
|---|
\[-1\]
Error

Derivation
Initial program 0.9
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
- Using strategy
rm Applied add-sqr-sqrt_binary64_11230.9
\[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\]
Applied *-un-lft-identity_binary64_11010.9
\[\leadsto \frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}}\]
Applied times-frac_binary64_11070.8
\[\leadsto \color{blue}{\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\]
- Using strategy
rm Applied div-inv_binary64_10980.8
\[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)}\]
- Using strategy
rm Applied add-sqr-sqrt_binary64_11230.8
\[\leadsto \color{blue}{\left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right)} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\]
Applied associate-*l*_binary64_10420.8
\[\leadsto \color{blue}{\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\right)}\]
Simplified0.1
\[\leadsto \sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right)}\]
Simplified0.1
\[\leadsto \color{blue}{\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right)}\]
Final simplification0.1
\[\leadsto \sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right)\]
Reproduce
herbie shell --seed 2021022
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
:precision binary64
(/ (atan2 im re) (log 10.0)))