Average Error: 31.3 → 29.3
Time: 2.5min
Precision: binary64
Cost: 72834
\[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\]
↓
\[\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -\infty:\\
\;\;\;\;\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot -2\right) - 2 \cdot \log \left(\frac{-1}{a}\right)}\\
\mathbf{elif}\;{b}^{2} - {a}^{2} \leq 7.402920023221368 \cdot 10^{+306}:\\
\;\;\;\;\left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \sqrt[3]{{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) - 2 \cdot \log \left(\frac{-1}{b}\right)}\\
\end{array}\]
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)↓
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -\infty:\\
\;\;\;\;\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot -2\right) - 2 \cdot \log \left(\frac{-1}{a}\right)}\\
\mathbf{elif}\;{b}^{2} - {a}^{2} \leq 7.402920023221368 \cdot 10^{+306}:\\
\;\;\;\;\left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \sqrt[3]{{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) - 2 \cdot \log \left(\frac{-1}{b}\right)}\\
\end{array}(FPCore (a b angle)
:precision binary64
(*
(* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0))))
(cos (* PI (/ angle 180.0)))))
↓
(FPCore (a b angle)
:precision binary64
(if (<= (- (pow b 2.0) (pow a 2.0)) (- INFINITY))
(*
(cbrt (pow (cos (* PI (/ angle 180.0))) 3.0))
(exp
(-
(log (* (sin (* 0.005555555555555556 (* PI angle))) -2.0))
(* 2.0 (log (/ -1.0 a))))))
(if (<= (- (pow b 2.0) (pow a 2.0)) 7.402920023221368e+306)
(*
(*
(sin (* 0.005555555555555556 (* PI angle)))
(* 2.0 (- (pow b 2.0) (pow a 2.0))))
(cbrt (pow (cos (* 0.005555555555555556 (* PI angle))) 3.0)))
(*
(cbrt (pow (cos (* PI (/ angle 180.0))) 3.0))
(exp
(-
(log (* 2.0 (sin (* 0.005555555555555556 (* PI angle)))))
(* 2.0 (log (/ -1.0 b)))))))))double code(double a, double b, double angle) {
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(((double) M_PI) * (angle / 180.0))) * cos(((double) M_PI) * (angle / 180.0));
}
↓
double code(double a, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a, 2.0)) <= -((double) INFINITY)) {
tmp = cbrt(pow(cos(((double) M_PI) * (angle / 180.0)), 3.0)) * exp(log(sin(0.005555555555555556 * (((double) M_PI) * angle)) * -2.0) - (2.0 * log(-1.0 / a)));
} else if ((pow(b, 2.0) - pow(a, 2.0)) <= 7.402920023221368e+306) {
tmp = (sin(0.005555555555555556 * (((double) M_PI) * angle)) * (2.0 * (pow(b, 2.0) - pow(a, 2.0)))) * cbrt(pow(cos(0.005555555555555556 * (((double) M_PI) * angle)), 3.0));
} else {
tmp = cbrt(pow(cos(((double) M_PI) * (angle / 180.0)), 3.0)) * exp(log(2.0 * sin(0.005555555555555556 * (((double) M_PI) * angle))) - (2.0 * log(-1.0 / b)));
}
return tmp;
}
Try it out
Enter valid numbers for all inputs
Alternatives
| Alternative 1 |
|---|
| Error | 30.5 |
|---|
| Cost | 46401 |
|---|
\[\begin{array}{l}
\mathbf{if}\;a \leq -3.2279412078330076 \cdot 10^{+140}:\\
\;\;\;\;\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot -2\right) - 2 \cdot \log \left(\frac{-1}{a}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \sqrt[3]{{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{3}}\\
\end{array}\]
| Alternative 2 |
|---|
| Error | 31.3 |
|---|
| Cost | 39680 |
|---|
\[\left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \sqrt[3]{{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{3}}\]
| Alternative 3 |
|---|
| Error | 31.3 |
|---|
| Cost | 39616 |
|---|
\[\left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \log \left(e^{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)\]
| Alternative 4 |
|---|
| Error | 31.3 |
|---|
| Cost | 14144 |
|---|
\[\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\]
| Alternative 5 |
|---|
| Error | 31.3 |
|---|
| Cost | 14144 |
|---|
\[\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\]
| Alternative 6 |
|---|
| Error | 32.3 |
|---|
| Cost | 7360 |
|---|
\[\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\]
| Alternative 7 |
|---|
| Error | 34.2 |
|---|
| Cost | 832 |
|---|
\[angle \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\]
| Alternative 8 |
|---|
| Error | 34.3 |
|---|
| Cost | 832 |
|---|
\[angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\]
| Alternative 9 |
|---|
| Error | 37.9 |
|---|
| Cost | 1218 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -1.3709945349245143 \cdot 10^{-42}:\\
\;\;\;\;\left(\pi \cdot \left(b \cdot b\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;b \leq 4.581974872422141 \cdot 10^{-78}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(b \cdot b\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
\end{array}\]
| Alternative 10 |
|---|
| Error | 37.9 |
|---|
| Cost | 1218 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -4.5461182162760603 \cdot 10^{-39}:\\
\;\;\;\;\left(\pi \cdot \left(b \cdot b\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;b \leq 1.3157802113335384 \cdot 10^{-73}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\
\end{array}\]
| Alternative 11 |
|---|
| Error | 37.8 |
|---|
| Cost | 904 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -1.985360085628856 \cdot 10^{-44} \lor \neg \left(b \leq 1.4256809634928402 \cdot 10^{-75}\right):\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\
\end{array}\]
| Alternative 12 |
|---|
| Error | 37.9 |
|---|
| Cost | 904 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -2.0922304355887315 \cdot 10^{-41} \lor \neg \left(b \leq 1.8484039207807332 \cdot 10^{-73}\right):\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\
\end{array}\]
| Alternative 13 |
|---|
| Error | 37.9 |
|---|
| Cost | 904 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -4.3833796797803637 \cdot 10^{-38} \lor \neg \left(b \leq 1.8484039207807332 \cdot 10^{-73}\right):\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\right)\\
\end{array}\]
| Alternative 14 |
|---|
| Error | 43.5 |
|---|
| Cost | 576 |
|---|
\[angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\]
| Alternative 15 |
|---|
| Error | 51.9 |
|---|
| Cost | 64 |
|---|
\[0\]
| Alternative 16 |
|---|
| Error | 61.8 |
|---|
| Cost | 64 |
|---|
\[1\]
Error

Time

Derivation
- Split input into 3 regimes
if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < -inf.0
Initial program 64.0
\[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\]
- Using strategy
rm Applied add-cbrt-cube_binary64_45564.0
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sqrt[3]{\left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)}}\]
Simplified64.0
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sqrt[3]{\color{blue}{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}}\]
- Using strategy
rm Applied add-exp-log_binary64_45764.0
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{e^{\log \sin \left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Applied add-exp-log_binary64_45764.0
\[\leadsto \left(\left(2 \cdot \color{blue}{e^{\log \left({b}^{2} - {a}^{2}\right)}}\right) \cdot e^{\log \sin \left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Applied add-exp-log_binary64_45764.0
\[\leadsto \left(\left(\color{blue}{e^{\log 2}} \cdot e^{\log \left({b}^{2} - {a}^{2}\right)}\right) \cdot e^{\log \sin \left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Applied prod-exp_binary64_46864.0
\[\leadsto \left(\color{blue}{e^{\log 2 + \log \left({b}^{2} - {a}^{2}\right)}} \cdot e^{\log \sin \left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Applied prod-exp_binary64_46864.0
\[\leadsto \color{blue}{e^{\left(\log 2 + \log \left({b}^{2} - {a}^{2}\right)\right) + \log \sin \left(\pi \cdot \frac{angle}{180}\right)}} \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Simplified64.0
\[\leadsto e^{\color{blue}{\log \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right)\right)}} \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Taylor expanded around -inf 51.4
\[\leadsto e^{\color{blue}{\log \left(-2 \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) - 2 \cdot \log \left(\frac{-1}{a}\right)}} \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Simplified51.4
\[\leadsto e^{\color{blue}{\log \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot -2\right) - 2 \cdot \log \left(\frac{-1}{a}\right)}} \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Simplified51.4
\[\leadsto \color{blue}{\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot -2\right) - 2 \cdot \log \left(\frac{-1}{a}\right)}}\]
if -inf.0 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 7.4029200232213676e306
Initial program 25.0
\[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\]
Taylor expanded around inf 25.1
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\]
Simplified25.1
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\]
Taylor expanded around inf 25.0
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \color{blue}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\]
Simplified25.0
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \color{blue}{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\]
- Using strategy
rm Applied add-cbrt-cube_binary64_45525.0
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \color{blue}{\sqrt[3]{\left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}}\]
Simplified25.0
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \sqrt[3]{\color{blue}{{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{3}}}\]
Simplified25.0
\[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \sqrt[3]{{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{3}}}\]
if 7.4029200232213676e306 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))
Initial program 63.8
\[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\]
- Using strategy
rm Applied add-cbrt-cube_binary64_45563.8
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sqrt[3]{\left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)}}\]
Simplified63.8
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sqrt[3]{\color{blue}{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}}\]
- Using strategy
rm Applied add-exp-log_binary64_45763.8
\[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{e^{\log \sin \left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Applied add-exp-log_binary64_45763.8
\[\leadsto \left(\left(2 \cdot \color{blue}{e^{\log \left({b}^{2} - {a}^{2}\right)}}\right) \cdot e^{\log \sin \left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Applied add-exp-log_binary64_45763.8
\[\leadsto \left(\left(\color{blue}{e^{\log 2}} \cdot e^{\log \left({b}^{2} - {a}^{2}\right)}\right) \cdot e^{\log \sin \left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Applied prod-exp_binary64_46863.8
\[\leadsto \left(\color{blue}{e^{\log 2 + \log \left({b}^{2} - {a}^{2}\right)}} \cdot e^{\log \sin \left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Applied prod-exp_binary64_46863.8
\[\leadsto \color{blue}{e^{\left(\log 2 + \log \left({b}^{2} - {a}^{2}\right)\right) + \log \sin \left(\pi \cdot \frac{angle}{180}\right)}} \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Simplified63.8
\[\leadsto e^{\color{blue}{\log \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right)\right)}} \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Taylor expanded around -inf 52.2
\[\leadsto e^{\color{blue}{\log \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) - 2 \cdot \log \left(\frac{-1}{b}\right)}} \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Simplified52.2
\[\leadsto e^{\color{blue}{\log \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) - 2 \cdot \log \left(\frac{-1}{b}\right)}} \cdot \sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}}\]
Simplified52.2
\[\leadsto \color{blue}{\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) - 2 \cdot \log \left(\frac{-1}{b}\right)}}\]
- Recombined 3 regimes into one program.
Final simplification29.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -\infty:\\
\;\;\;\;\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot -2\right) - 2 \cdot \log \left(\frac{-1}{a}\right)}\\
\mathbf{elif}\;{b}^{2} - {a}^{2} \leq 7.402920023221368 \cdot 10^{+306}:\\
\;\;\;\;\left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \sqrt[3]{{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\cos \left(\pi \cdot \frac{angle}{180}\right)}^{3}} \cdot e^{\log \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) - 2 \cdot \log \left(\frac{-1}{b}\right)}\\
\end{array}\]
Reproduce
herbie shell --seed 2021040
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))