Average Error: 58.2 → 0.6
Time: 18.2s
Precision: binary64
Cost: 27008
\[\left(0.5 \cdot \cos re\right) \cdot \left(e^{0 - im} - e^{im}\right)\]
↓
\[\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)\]
\left(0.5 \cdot \cos re\right) \cdot \left(e^{0 - im} - e^{im}\right)↓
\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)(FPCore (re im)
:precision binary64
(* (* 0.5 (cos re)) (- (exp (- 0.0 im)) (exp im))))
↓
(FPCore (re im)
:precision binary64
(*
(* (cos re) 0.5)
(-
(-
(- (* im -2.0) (* (pow im 3.0) 0.3333333333333333))
(* (pow im 5.0) 0.016666666666666666))
(* 0.0003968253968253968 (pow im 7.0)))))double code(double re, double im) {
return (0.5 * cos(re)) * (exp(0.0 - im) - exp(im));
}
↓
double code(double re, double im) {
return (cos(re) * 0.5) * ((((im * -2.0) - (pow(im, 3.0) * 0.3333333333333333)) - (pow(im, 5.0) * 0.016666666666666666)) - (0.0003968253968253968 * pow(im, 7.0)));
}
Try it out
Enter valid numbers for all inputs
Target
| Original | 58.2 |
|---|
| Target | 0.2 |
|---|
| Herbie | 0.6 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\left|im\right| < 1:\\
\;\;\;\;-\cos re \cdot \left(\left(im + \left(\left(0.16666666666666666 \cdot im\right) \cdot im\right) \cdot im\right) + \left(\left(\left(\left(0.008333333333333333 \cdot im\right) \cdot im\right) \cdot im\right) \cdot im\right) \cdot im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \cos re\right) \cdot \left(e^{0 - im} - e^{im}\right)\\
\end{array}\]
Alternatives
| Alternative 1 |
|---|
| Error | 41.6 |
|---|
| Cost | 101184 |
|---|
\[\frac{\left(\cos re \cdot 0.5\right) \cdot \left({\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right)}^{3} - {\left(0.0003968253968253968 \cdot {im}^{7}\right)}^{3}\right)}{\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) \cdot \left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) + \left(\left(0.0003968253968253968 \cdot {im}^{7}\right) \cdot \left(0.0003968253968253968 \cdot {im}^{7}\right) + \left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) \cdot \left(0.0003968253968253968 \cdot {im}^{7}\right)\right)}\]
| Alternative 2 |
|---|
| Error | 2.0 |
|---|
| Cost | 100352 |
|---|
\[\sqrt[3]{\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)} \cdot \left(\sqrt[3]{\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)} \cdot \sqrt[3]{\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)}\right)\]
| Alternative 3 |
|---|
| Error | 1.5 |
|---|
| Cost | 97408 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\cos re}} \cdot \sqrt[3]{\sqrt[3]{\cos re}}\right) \cdot {\left(\sqrt[3]{\sqrt[3]{\cos re}}\right)}^{4}\right)\]
| Alternative 4 |
|---|
| Error | 2.0 |
|---|
| Cost | 87040 |
|---|
\[\sqrt[3]{\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}} \cdot \left(\left(\cos re \cdot 0.5\right) \cdot \left(\sqrt[3]{\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}} \cdot \sqrt[3]{\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}}\right)\right)\]
| Alternative 5 |
|---|
| Error | 16.5 |
|---|
| Cost | 84544 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot \left(\sqrt[3]{\cos re} \cdot \left(\sqrt{\sqrt[3]{\cos re}} \cdot \sqrt{\sqrt[3]{\cos re}}\right)\right)\]
| Alternative 6 |
|---|
| Error | 16.6 |
|---|
| Cost | 78144 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot \left({\left(\sqrt[3]{\sqrt[3]{\cos re}}\right)}^{4} \cdot \sqrt[3]{{\cos re}^{0.6666666666666666}}\right)\]
| Alternative 7 |
|---|
| Error | 1.5 |
|---|
| Cost | 78080 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot \left(\sqrt[3]{\sqrt[3]{\cos re}} \cdot {\left(\sqrt[3]{\sqrt[3]{\cos re}}\right)}^{5}\right)\]
| Alternative 8 |
|---|
| Error | 16.5 |
|---|
| Cost | 78080 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot \left(\sqrt{\sqrt[3]{\cos re}} \cdot {\left(\sqrt{\sqrt[3]{\cos re}}\right)}^{3}\right)\]
| Alternative 9 |
|---|
| Error | 2.0 |
|---|
| Cost | 72512 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \sqrt[3]{\cos re \cdot \left(im + {im}^{5} \cdot 0.008333333333333333\right)} \cdot \left(\sqrt[3]{\cos re \cdot \left(im + {im}^{5} \cdot 0.008333333333333333\right)} \cdot \sqrt[3]{\cos re \cdot \left(im + {im}^{5} \cdot 0.008333333333333333\right)}\right)\]
| Alternative 10 |
|---|
| Error | 32.6 |
|---|
| Cost | 66880 |
|---|
\[\sqrt{\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)} \cdot \sqrt{\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)}\]
| Alternative 11 |
|---|
| Error | 58.2 |
|---|
| Cost | 65152 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \left(\sqrt[3]{e^{-im} - e^{im}} \cdot \left(\sqrt[3]{e^{-im} - e^{im}} \cdot \sqrt[3]{e^{-im} - e^{im}}\right)\right)\]
| Alternative 12 |
|---|
| Error | 28.9 |
|---|
| Cost | 61120 |
|---|
\[\frac{\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) \cdot \left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) + {im}^{14} \cdot -1.5747039556563367 \cdot 10^{-07}\right)}{\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) + 0.0003968253968253968 \cdot {im}^{7}}\]
| Alternative 13 |
|---|
| Error | 32.2 |
|---|
| Cost | 60224 |
|---|
\[\sqrt{\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}} \cdot \left(\left(\cos re \cdot 0.5\right) \cdot \sqrt{\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}}\right)\]
| Alternative 14 |
|---|
| Error | 41.7 |
|---|
| Cost | 60032 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \frac{\cos re \cdot \left({im}^{3} + {\left({im}^{5} \cdot 0.008333333333333333\right)}^{3}\right)}{im \cdot im + \left(\left({im}^{5} \cdot 0.008333333333333333\right) \cdot \left({im}^{5} \cdot 0.008333333333333333\right) - im \cdot \left({im}^{5} \cdot 0.008333333333333333\right)\right)}\]
| Alternative 15 |
|---|
| Error | 2.1 |
|---|
| Cost | 59456 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \sqrt[3]{im + {im}^{5} \cdot 0.008333333333333333} \cdot \left(\cos re \cdot \left(\sqrt[3]{im + {im}^{5} \cdot 0.008333333333333333} \cdot \sqrt[3]{im + {im}^{5} \cdot 0.008333333333333333}\right)\right)\]
| Alternative 16 |
|---|
| Error | 16.4 |
|---|
| Cost | 58880 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot \left(\sqrt[3]{\cos re} \cdot {\cos re}^{0.3333333333333333}\right)\]
| Alternative 17 |
|---|
| Error | 1.2 |
|---|
| Cost | 58816 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\sqrt[3]{\cos re} \cdot \sqrt[3]{\cos re}\right) \cdot \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right)\]
| Alternative 18 |
|---|
| Error | 58.3 |
|---|
| Cost | 58688 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \frac{{\left(e^{im}\right)}^{-3} - {\left(e^{im}\right)}^{3}}{{\left(e^{im}\right)}^{-2} + \left(1 + {\left(e^{im}\right)}^{2}\right)}\]
| Alternative 19 |
|---|
| Error | 58.2 |
|---|
| Cost | 58432 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \left(\left(\sqrt{e^{-im}} + \sqrt{e^{im}}\right) \cdot \left(\sqrt{e^{-im}} - \sqrt{e^{im}}\right)\right)\]
| Alternative 20 |
|---|
| Error | 32.4 |
|---|
| Cost | 52736 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \sqrt{\cos re \cdot \left(im + {im}^{5} \cdot 0.008333333333333333\right)} \cdot \sqrt{\cos re \cdot \left(im + {im}^{5} \cdot 0.008333333333333333\right)}\]
| Alternative 21 |
|---|
| Error | 0.9 |
|---|
| Cost | 52416 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot {\left({\cos re}^{2}\right)}^{0.3333333333333333}\]
| Alternative 22 |
|---|
| Error | 1.0 |
|---|
| Cost | 52352 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot \sqrt[3]{{\cos re}^{2}}\]
| Alternative 23 |
|---|
| Error | 1.2 |
|---|
| Cost | 52352 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot {\left(\sqrt[3]{\cos re}\right)}^{2}\]
| Alternative 24 |
|---|
| Error | 32.9 |
|---|
| Cost | 46208 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \sqrt{im + {im}^{5} \cdot 0.008333333333333333} \cdot \left(\cos re \cdot \sqrt{im + {im}^{5} \cdot 0.008333333333333333}\right)\]
| Alternative 25 |
|---|
| Error | 16.4 |
|---|
| Cost | 45952 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt[3]{\cos re}\right) \cdot {\cos re}^{0.6666666666666666}\]
| Alternative 26 |
|---|
| Error | 16.3 |
|---|
| Cost | 45888 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \sqrt{\cos re} \cdot \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) \cdot \sqrt{\cos re}\right)\]
| Alternative 27 |
|---|
| Error | 58.2 |
|---|
| Cost | 45696 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \frac{{\left(e^{im}\right)}^{-2} - {\left(e^{im}\right)}^{2}}{e^{-im} + e^{im}}\]
| Alternative 28 |
|---|
| Error | 59.5 |
|---|
| Cost | 45632 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \left(\sqrt{e^{-im} - e^{im}} \cdot \sqrt{e^{-im} - e^{im}}\right)\]
| Alternative 29 |
|---|
| Error | 31.3 |
|---|
| Cost | 41152 |
|---|
\[\left(re \cdot re\right) \cdot \left(im \cdot 0.5 + {im}^{7} \cdot 9.92063492063492 \cdot 10^{-05}\right) + \left(\left(re \cdot re\right) \cdot \left({im}^{5} \cdot 0.004166666666666667 + {im}^{3} \cdot 0.08333333333333333\right) - \left({im}^{3} \cdot 0.16666666666666666 + \left({im}^{5} \cdot 0.008333333333333333 + \left(im + {im}^{7} \cdot 0.0001984126984126984\right)\right)\right)\right)\]
| Alternative 30 |
|---|
| Error | 39.6 |
|---|
| Cost | 39872 |
|---|
\[\sqrt[3]{{\left(\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)\right)}^{3}}\]
| Alternative 31 |
|---|
| Error | 39.7 |
|---|
| Cost | 39424 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \sqrt[3]{{\left(\cos re \cdot \left(im + {im}^{5} \cdot 0.008333333333333333\right)\right)}^{3}}\]
| Alternative 32 |
|---|
| Error | 58.7 |
|---|
| Cost | 38784 |
|---|
\[\log \left(\sqrt{e^{\cos re \cdot \left(e^{-im} - e^{im}\right)}}\right)\]
| Alternative 33 |
|---|
| Error | 29.0 |
|---|
| Cost | 33536 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \frac{\cos re \cdot \left(im \cdot im + {im}^{10} \cdot -6.944444444444444 \cdot 10^{-05}\right)}{im - {im}^{5} \cdot 0.008333333333333333}\]
| Alternative 34 |
|---|
| Error | 58.2 |
|---|
| Cost | 32576 |
|---|
\[\sqrt[3]{{\left(\left(\cos re \cdot 0.5\right) \cdot \left(e^{-im} - e^{im}\right)\right)}^{3}}\]
| Alternative 35 |
|---|
| Error | 59.5 |
|---|
| Cost | 32512 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot e^{\log \left(e^{-im} - e^{im}\right)}\]
| Alternative 36 |
|---|
| Error | 58.6 |
|---|
| Cost | 32512 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \log \left(e^{e^{-im} - e^{im}}\right)\]
| Alternative 37 |
|---|
| Error | 59.5 |
|---|
| Cost | 32512 |
|---|
\[e^{\log \left(\left(\cos re \cdot 0.5\right) \cdot \left(e^{-im} - e^{im}\right)\right)}\]
| Alternative 38 |
|---|
| Error | 31.3 |
|---|
| Cost | 27264 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \left(\left(im + {im}^{5} \cdot 0.008333333333333333\right) - \left(re \cdot re\right) \cdot \left(im \cdot 0.5 + {im}^{5} \cdot 0.004166666666666667\right)\right)\]
| Alternative 39 |
|---|
| Error | 0.7 |
|---|
| Cost | 26560 |
|---|
\[{im}^{3} \cdot \left(\cos re \cdot -0.16666666666666666\right) - \cos re \cdot \left(im + {im}^{5} \cdot 0.008333333333333333\right)\]
| Alternative 40 |
|---|
| Error | 58.2 |
|---|
| Cost | 26304 |
|---|
\[\frac{\cos re \cdot 0.5}{e^{im}} + -0.5 \cdot \left(\cos re \cdot e^{im}\right)\]
| Alternative 41 |
|---|
| Error | 0.6 |
|---|
| Cost | 20800 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - im \cdot \left(\left(im \cdot im\right) \cdot 0.3333333333333333\right)\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)\]
| Alternative 42 |
|---|
| Error | 28.1 |
|---|
| Cost | 20480 |
|---|
\[0.5 \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)\]
| Alternative 43 |
|---|
| Error | 0.7 |
|---|
| Cost | 20352 |
|---|
\[\left(im \cdot im\right) \cdot \left(-0.16666666666666666 \cdot \left(im \cdot \cos re\right)\right) - \cos re \cdot \left(im + {im}^{5} \cdot 0.008333333333333333\right)\]
| Alternative 44 |
|---|
| Error | 0.7 |
|---|
| Cost | 20288 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right)\]
| Alternative 45 |
|---|
| Error | 58.2 |
|---|
| Cost | 19712 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \left(e^{-im} - e^{im}\right)\]
| Alternative 46 |
|---|
| Error | 0.8 |
|---|
| Cost | 13568 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right)\]
| Alternative 47 |
|---|
| Error | 0.8 |
|---|
| Cost | 13312 |
|---|
\[\cos re \cdot \left({im}^{3} \cdot -0.16666666666666666 - im\right)\]
| Alternative 48 |
|---|
| Error | 59.3 |
|---|
| Cost | 13184 |
|---|
\[0.5 \cdot \left(e^{-im} - e^{im}\right)\]
| Alternative 49 |
|---|
| Error | 1.2 |
|---|
| Cost | 6848 |
|---|
\[\left(\cos re \cdot 0.5\right) \cdot \left(im \cdot -2\right)\]
| Alternative 50 |
|---|
| Error | 1.2 |
|---|
| Cost | 6656 |
|---|
\[\cos re \cdot \left(-im\right)\]
| Alternative 51 |
|---|
| Error | 61.6 |
|---|
| Cost | 64 |
|---|
\[1\]
| Alternative 52 |
|---|
| Error | 60.6 |
|---|
| Cost | 64 |
|---|
\[0\]
| Alternative 53 |
|---|
| Error | 61.5 |
|---|
| Cost | 64 |
|---|
\[-1\]
Error

Derivation
Initial program 58.2
\[\left(0.5 \cdot \cos re\right) \cdot \left(e^{0 - im} - e^{im}\right)\]
Simplified58.2
\[\leadsto \color{blue}{\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} - e^{im}\right)}\]
Taylor expanded around 0 0.6
\[\leadsto \left(0.5 \cdot \cos re\right) \cdot \color{blue}{\left(-\left(0.0003968253968253968 \cdot {im}^{7} + \left(0.016666666666666666 \cdot {im}^{5} + \left(0.3333333333333333 \cdot {im}^{3} + 2 \cdot im\right)\right)\right)\right)}\]
Simplified0.6
\[\leadsto \left(0.5 \cdot \cos re\right) \cdot \color{blue}{\left(\left(\left(im \cdot -2 - 0.3333333333333333 \cdot {im}^{3}\right) - 0.016666666666666666 \cdot {im}^{5}\right) - 0.0003968253968253968 \cdot {im}^{7}\right)}\]
Simplified0.6
\[\leadsto \color{blue}{\left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)}\]
Final simplification0.6
\[\leadsto \left(\cos re \cdot 0.5\right) \cdot \left(\left(\left(im \cdot -2 - {im}^{3} \cdot 0.3333333333333333\right) - {im}^{5} \cdot 0.016666666666666666\right) - 0.0003968253968253968 \cdot {im}^{7}\right)\]
Reproduce
herbie shell --seed 2021022
(FPCore (re im)
:name "math.sin on complex, imaginary part"
:precision binary64
:herbie-target
(if (< (fabs im) 1.0) (- (* (cos re) (+ (+ im (* (* (* 0.16666666666666666 im) im) im)) (* (* (* (* (* 0.008333333333333333 im) im) im) im) im)))) (* (* 0.5 (cos re)) (- (exp (- 0.0 im)) (exp im))))
(* (* 0.5 (cos re)) (- (exp (- 0.0 im)) (exp im))))