\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}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \cos t_0\\
t_2 := {b}^{2} - {a}^{2}\\
t_3 := 2 \cdot t_2\\
\mathbf{if}\;t_2 \leq -5.8441155930856096 \cdot 10^{+293}:\\
\;\;\;\;\left(t_3 \cdot \mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, {\pi}^{3} \cdot \left({angle}^{3} \cdot -2.8577960676726107 \cdot 10^{-8}\right)\right)\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_4 := \sin t_0\\
\mathbf{if}\;t_2 \leq 1.707276081813076 \cdot 10^{+283}:\\
\;\;\;\;\left(t_3 \cdot t_4\right) \cdot \sqrt[3]{{t_1}^{3}}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_1 \cdot \left(angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_5 := \sqrt[3]{t_1}\\
\left(t_4 \cdot \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \left(t_5 \cdot t_5\right)
\end{array}\\
\end{array}\\
\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
(let* ((t_0 (* PI (/ angle 180.0)))
(t_1 (cos t_0))
(t_2 (- (pow b 2.0) (pow a 2.0)))
(t_3 (* 2.0 t_2)))
(if (<= t_2 -5.8441155930856096e+293)
(*
(*
t_3
(fma
0.005555555555555556
(* angle PI)
(* (pow PI 3.0) (* (pow angle 3.0) -2.8577960676726107e-8))))
t_1)
(let* ((t_4 (sin t_0)))
(if (<= t_2 1.707276081813076e+283)
(* (* t_3 t_4) (cbrt (pow t_1 3.0)))
(if (<= t_2 INFINITY)
(*
t_1
(* angle (* 0.011111111111111112 (* PI (- (* b b) (* a a))))))
(let* ((t_5 (cbrt t_1)))
(* (* t_4 (* 2.0 (* (+ b a) (- b a)))) (* t_5 t_5)))))))))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 t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = cos(t_0);
double t_2 = pow(b, 2.0) - pow(a, 2.0);
double t_3 = 2.0 * t_2;
double tmp;
if (t_2 <= -5.8441155930856096e+293) {
tmp = (t_3 * fma(0.005555555555555556, (angle * ((double) M_PI)), (pow(((double) M_PI), 3.0) * (pow(angle, 3.0) * -2.8577960676726107e-8)))) * t_1;
} else {
double t_4 = sin(t_0);
double tmp_1;
if (t_2 <= 1.707276081813076e+283) {
tmp_1 = (t_3 * t_4) * cbrt(pow(t_1, 3.0));
} else if (t_2 <= ((double) INFINITY)) {
tmp_1 = t_1 * (angle * (0.011111111111111112 * (((double) M_PI) * ((b * b) - (a * a)))));
} else {
double t_5 = cbrt(t_1);
tmp_1 = (t_4 * (2.0 * ((b + a) * (b - a)))) * (t_5 * t_5);
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus a



Bits error versus b



Bits error versus angle
if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < -5.8441155930856096e293Initial program 30.6
Taylor expanded in angle around 0 33.4
Simplified33.4
if -5.8441155930856096e293 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 1.70727608181307596e283Initial program 24.7
Applied add-cbrt-cube_binary6424.7
Simplified24.7
if 1.70727608181307596e283 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < +inf.0Initial program 29.4
Taylor expanded in angle around 0 30.4
Simplified30.4
if +inf.0 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) Initial program 64.0
Applied add-cube-cbrt_binary6464.0
Taylor expanded in angle around 0 64.0
Applied unpow2_binary6464.0
Applied unpow2_binary6464.0
Applied difference-of-squares_binary6425.9
Final simplification27.6
herbie shell --seed 2022068
(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)))))