ab-angle->ABCF B

Percentage Accurate: 54.3% → 67.8%
Time: 1.0min
Alternatives: 12
Speedup: 32.2×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle}{180}\\ \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (/ angle 180.0))))
   (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle / 180.0);
	return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle / 180.0);
	return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle):
	t_0 = math.pi * (angle / 180.0)
	return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle / 180.0))
	return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0))
end
function tmp = code(a, b, angle)
	t_0 = pi * (angle / 180.0);
	tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0);
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 54.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle}{180}\\ \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (/ angle 180.0))))
   (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle / 180.0);
	return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle / 180.0);
	return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle):
	t_0 = math.pi * (angle / 180.0)
	return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle / 180.0))
	return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0))
end
function tmp = code(a, b, angle)
	t_0 = pi * (angle / 180.0);
	tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0);
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}

Alternative 1: 67.8% accurate, 0.6× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 10^{+51}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot angle\_m\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) (sin t_0)) (cos t_0))
         1e+51)
      (*
       (+ b_m a_m)
       (* (- b_m a_m) (sin (* (* PI angle_m) 0.011111111111111112))))
      (*
       (+ b_m a_m)
       (*
        (- b_m a_m)
        (sin (* 0.011111111111111112 (expm1 (log1p (* PI angle_m)))))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double tmp;
	if ((((2.0 * (pow(b_m, 2.0) - pow(a_m, 2.0))) * sin(t_0)) * cos(t_0)) <= 1e+51) {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin(((((double) M_PI) * angle_m) * 0.011111111111111112)));
	} else {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((0.011111111111111112 * expm1(log1p((((double) M_PI) * angle_m))))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = Math.PI * (angle_m / 180.0);
	double tmp;
	if ((((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= 1e+51) {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin(((Math.PI * angle_m) * 0.011111111111111112)));
	} else {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((0.011111111111111112 * Math.expm1(Math.log1p((Math.PI * angle_m))))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	t_0 = math.pi * (angle_m / 180.0)
	tmp = 0
	if (((2.0 * (math.pow(b_m, 2.0) - math.pow(a_m, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= 1e+51:
		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin(((math.pi * angle_m) * 0.011111111111111112)))
	else:
		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin((0.011111111111111112 * math.expm1(math.log1p((math.pi * angle_m))))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a_m ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 1e+51)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112))));
	else
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(0.011111111111111112 * expm1(log1p(Float64(pi * angle_m)))))));
	end
	return Float64(angle_s * tmp)
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 1e+51], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Exp[N[Log[1 + N[(Pi * angle$95$m), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 10^{+51}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot angle\_m\right)\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) < 1e51

    1. Initial program 60.9%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*60.9%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative60.9%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*60.9%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified60.9%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube41.7%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/328.1%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr28.2%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/341.0%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube60.2%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      3. unpow260.2%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      4. unpow260.2%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares60.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      6. associate-*l*60.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. metadata-eval60.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
      8. div-inv60.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
      9. 2-sin60.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      10. associate-*l*66.7%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      11. 2-sin66.7%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
      12. count-266.7%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
    8. Applied egg-rr68.2%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]

    if 1e51 < (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))

    1. Initial program 39.6%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*39.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative39.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*39.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified39.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube33.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/333.3%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr32.9%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/336.5%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube42.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      3. unpow242.6%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      4. unpow242.6%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares50.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      6. associate-*l*50.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. metadata-eval50.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
      8. div-inv47.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
      9. 2-sin47.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      10. associate-*l*67.1%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      11. 2-sin67.1%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
      12. count-267.1%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
    8. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u59.7%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot angle\right)\right)} \cdot 0.011111111111111112\right)\right) \]
    10. Applied egg-rr59.7%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot angle\right)\right)} \cdot 0.011111111111111112\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq 10^{+51}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot angle\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 67.8% accurate, 3.6× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 4 \cdot 10^{+157}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b_m 4e+157)
    (*
     (+ b_m a_m)
     (* (- b_m a_m) (sin (* PI (* angle_m 0.011111111111111112)))))
    (* (+ b_m a_m) (* (- b_m a_m) (* (* PI angle_m) 0.011111111111111112))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 4e+157) {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
	} else {
		tmp = (b_m + a_m) * ((b_m - a_m) * ((((double) M_PI) * angle_m) * 0.011111111111111112));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 4e+157) {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((Math.PI * (angle_m * 0.011111111111111112))));
	} else {
		tmp = (b_m + a_m) * ((b_m - a_m) * ((Math.PI * angle_m) * 0.011111111111111112));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if b_m <= 4e+157:
		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin((math.pi * (angle_m * 0.011111111111111112))))
	else:
		tmp = (b_m + a_m) * ((b_m - a_m) * ((math.pi * angle_m) * 0.011111111111111112))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (b_m <= 4e+157)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (b_m <= 4e+157)
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((pi * (angle_m * 0.011111111111111112))));
	else
		tmp = (b_m + a_m) * ((b_m - a_m) * ((pi * angle_m) * 0.011111111111111112));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 4e+157], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 4 \cdot 10^{+157}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 3.99999999999999993e157

    1. Initial program 55.7%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*55.7%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative55.7%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*55.7%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified55.7%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube39.3%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/330.3%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.2%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/339.5%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube56.0%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      3. unpow256.0%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      4. unpow256.0%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares58.0%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      6. associate-*l*58.0%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. metadata-eval58.0%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
      8. div-inv57.6%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
      9. 2-sin57.6%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      10. associate-*l*66.4%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      11. 2-sin66.4%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
      12. count-266.4%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
    8. Applied egg-rr68.6%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt34.4%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\sqrt{\left(\pi \cdot angle\right) \cdot 0.011111111111111112} \cdot \sqrt{\left(\pi \cdot angle\right) \cdot 0.011111111111111112}\right)}\right) \]
      2. pow234.4%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left({\left(\sqrt{\left(\pi \cdot angle\right) \cdot 0.011111111111111112}\right)}^{2}\right)}\right) \]
      3. associate-*l*33.8%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left({\left(\sqrt{\color{blue}{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}}\right)}^{2}\right)\right) \]
    10. Applied egg-rr33.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{2}\right)}\right) \]
    11. Step-by-step derivation
      1. unpow233.8%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\sqrt{\pi \cdot \left(angle \cdot 0.011111111111111112\right)} \cdot \sqrt{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}\right) \]
      2. add-sqr-sqrt66.8%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}\right) \]
      3. *-commutative66.8%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(angle \cdot 0.011111111111111112\right) \cdot \pi\right)}\right) \]
    12. Applied egg-rr66.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(angle \cdot 0.011111111111111112\right) \cdot \pi\right)}\right) \]

    if 3.99999999999999993e157 < b

    1. Initial program 34.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) \]
    2. Step-by-step derivation
      1. associate-*l*34.8%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative34.8%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*34.8%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified34.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube34.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/329.0%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr29.0%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/337.5%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube37.5%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      3. unpow237.5%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      4. unpow237.5%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares46.7%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      6. associate-*l*46.7%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. metadata-eval46.7%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
      8. div-inv43.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
      9. 2-sin43.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      10. associate-*l*69.2%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      11. 2-sin69.2%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
      12. count-269.2%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
    8. Applied egg-rr74.9%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Taylor expanded in angle around 0 86.0%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4 \cdot 10^{+157}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 62.5% accurate, 3.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+82}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 5.2e+82)
    (* (+ b_m a_m) (* (- b_m a_m) (* (* PI angle_m) 0.011111111111111112)))
    (* 0.011111111111111112 (* angle_m (* (pow b_m 2.0) PI))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5.2e+82) {
		tmp = (b_m + a_m) * ((b_m - a_m) * ((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (pow(b_m, 2.0) * ((double) M_PI)));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5.2e+82) {
		tmp = (b_m + a_m) * ((b_m - a_m) * ((Math.PI * angle_m) * 0.011111111111111112));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (Math.pow(b_m, 2.0) * Math.PI));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 5.2e+82:
		tmp = (b_m + a_m) * ((b_m - a_m) * ((math.pi * angle_m) * 0.011111111111111112))
	else:
		tmp = 0.011111111111111112 * (angle_m * (math.pow(b_m, 2.0) * math.pi))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 5.2e+82)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64((b_m ^ 2.0) * pi)));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 5.2e+82)
		tmp = (b_m + a_m) * ((b_m - a_m) * ((pi * angle_m) * 0.011111111111111112));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m ^ 2.0) * pi));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 5.2e+82], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+82}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 5.1999999999999997e82

    1. Initial program 57.3%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*57.3%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative57.3%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*57.3%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified57.3%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube40.6%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/330.0%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.0%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/341.9%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube58.7%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      3. unpow258.7%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      4. unpow258.7%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares62.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      6. associate-*l*62.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. metadata-eval62.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
      8. div-inv60.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
      9. 2-sin60.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      10. associate-*l*74.3%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      11. 2-sin74.3%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
      12. count-274.3%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
    8. Applied egg-rr76.5%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Taylor expanded in angle around 0 69.2%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}\right) \]

    if 5.1999999999999997e82 < angle

    1. Initial program 30.7%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*30.7%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative30.7%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*30.7%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified30.7%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow230.7%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      2. unpow230.7%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares30.7%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    6. Applied egg-rr30.7%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 29.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative29.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      2. *-commutative29.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
      3. +-commutative29.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
    9. Simplified29.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
    10. Taylor expanded in b around inf 30.3%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 5.2 \cdot 10^{+82}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 62.5% accurate, 3.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+82}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left({b\_m}^{2} \cdot \pi\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 5.2e+82)
    (* (+ b_m a_m) (* (- b_m a_m) (* (* PI angle_m) 0.011111111111111112)))
    (* (* angle_m 0.011111111111111112) (* (pow b_m 2.0) PI)))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5.2e+82) {
		tmp = (b_m + a_m) * ((b_m - a_m) * ((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = (angle_m * 0.011111111111111112) * (pow(b_m, 2.0) * ((double) M_PI));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5.2e+82) {
		tmp = (b_m + a_m) * ((b_m - a_m) * ((Math.PI * angle_m) * 0.011111111111111112));
	} else {
		tmp = (angle_m * 0.011111111111111112) * (Math.pow(b_m, 2.0) * Math.PI);
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 5.2e+82:
		tmp = (b_m + a_m) * ((b_m - a_m) * ((math.pi * angle_m) * 0.011111111111111112))
	else:
		tmp = (angle_m * 0.011111111111111112) * (math.pow(b_m, 2.0) * math.pi)
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 5.2e+82)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = Float64(Float64(angle_m * 0.011111111111111112) * Float64((b_m ^ 2.0) * pi));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 5.2e+82)
		tmp = (b_m + a_m) * ((b_m - a_m) * ((pi * angle_m) * 0.011111111111111112));
	else
		tmp = (angle_m * 0.011111111111111112) * ((b_m ^ 2.0) * pi);
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 5.2e+82], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+82}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left({b\_m}^{2} \cdot \pi\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 5.1999999999999997e82

    1. Initial program 57.3%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*57.3%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative57.3%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*57.3%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified57.3%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube40.6%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/330.0%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.0%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/341.9%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube58.7%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      3. unpow258.7%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      4. unpow258.7%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares62.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      6. associate-*l*62.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. metadata-eval62.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
      8. div-inv60.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
      9. 2-sin60.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      10. associate-*l*74.3%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      11. 2-sin74.3%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
      12. count-274.3%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
    8. Applied egg-rr76.5%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Taylor expanded in angle around 0 69.2%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}\right) \]

    if 5.1999999999999997e82 < angle

    1. Initial program 30.7%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*30.7%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative30.7%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*30.7%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified30.7%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow230.7%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      2. unpow230.7%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares30.7%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    6. Applied egg-rr30.7%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 29.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative29.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      2. *-commutative29.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
      3. +-commutative29.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
    9. Simplified29.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
    10. Taylor expanded in b around inf 30.3%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    11. Step-by-step derivation
      1. associate-*r*30.3%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left({b}^{2} \cdot \pi\right)} \]
      2. *-commutative30.3%

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)} \]
    12. Simplified30.3%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot {b}^{2}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 5.2 \cdot 10^{+82}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left({b}^{2} \cdot \pi\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 62.5% accurate, 3.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+82}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;{b\_m}^{2} \cdot t\_0\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (* PI angle_m) 0.011111111111111112)))
   (*
    angle_s
    (if (<= angle_m 5.2e+82)
      (* (+ b_m a_m) (* (- b_m a_m) t_0))
      (* (pow b_m 2.0) t_0)))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = (((double) M_PI) * angle_m) * 0.011111111111111112;
	double tmp;
	if (angle_m <= 5.2e+82) {
		tmp = (b_m + a_m) * ((b_m - a_m) * t_0);
	} else {
		tmp = pow(b_m, 2.0) * t_0;
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = (Math.PI * angle_m) * 0.011111111111111112;
	double tmp;
	if (angle_m <= 5.2e+82) {
		tmp = (b_m + a_m) * ((b_m - a_m) * t_0);
	} else {
		tmp = Math.pow(b_m, 2.0) * t_0;
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	t_0 = (math.pi * angle_m) * 0.011111111111111112
	tmp = 0
	if angle_m <= 5.2e+82:
		tmp = (b_m + a_m) * ((b_m - a_m) * t_0)
	else:
		tmp = math.pow(b_m, 2.0) * t_0
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = Float64(Float64(pi * angle_m) * 0.011111111111111112)
	tmp = 0.0
	if (angle_m <= 5.2e+82)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * t_0));
	else
		tmp = Float64((b_m ^ 2.0) * t_0);
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	t_0 = (pi * angle_m) * 0.011111111111111112;
	tmp = 0.0;
	if (angle_m <= 5.2e+82)
		tmp = (b_m + a_m) * ((b_m - a_m) * t_0);
	else
		tmp = (b_m ^ 2.0) * t_0;
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 5.2e+82], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Power[b$95$m, 2.0], $MachinePrecision] * t$95$0), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+82}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot t\_0\right)\\

\mathbf{else}:\\
\;\;\;\;{b\_m}^{2} \cdot t\_0\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 5.1999999999999997e82

    1. Initial program 57.3%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*57.3%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative57.3%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*57.3%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified57.3%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube40.6%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/330.0%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.0%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/341.9%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube58.7%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      3. unpow258.7%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      4. unpow258.7%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares62.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      6. associate-*l*62.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. metadata-eval62.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
      8. div-inv60.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
      9. 2-sin60.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      10. associate-*l*74.3%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      11. 2-sin74.3%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
      12. count-274.3%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
    8. Applied egg-rr76.5%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Taylor expanded in angle around 0 69.2%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}\right) \]

    if 5.1999999999999997e82 < angle

    1. Initial program 30.7%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*30.7%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative30.7%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*30.7%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified30.7%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube29.2%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/330.4%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.0%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Taylor expanded in b around inf 26.9%

      \[\leadsto \color{blue}{{b}^{2} \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in angle around 0 30.3%

      \[\leadsto {b}^{2} \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 5.2 \cdot 10^{+82}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{b}^{2} \cdot \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.8% accurate, 3.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (*
   (+ b_m a_m)
   (* (- b_m a_m) (sin (* angle_m (* PI 0.011111111111111112)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((b_m + a_m) * ((b_m - a_m) * sin((angle_m * (((double) M_PI) * 0.011111111111111112)))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((b_m + a_m) * ((b_m - a_m) * Math.sin((angle_m * (Math.PI * 0.011111111111111112)))));
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	return angle_s * ((b_m + a_m) * ((b_m - a_m) * math.sin((angle_m * (math.pi * 0.011111111111111112)))))
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	return Float64(angle_s * Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(angle_m * Float64(pi * 0.011111111111111112))))))
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b_m, angle_m)
	tmp = angle_s * ((b_m + a_m) * ((b_m - a_m) * sin((angle_m * (pi * 0.011111111111111112)))));
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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) \]
  2. Step-by-step derivation
    1. associate-*l*52.8%

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutative52.8%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*52.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  3. Simplified52.8%

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. add-cbrt-cube38.7%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
    2. pow1/330.1%

      \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
  6. Applied egg-rr30.0%

    \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
  7. Step-by-step derivation
    1. unpow1/339.3%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
    2. rem-cbrt-cube53.4%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
    3. unpow253.4%

      \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    4. unpow253.4%

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    5. difference-of-squares56.4%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    6. associate-*l*56.4%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
    7. metadata-eval56.4%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
    8. div-inv55.7%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
    9. 2-sin55.7%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    10. associate-*l*66.8%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
    11. 2-sin66.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
    12. count-266.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
  8. Applied egg-rr69.5%

    \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
  9. Step-by-step derivation
    1. add-sqr-sqrt34.6%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\sqrt{\left(\pi \cdot angle\right) \cdot 0.011111111111111112} \cdot \sqrt{\left(\pi \cdot angle\right) \cdot 0.011111111111111112}\right)}\right) \]
    2. pow234.6%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left({\left(\sqrt{\left(\pi \cdot angle\right) \cdot 0.011111111111111112}\right)}^{2}\right)}\right) \]
    3. associate-*l*34.1%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left({\left(\sqrt{\color{blue}{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}}\right)}^{2}\right)\right) \]
  10. Applied egg-rr34.1%

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{2}\right)}\right) \]
  11. Step-by-step derivation
    1. unpow234.1%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\sqrt{\pi \cdot \left(angle \cdot 0.011111111111111112\right)} \cdot \sqrt{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}\right) \]
    2. add-sqr-sqrt67.5%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}\right) \]
    3. *-commutative67.5%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(0.011111111111111112 \cdot angle\right)}\right)\right) \]
    4. associate-*r*68.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(\pi \cdot 0.011111111111111112\right) \cdot angle\right)}\right) \]
  12. Applied egg-rr68.8%

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(\pi \cdot 0.011111111111111112\right) \cdot angle\right)}\right) \]
  13. Final simplification68.8%

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \]
  14. Add Preprocessing

Alternative 7: 67.8% accurate, 3.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (*
   (+ b_m a_m)
   (* (- b_m a_m) (sin (* (* PI angle_m) 0.011111111111111112))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((b_m + a_m) * ((b_m - a_m) * sin(((((double) M_PI) * angle_m) * 0.011111111111111112))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((b_m + a_m) * ((b_m - a_m) * Math.sin(((Math.PI * angle_m) * 0.011111111111111112))));
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	return angle_s * ((b_m + a_m) * ((b_m - a_m) * math.sin(((math.pi * angle_m) * 0.011111111111111112))))
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	return Float64(angle_s * Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112)))))
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b_m, angle_m)
	tmp = angle_s * ((b_m + a_m) * ((b_m - a_m) * sin(((pi * angle_m) * 0.011111111111111112))));
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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) \]
  2. Step-by-step derivation
    1. associate-*l*52.8%

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutative52.8%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*52.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  3. Simplified52.8%

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. add-cbrt-cube38.7%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
    2. pow1/330.1%

      \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
  6. Applied egg-rr30.0%

    \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
  7. Step-by-step derivation
    1. unpow1/339.3%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
    2. rem-cbrt-cube53.4%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
    3. unpow253.4%

      \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    4. unpow253.4%

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    5. difference-of-squares56.4%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    6. associate-*l*56.4%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
    7. metadata-eval56.4%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
    8. div-inv55.7%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
    9. 2-sin55.7%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    10. associate-*l*66.8%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
    11. 2-sin66.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
    12. count-266.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
  8. Applied egg-rr69.5%

    \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
  9. Final simplification69.5%

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
  10. Add Preprocessing

Alternative 8: 47.1% accurate, 15.5× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 6.2 \cdot 10^{-73} \lor \neg \left(b\_m \leq 4.5 \cdot 10^{-55}\right) \land b\_m \leq 10^{+25}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(a\_m \cdot \pi\right) \cdot \left(\left(-b\_m\right) - a\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (or (<= b_m 6.2e-73) (and (not (<= b_m 4.5e-55)) (<= b_m 1e+25)))
    (* 0.011111111111111112 (* angle_m (* (* a_m PI) (- (- b_m) a_m))))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if ((b_m <= 6.2e-73) || (!(b_m <= 4.5e-55) && (b_m <= 1e+25))) {
		tmp = 0.011111111111111112 * (angle_m * ((a_m * ((double) M_PI)) * (-b_m - a_m)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((double) M_PI))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if ((b_m <= 6.2e-73) || (!(b_m <= 4.5e-55) && (b_m <= 1e+25))) {
		tmp = 0.011111111111111112 * (angle_m * ((a_m * Math.PI) * (-b_m - a_m)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * Math.PI)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if (b_m <= 6.2e-73) or (not (b_m <= 4.5e-55) and (b_m <= 1e+25)):
		tmp = 0.011111111111111112 * (angle_m * ((a_m * math.pi) * (-b_m - a_m)))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * math.pi)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if ((b_m <= 6.2e-73) || (!(b_m <= 4.5e-55) && (b_m <= 1e+25)))
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(a_m * pi) * Float64(Float64(-b_m) - a_m))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * pi))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if ((b_m <= 6.2e-73) || (~((b_m <= 4.5e-55)) && (b_m <= 1e+25)))
		tmp = 0.011111111111111112 * (angle_m * ((a_m * pi) * (-b_m - a_m)));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * pi)));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[Or[LessEqual[b$95$m, 6.2e-73], And[N[Not[LessEqual[b$95$m, 4.5e-55]], $MachinePrecision], LessEqual[b$95$m, 1e+25]]], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(a$95$m * Pi), $MachinePrecision] * N[((-b$95$m) - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 6.2 \cdot 10^{-73} \lor \neg \left(b\_m \leq 4.5 \cdot 10^{-55}\right) \land b\_m \leq 10^{+25}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(a\_m \cdot \pi\right) \cdot \left(\left(-b\_m\right) - a\_m\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 6.19999999999999938e-73 or 4.4999999999999997e-55 < b < 1.00000000000000009e25

    1. Initial program 56.1%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*56.1%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative56.1%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*56.1%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified56.1%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow256.1%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      2. unpow256.1%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares58.3%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    6. Applied egg-rr58.3%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 51.7%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative51.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      2. *-commutative51.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
      3. +-commutative51.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
    9. Simplified51.7%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
    10. Step-by-step derivation
      1. distribute-rgt-in50.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(a \cdot \left(b - a\right) + b \cdot \left(b - a\right)\right)}\right)\right) \]
      2. distribute-lft-in50.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    11. Applied egg-rr50.5%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutative50.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot a\right)} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      2. associate-*l*50.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(\pi \cdot \left(b - a\right)\right) \cdot a} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      3. *-commutative50.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot a + \color{blue}{\left(b \cdot \left(b - a\right)\right) \cdot \pi}\right)\right) \]
      4. *-commutative50.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{a \cdot \left(\pi \cdot \left(b - a\right)\right)} + \left(b \cdot \left(b - a\right)\right) \cdot \pi\right)\right) \]
      5. associate-*l*50.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + \color{blue}{b \cdot \left(\left(b - a\right) \cdot \pi\right)}\right)\right) \]
      6. *-commutative50.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + b \cdot \color{blue}{\left(\pi \cdot \left(b - a\right)\right)}\right)\right) \]
      7. distribute-rgt-out51.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    13. Simplified51.7%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    14. Taylor expanded in b around 0 40.9%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(-1 \cdot \left(a \cdot \pi\right)\right)} \cdot \left(a + b\right)\right)\right) \]
    15. Step-by-step derivation
      1. mul-1-neg40.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(-a \cdot \pi\right)} \cdot \left(a + b\right)\right)\right) \]
      2. distribute-rgt-neg-in40.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(a \cdot \left(-\pi\right)\right)} \cdot \left(a + b\right)\right)\right) \]
    16. Simplified40.9%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(a \cdot \left(-\pi\right)\right)} \cdot \left(a + b\right)\right)\right) \]

    if 6.19999999999999938e-73 < b < 4.4999999999999997e-55 or 1.00000000000000009e25 < b

    1. Initial program 43.6%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*43.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative43.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*43.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified43.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow243.6%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      2. unpow243.6%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares48.4%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    6. Applied egg-rr48.4%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 53.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative53.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      2. *-commutative53.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
      3. +-commutative53.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
    9. Simplified53.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
    10. Step-by-step derivation
      1. distribute-rgt-in41.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(a \cdot \left(b - a\right) + b \cdot \left(b - a\right)\right)}\right)\right) \]
      2. distribute-lft-in41.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    11. Applied egg-rr41.9%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutative41.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot a\right)} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      2. associate-*l*41.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(\pi \cdot \left(b - a\right)\right) \cdot a} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      3. *-commutative41.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot a + \color{blue}{\left(b \cdot \left(b - a\right)\right) \cdot \pi}\right)\right) \]
      4. *-commutative41.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{a \cdot \left(\pi \cdot \left(b - a\right)\right)} + \left(b \cdot \left(b - a\right)\right) \cdot \pi\right)\right) \]
      5. associate-*l*42.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + \color{blue}{b \cdot \left(\left(b - a\right) \cdot \pi\right)}\right)\right) \]
      6. *-commutative42.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + b \cdot \color{blue}{\left(\pi \cdot \left(b - a\right)\right)}\right)\right) \]
      7. distribute-rgt-out54.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    13. Simplified54.0%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    14. Taylor expanded in b around inf 52.9%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(b \cdot \pi\right)} \cdot \left(a + b\right)\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.2 \cdot 10^{-73} \lor \neg \left(b \leq 4.5 \cdot 10^{-55}\right) \land b \leq 10^{+25}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(a \cdot \pi\right) \cdot \left(\left(-b\right) - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 62.9% accurate, 23.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{+19}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m + a\_m\right) \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 2.6e+19)
    (* 0.011111111111111112 (* (+ b_m a_m) (* angle_m (* PI (- b_m a_m)))))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 2.6e+19) {
		tmp = 0.011111111111111112 * ((b_m + a_m) * (angle_m * (((double) M_PI) * (b_m - a_m))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((double) M_PI))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 2.6e+19) {
		tmp = 0.011111111111111112 * ((b_m + a_m) * (angle_m * (Math.PI * (b_m - a_m))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * Math.PI)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 2.6e+19:
		tmp = 0.011111111111111112 * ((b_m + a_m) * (angle_m * (math.pi * (b_m - a_m))))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * math.pi)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 2.6e+19)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m + a_m) * Float64(angle_m * Float64(pi * Float64(b_m - a_m)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * pi))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 2.6e+19)
		tmp = 0.011111111111111112 * ((b_m + a_m) * (angle_m * (pi * (b_m - a_m))));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * pi)));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.6e+19], N[(0.011111111111111112 * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(angle$95$m * N[(Pi * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{+19}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m + a\_m\right) \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 2.6e19

    1. Initial program 60.6%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*60.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative60.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*60.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified60.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow260.6%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      2. unpow260.6%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares64.4%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    6. Applied egg-rr64.4%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 59.8%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative59.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      2. *-commutative59.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
      3. +-commutative59.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
    9. Simplified59.8%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
    10. Step-by-step derivation
      1. distribute-rgt-in56.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(a \cdot \left(b - a\right) + b \cdot \left(b - a\right)\right)}\right)\right) \]
      2. distribute-lft-in56.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    11. Applied egg-rr56.0%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutative56.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot a\right)} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      2. associate-*l*56.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(\pi \cdot \left(b - a\right)\right) \cdot a} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      3. *-commutative56.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot a + \color{blue}{\left(b \cdot \left(b - a\right)\right) \cdot \pi}\right)\right) \]
      4. *-commutative56.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{a \cdot \left(\pi \cdot \left(b - a\right)\right)} + \left(b \cdot \left(b - a\right)\right) \cdot \pi\right)\right) \]
      5. associate-*l*56.1%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + \color{blue}{b \cdot \left(\left(b - a\right) \cdot \pi\right)}\right)\right) \]
      6. *-commutative56.1%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + b \cdot \color{blue}{\left(\pi \cdot \left(b - a\right)\right)}\right)\right) \]
      7. distribute-rgt-out59.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    13. Simplified59.8%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    14. Step-by-step derivation
      1. associate-*r*72.3%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\right)} \]
      2. +-commutative72.3%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(b + a\right)}\right) \]
      3. distribute-lft-in67.2%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot b + \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot a\right)} \]
      4. *-commutative67.2%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \cdot b + \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot a\right) \]
      5. associate-*r*67.2%

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(\left(angle \cdot \left(b - a\right)\right) \cdot \pi\right)} \cdot b + \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot a\right) \]
      6. *-commutative67.2%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(angle \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot b + \left(angle \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \cdot a\right) \]
      7. associate-*r*67.3%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(angle \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot b + \color{blue}{\left(\left(angle \cdot \left(b - a\right)\right) \cdot \pi\right)} \cdot a\right) \]
    15. Applied egg-rr67.3%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(\left(angle \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot b + \left(\left(angle \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot a\right)} \]
    16. Step-by-step derivation
      1. distribute-lft-out72.4%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(\left(angle \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \left(b + a\right)\right)} \]
      2. associate-*l*72.3%

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)} \cdot \left(b + a\right)\right) \]
      3. *-commutative72.3%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(\pi \cdot \left(b - a\right)\right)}\right) \cdot \left(b + a\right)\right) \]
      4. +-commutative72.3%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(a + b\right)}\right) \]
    17. Simplified72.3%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\right)} \]

    if 2.6e19 < angle

    1. Initial program 25.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) \]
    2. Step-by-step derivation
      1. associate-*l*25.8%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative25.8%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*25.8%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified25.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow225.8%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      2. unpow225.8%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares25.8%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    6. Applied egg-rr25.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 26.7%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative26.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      2. *-commutative26.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
      3. +-commutative26.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
    9. Simplified26.7%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
    10. Step-by-step derivation
      1. distribute-rgt-in21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(a \cdot \left(b - a\right) + b \cdot \left(b - a\right)\right)}\right)\right) \]
      2. distribute-lft-in21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    11. Applied egg-rr21.5%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutative21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot a\right)} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      2. associate-*l*21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(\pi \cdot \left(b - a\right)\right) \cdot a} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      3. *-commutative21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot a + \color{blue}{\left(b \cdot \left(b - a\right)\right) \cdot \pi}\right)\right) \]
      4. *-commutative21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{a \cdot \left(\pi \cdot \left(b - a\right)\right)} + \left(b \cdot \left(b - a\right)\right) \cdot \pi\right)\right) \]
      5. associate-*l*19.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + \color{blue}{b \cdot \left(\left(b - a\right) \cdot \pi\right)}\right)\right) \]
      6. *-commutative19.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + b \cdot \color{blue}{\left(\pi \cdot \left(b - a\right)\right)}\right)\right) \]
      7. distribute-rgt-out26.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    13. Simplified26.7%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    14. Taylor expanded in b around inf 31.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(b \cdot \pi\right)} \cdot \left(a + b\right)\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2.6 \cdot 10^{+19}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 63.0% accurate, 23.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{+19}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 2.6e+19)
    (* (+ b_m a_m) (* (- b_m a_m) (* (* PI angle_m) 0.011111111111111112)))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 2.6e+19) {
		tmp = (b_m + a_m) * ((b_m - a_m) * ((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((double) M_PI))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 2.6e+19) {
		tmp = (b_m + a_m) * ((b_m - a_m) * ((Math.PI * angle_m) * 0.011111111111111112));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * Math.PI)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 2.6e+19:
		tmp = (b_m + a_m) * ((b_m - a_m) * ((math.pi * angle_m) * 0.011111111111111112))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * math.pi)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 2.6e+19)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * pi))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 2.6e+19)
		tmp = (b_m + a_m) * ((b_m - a_m) * ((pi * angle_m) * 0.011111111111111112));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * pi)));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.6e+19], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{+19}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 2.6e19

    1. Initial program 60.6%

      \[\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) \]
    2. Step-by-step derivation
      1. associate-*l*60.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative60.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*60.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified60.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube42.9%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}} \]
      2. pow1/329.9%

        \[\leadsto \color{blue}{{\left(\left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr29.9%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/344.3%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube62.1%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      3. unpow262.1%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      4. unpow262.1%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares65.9%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      6. associate-*l*65.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. metadata-eval65.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)\right) \]
      8. div-inv64.4%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right) \]
      9. 2-sin64.4%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      10. associate-*l*78.8%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      11. 2-sin78.8%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right) \]
      12. count-278.8%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}\right) \]
    8. Applied egg-rr81.1%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Taylor expanded in angle around 0 72.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}\right) \]

    if 2.6e19 < angle

    1. Initial program 25.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) \]
    2. Step-by-step derivation
      1. associate-*l*25.8%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative25.8%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*25.8%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified25.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow225.8%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      2. unpow225.8%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares25.8%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    6. Applied egg-rr25.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 26.7%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative26.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      2. *-commutative26.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
      3. +-commutative26.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
    9. Simplified26.7%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
    10. Step-by-step derivation
      1. distribute-rgt-in21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(a \cdot \left(b - a\right) + b \cdot \left(b - a\right)\right)}\right)\right) \]
      2. distribute-lft-in21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    11. Applied egg-rr21.5%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutative21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot a\right)} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      2. associate-*l*21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(\pi \cdot \left(b - a\right)\right) \cdot a} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
      3. *-commutative21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot a + \color{blue}{\left(b \cdot \left(b - a\right)\right) \cdot \pi}\right)\right) \]
      4. *-commutative21.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{a \cdot \left(\pi \cdot \left(b - a\right)\right)} + \left(b \cdot \left(b - a\right)\right) \cdot \pi\right)\right) \]
      5. associate-*l*19.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + \color{blue}{b \cdot \left(\left(b - a\right) \cdot \pi\right)}\right)\right) \]
      6. *-commutative19.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + b \cdot \color{blue}{\left(\pi \cdot \left(b - a\right)\right)}\right)\right) \]
      7. distribute-rgt-out26.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    13. Simplified26.7%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
    14. Taylor expanded in b around inf 31.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(b \cdot \pi\right)} \cdot \left(a + b\right)\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2.6 \cdot 10^{+19}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 54.6% accurate, 32.2× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (* 0.011111111111111112 (* angle_m (* PI (* (+ b_m a_m) (- b_m a_m)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (((double) M_PI) * ((b_m + a_m) * (b_m - a_m)))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (Math.PI * ((b_m + a_m) * (b_m - a_m)))));
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	return angle_s * (0.011111111111111112 * (angle_m * (math.pi * ((b_m + a_m) * (b_m - a_m)))))
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(b_m + a_m) * Float64(b_m - a_m))))))
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b_m, angle_m)
	tmp = angle_s * (0.011111111111111112 * (angle_m * (pi * ((b_m + a_m) * (b_m - a_m)))));
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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) \]
  2. Step-by-step derivation
    1. associate-*l*52.8%

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutative52.8%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*52.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  3. Simplified52.8%

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. unpow252.8%

      \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    2. unpow252.8%

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. difference-of-squares55.7%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  6. Applied egg-rr55.7%

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  7. Taylor expanded in angle around 0 52.3%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
  8. Step-by-step derivation
    1. +-commutative52.3%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
    2. *-commutative52.3%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
    3. +-commutative52.3%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
  9. Simplified52.3%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
  10. Final simplification52.3%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right) \]
  11. Add Preprocessing

Alternative 12: 36.7% accurate, 38.1× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (* angle_s (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((double) M_PI)))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * Math.PI))));
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	return angle_s * (0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * math.pi))))
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * pi)))))
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b_m, angle_m)
	tmp = angle_s * (0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * pi))));
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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) \]
  2. Step-by-step derivation
    1. associate-*l*52.8%

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutative52.8%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*52.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  3. Simplified52.8%

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. unpow252.8%

      \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    2. unpow252.8%

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. difference-of-squares55.7%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  6. Applied egg-rr55.7%

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  7. Taylor expanded in angle around 0 52.3%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
  8. Step-by-step derivation
    1. +-commutative52.3%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
    2. *-commutative52.3%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)\right) \]
    3. +-commutative52.3%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right)\right) \]
  9. Simplified52.3%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]
  10. Step-by-step derivation
    1. distribute-rgt-in48.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(a \cdot \left(b - a\right) + b \cdot \left(b - a\right)\right)}\right)\right) \]
    2. distribute-lft-in48.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
  11. Applied egg-rr48.2%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(b - a\right)\right) + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
  12. Step-by-step derivation
    1. *-commutative48.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot a\right)} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
    2. associate-*l*48.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(\pi \cdot \left(b - a\right)\right) \cdot a} + \pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right) \]
    3. *-commutative48.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot a + \color{blue}{\left(b \cdot \left(b - a\right)\right) \cdot \pi}\right)\right) \]
    4. *-commutative48.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{a \cdot \left(\pi \cdot \left(b - a\right)\right)} + \left(b \cdot \left(b - a\right)\right) \cdot \pi\right)\right) \]
    5. associate-*l*47.8%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + \color{blue}{b \cdot \left(\left(b - a\right) \cdot \pi\right)}\right)\right) \]
    6. *-commutative47.8%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot \left(b - a\right)\right) + b \cdot \color{blue}{\left(\pi \cdot \left(b - a\right)\right)}\right)\right) \]
    7. distribute-rgt-out52.3%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
  13. Simplified52.3%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)}\right) \]
  14. Taylor expanded in b around inf 35.6%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(b \cdot \pi\right)} \cdot \left(a + b\right)\right)\right) \]
  15. Final simplification35.6%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(b \cdot \pi\right)\right)\right) \]
  16. Add Preprocessing

Reproduce

?
herbie shell --seed 2024076 
(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)))))