ab-angle->ABCF B

Percentage Accurate: 53.8% → 67.2%
Time: 18.3s
Alternatives: 17
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 17 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: 53.8% 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.2% accurate, 0.4× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sqrt[3]{{\pi}^{1.5}}\\ t_1 := \pi \cdot \frac{angle\_m}{180}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq -2 \cdot 10^{-258}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle\_m \cdot \left(t\_0 \cdot t\_0\right)\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\sqrt{\pi} \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (cbrt (pow PI 1.5))) (t_1 (* PI (/ angle_m 180.0))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_1)) (cos t_1))
         -2e-258)
      (*
       (+ b a)
       (* (- b a) (sin (* (* angle_m (* t_0 t_0)) 0.011111111111111112))))
      (*
       (+ b a)
       (*
        (- b a)
        (sin
         (* (sqrt PI) (* (sqrt PI) (* angle_m 0.011111111111111112))))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = cbrt(pow(((double) M_PI), 1.5));
	double t_1 = ((double) M_PI) * (angle_m / 180.0);
	double tmp;
	if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_1)) * cos(t_1)) <= -2e-258) {
		tmp = (b + a) * ((b - a) * sin(((angle_m * (t_0 * t_0)) * 0.011111111111111112)));
	} else {
		tmp = (b + a) * ((b - a) * sin((sqrt(((double) M_PI)) * (sqrt(((double) M_PI)) * (angle_m * 0.011111111111111112)))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = Math.cbrt(Math.pow(Math.PI, 1.5));
	double t_1 = Math.PI * (angle_m / 180.0);
	double tmp;
	if ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_1)) * Math.cos(t_1)) <= -2e-258) {
		tmp = (b + a) * ((b - a) * Math.sin(((angle_m * (t_0 * t_0)) * 0.011111111111111112)));
	} else {
		tmp = (b + a) * ((b - a) * Math.sin((Math.sqrt(Math.PI) * (Math.sqrt(Math.PI) * (angle_m * 0.011111111111111112)))));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = cbrt((pi ^ 1.5))
	t_1 = Float64(pi * Float64(angle_m / 180.0))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_1)) * cos(t_1)) <= -2e-258)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(Float64(angle_m * Float64(t_0 * t_0)) * 0.011111111111111112))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(sqrt(pi) * Float64(sqrt(pi) * Float64(angle_m * 0.011111111111111112))))));
	end
	return Float64(angle_s * tmp)
end
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_, b_, angle$95$m_] := Block[{t$95$0 = N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = 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, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], -2e-258], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[Sqrt[Pi], $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -1.99999999999999991e-258

    1. Initial program 50.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr60.0%

      \[\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)} \]
    5. Step-by-step derivation
      1. add-cbrt-cubeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      2. add-sqr-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      4. cbrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      6. cbrt-lowering-cbrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      7. pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{1} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{1} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{2}}\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      9. pow-prod-upN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{\left(1 + \frac{1}{2}\right)}\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{\frac{3}{2}}\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{\left(\frac{3}{2}\right)}\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI}\left(\right), \left(\frac{3}{2}\right)\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      13. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \left(\frac{3}{2}\right)\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{3}{2}\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      15. cbrt-lowering-cbrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{3}{2}\right)\right), \mathsf{cbrt.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      16. pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{3}{2}\right)\right), \mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{1} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      17. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{3}{2}\right)\right), \mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{1} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{2}}\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      18. pow-prod-upN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{3}{2}\right)\right), \mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{\left(1 + \frac{1}{2}\right)}\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{3}{2}\right)\right), \mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{\frac{3}{2}}\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      20. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{3}{2}\right)\right), \mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{\left(\frac{3}{2}\right)}\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      21. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{3}{2}\right)\right), \mathsf{cbrt.f64}\left(\mathsf{pow.f64}\left(\mathsf{PI}\left(\right), \left(\frac{3}{2}\right)\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
    6. Applied egg-rr61.7%

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

    if -1.99999999999999991e-258 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr69.3%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      4. add-sqr-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\left(\left(\frac{1}{90} \cdot angle\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{90} \cdot angle\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{90} \cdot angle\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \frac{1}{90}\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{90}\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{90}\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
      11. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{90}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
      12. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{90}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
      13. PI-lowering-PI.f6470.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{90}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr70.2%

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

    \[\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 -2 \cdot 10^{-258}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \left(\sqrt[3]{{\pi}^{1.5}} \cdot \sqrt[3]{{\pi}^{1.5}}\right)\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\sqrt{\pi} \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 67.2% accurate, 1.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (*
   (+ b a)
   (*
    (- b a)
    (sin (* 0.011111111111111112 (* angle_m (pow (sqrt PI) 2.0))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b + a) * ((b - a) * sin((0.011111111111111112 * (angle_m * pow(sqrt(((double) M_PI)), 2.0))))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b + a) * ((b - a) * Math.sin((0.011111111111111112 * (angle_m * Math.pow(Math.sqrt(Math.PI), 2.0))))));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((b + a) * ((b - a) * math.sin((0.011111111111111112 * (angle_m * math.pow(math.sqrt(math.pi), 2.0))))))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(0.011111111111111112 * Float64(angle_m * (sqrt(pi) ^ 2.0)))))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * ((b + a) * ((b - a) * sin((0.011111111111111112 * (angle_m * (sqrt(pi) ^ 2.0))))));
end
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_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle$95$m * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.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. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutativeN/A

      \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*N/A

      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. unpow2N/A

      \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    5. unpow2N/A

      \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    6. difference-of-squaresN/A

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    7. associate-*l*N/A

      \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
    9. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
    11. --lowering--.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
    12. 2-sinN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
    13. count-2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
  4. Applied egg-rr65.8%

    \[\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)} \]
  5. Step-by-step derivation
    1. add-sqr-sqrtN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
    2. pow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{2}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
    3. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)}\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
    4. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
    5. PI-lowering-PI.f6467.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
  6. Applied egg-rr67.6%

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

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right) \]
  8. Add Preprocessing

Alternative 3: 67.1% accurate, 1.9× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 3.6 \cdot 10^{+154}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 3.6e+154)
    (*
     (+ b a)
     (*
      (- b a)
      (sin (* 0.011111111111111112 (* angle_m (cbrt (* PI (* PI PI))))))))
    (* (+ b a) (* (* angle_m 0.011111111111111112) (* PI (- b a)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 3.6e+154) {
		tmp = (b + a) * ((b - a) * sin((0.011111111111111112 * (angle_m * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI))))))));
	} else {
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (((double) M_PI) * (b - a)));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 3.6e+154) {
		tmp = (b + a) * ((b - a) * Math.sin((0.011111111111111112 * (angle_m * Math.cbrt((Math.PI * (Math.PI * Math.PI)))))));
	} else {
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (Math.PI * (b - a)));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (b <= 3.6e+154)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(0.011111111111111112 * Float64(angle_m * cbrt(Float64(pi * Float64(pi * pi))))))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(angle_m * 0.011111111111111112) * Float64(pi * Float64(b - a))));
	end
	return Float64(angle_s * tmp)
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 3.6e+154], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle$95$m * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 3.6 \cdot 10^{+154}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)\right)\\

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


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

    1. Initial program 54.2%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr65.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)} \]
    5. Step-by-step derivation
      1. add-cbrt-cubeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      2. cbrt-lowering-cbrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      5. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      7. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      8. PI-lowering-PI.f6464.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
    6. Applied egg-rr64.5%

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

    if 3.6000000000000001e154 < b

    1. Initial program 34.2%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr70.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)} \]
    5. Taylor expanded in angle around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(b - a\right)}\right)\right)\right) \]
      5. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{b} - a\right)\right)\right)\right) \]
      6. --lowering--.f6483.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right)\right)\right) \]
    7. Simplified83.7%

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

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

Alternative 4: 67.3% accurate, 3.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 4.4 \cdot 10^{+154}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 4.4e+154)
    (* (+ b a) (* (- b a) (sin (* 0.011111111111111112 (* PI angle_m)))))
    (* (+ b a) (* (* angle_m 0.011111111111111112) (* PI (- b a)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 4.4e+154) {
		tmp = (b + a) * ((b - a) * sin((0.011111111111111112 * (((double) M_PI) * angle_m))));
	} else {
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (((double) M_PI) * (b - a)));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 4.4e+154) {
		tmp = (b + a) * ((b - a) * Math.sin((0.011111111111111112 * (Math.PI * angle_m))));
	} else {
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (Math.PI * (b - a)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if b <= 4.4e+154:
		tmp = (b + a) * ((b - a) * math.sin((0.011111111111111112 * (math.pi * angle_m))))
	else:
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (math.pi * (b - a)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (b <= 4.4e+154)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle_m)))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(angle_m * 0.011111111111111112) * Float64(pi * Float64(b - a))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (b <= 4.4e+154)
		tmp = (b + a) * ((b - a) * sin((0.011111111111111112 * (pi * angle_m))));
	else
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (pi * (b - a)));
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 4.4e+154], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 54.2%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr65.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)} \]

    if 4.4000000000000002e154 < b

    1. Initial program 34.2%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr70.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)} \]
    5. Taylor expanded in angle around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(b - a\right)}\right)\right)\right) \]
      5. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{b} - a\right)\right)\right)\right) \]
      6. --lowering--.f6483.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right)\right)\right) \]
    7. Simplified83.7%

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

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

Alternative 5: 67.0% accurate, 3.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 7.5 \cdot 10^{+183}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= a 7.5e+183)
    (* (+ b a) (* (- b a) (sin (* PI (* angle_m 0.011111111111111112)))))
    (* (- b a) (* (+ b a) (* 0.011111111111111112 (* PI angle_m)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 7.5e+183) {
		tmp = (b + a) * ((b - a) * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
	} else {
		tmp = (b - a) * ((b + a) * (0.011111111111111112 * (((double) M_PI) * angle_m)));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 7.5e+183) {
		tmp = (b + a) * ((b - a) * Math.sin((Math.PI * (angle_m * 0.011111111111111112))));
	} else {
		tmp = (b - a) * ((b + a) * (0.011111111111111112 * (Math.PI * angle_m)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if a <= 7.5e+183:
		tmp = (b + a) * ((b - a) * math.sin((math.pi * (angle_m * 0.011111111111111112))))
	else:
		tmp = (b - a) * ((b + a) * (0.011111111111111112 * (math.pi * angle_m)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (a <= 7.5e+183)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * angle_m))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (a <= 7.5e+183)
		tmp = (b + a) * ((b - a) * sin((pi * (angle_m * 0.011111111111111112))));
	else
		tmp = (b - a) * ((b + a) * (0.011111111111111112 * (pi * angle_m)));
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 7.5e+183], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 7.49999999999999966e183

    1. Initial program 53.5%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr66.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)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{90} \cdot angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \frac{1}{90}\right), \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{90}\right), \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      7. PI-lowering-PI.f6464.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{90}\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    6. Applied egg-rr64.4%

      \[\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 7.49999999999999966e183 < a

    1. Initial program 29.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. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
      2. associate-*r*N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
      6. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
      11. *-lowering-*.f6454.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
    5. Simplified54.9%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot b - a \cdot a\right)} \]
    6. Step-by-step derivation
      1. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      2. associate-*r*N/A

        \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b + a\right)\right), \color{blue}{\left(b - a\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(b + a\right)\right), \left(\color{blue}{b} - a\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(b + a\right)\right), \left(b - a\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(\mathsf{PI}\left(\right) \cdot angle\right)\right), \left(b + a\right)\right), \left(b - a\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), angle\right)\right), \left(b + a\right)\right), \left(b - a\right)\right) \]
      8. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right), \left(b + a\right)\right), \left(b - a\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \left(b - a\right)\right) \]
      10. --lowering--.f6491.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right) \]
    7. Applied egg-rr91.6%

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

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

Alternative 6: 67.2% accurate, 3.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 2.6 \cdot 10^{+123}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 2.6e+123)
    (* (+ b a) (* (- b a) (sin (* angle_m (* PI 0.011111111111111112)))))
    (* (+ b a) (* (* angle_m 0.011111111111111112) (* PI (- b a)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 2.6e+123) {
		tmp = (b + a) * ((b - a) * sin((angle_m * (((double) M_PI) * 0.011111111111111112))));
	} else {
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (((double) M_PI) * (b - a)));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 2.6e+123) {
		tmp = (b + a) * ((b - a) * Math.sin((angle_m * (Math.PI * 0.011111111111111112))));
	} else {
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (Math.PI * (b - a)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if b <= 2.6e+123:
		tmp = (b + a) * ((b - a) * math.sin((angle_m * (math.pi * 0.011111111111111112))))
	else:
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (math.pi * (b - a)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (b <= 2.6e+123)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(angle_m * Float64(pi * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(angle_m * 0.011111111111111112) * Float64(pi * Float64(b - a))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (b <= 2.6e+123)
		tmp = (b + a) * ((b - a) * sin((angle_m * (pi * 0.011111111111111112))));
	else
		tmp = (b + a) * ((angle_m * 0.011111111111111112) * (pi * (b - a)));
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 2.6e+123], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 53.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr64.8%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right), angle\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{PI}\left(\right)\right), angle\right)\right)\right)\right) \]
      5. PI-lowering-PI.f6462.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{PI.f64}\left(\right)\right), angle\right)\right)\right)\right) \]
    6. Applied egg-rr62.4%

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

    if 2.59999999999999985e123 < b

    1. Initial program 37.5%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr71.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)} \]
    5. Taylor expanded in angle around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(b - a\right)}\right)\right)\right) \]
      5. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{b} - a\right)\right)\right)\right) \]
      6. --lowering--.f6484.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right)\right)\right) \]
    7. Simplified84.4%

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

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

Alternative 7: 53.3% accurate, 3.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 3.8 \cdot 10^{-153}:\\ \;\;\;\;a \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 3.8e-153)
    (* a (* (- b a) (sin (* 0.011111111111111112 (* PI angle_m)))))
    (* (+ b a) (* (* PI angle_m) (* (- b a) 0.011111111111111112))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 3.8e-153) {
		tmp = a * ((b - a) * sin((0.011111111111111112 * (((double) M_PI) * angle_m))));
	} else {
		tmp = (b + a) * ((((double) M_PI) * angle_m) * ((b - a) * 0.011111111111111112));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 3.8e-153) {
		tmp = a * ((b - a) * Math.sin((0.011111111111111112 * (Math.PI * angle_m))));
	} else {
		tmp = (b + a) * ((Math.PI * angle_m) * ((b - a) * 0.011111111111111112));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if b <= 3.8e-153:
		tmp = a * ((b - a) * math.sin((0.011111111111111112 * (math.pi * angle_m))))
	else:
		tmp = (b + a) * ((math.pi * angle_m) * ((b - a) * 0.011111111111111112))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (b <= 3.8e-153)
		tmp = Float64(a * Float64(Float64(b - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle_m)))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(pi * angle_m) * Float64(Float64(b - a) * 0.011111111111111112)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (b <= 3.8e-153)
		tmp = a * ((b - a) * sin((0.011111111111111112 * (pi * angle_m))));
	else
		tmp = (b + a) * ((pi * angle_m) * ((b - a) * 0.011111111111111112));
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 3.8e-153], N[(a * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 3.80000000000000023e-153

    1. Initial program 53.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
      4. unpow2N/A

        \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      6. difference-of-squaresN/A

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
      12. 2-sinN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
      13. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    4. Applied egg-rr66.3%

      \[\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)} \]
    5. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{a}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. Simplified44.4%

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

      if 3.80000000000000023e-153 < b

      1. Initial program 47.5%

        \[\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. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*l*N/A

          \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
        4. unpow2N/A

          \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        6. difference-of-squaresN/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        7. associate-*l*N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
        12. 2-sinN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
        13. count-2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      4. Applied egg-rr65.0%

        \[\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)} \]
      5. Step-by-step derivation
        1. add-sqr-sqrtN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        2. pow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{2}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)}\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        5. PI-lowering-PI.f6471.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      6. Applied egg-rr71.5%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
      7. Taylor expanded in angle around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), \left(\color{blue}{\left(b - a\right)} \cdot \frac{1}{90}\right)\right)\right) \]
        6. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \left(\left(b - \color{blue}{a}\right) \cdot \frac{1}{90}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\frac{1}{90}}\right)\right)\right) \]
        8. --lowering--.f6466.3%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \frac{1}{90}\right)\right)\right) \]
      9. Simplified66.3%

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\right)} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification52.6%

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

    Alternative 8: 52.3% accurate, 3.7× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 4.5 \cdot 10^{-101}:\\ \;\;\;\;b \cdot \left(b \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b angle_m)
     :precision binary64
     (*
      angle_s
      (if (<= a 4.5e-101)
        (* b (* b (sin (* 0.011111111111111112 (* PI angle_m)))))
        (* (+ b a) (* (* PI angle_m) (* (- b a) 0.011111111111111112))))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	double tmp;
    	if (a <= 4.5e-101) {
    		tmp = b * (b * sin((0.011111111111111112 * (((double) M_PI) * angle_m))));
    	} else {
    		tmp = (b + a) * ((((double) M_PI) * angle_m) * ((b - a) * 0.011111111111111112));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = Math.abs(angle);
    angle\_s = Math.copySign(1.0, angle);
    public static double code(double angle_s, double a, double b, double angle_m) {
    	double tmp;
    	if (a <= 4.5e-101) {
    		tmp = b * (b * Math.sin((0.011111111111111112 * (Math.PI * angle_m))));
    	} else {
    		tmp = (b + a) * ((Math.PI * angle_m) * ((b - a) * 0.011111111111111112));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b, angle_m):
    	tmp = 0
    	if a <= 4.5e-101:
    		tmp = b * (b * math.sin((0.011111111111111112 * (math.pi * angle_m))))
    	else:
    		tmp = (b + a) * ((math.pi * angle_m) * ((b - a) * 0.011111111111111112))
    	return angle_s * tmp
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	tmp = 0.0
    	if (a <= 4.5e-101)
    		tmp = Float64(b * Float64(b * sin(Float64(0.011111111111111112 * Float64(pi * angle_m)))));
    	else
    		tmp = Float64(Float64(b + a) * Float64(Float64(pi * angle_m) * Float64(Float64(b - a) * 0.011111111111111112)));
    	end
    	return Float64(angle_s * tmp)
    end
    
    angle\_m = abs(angle);
    angle\_s = sign(angle) * abs(1.0);
    function tmp_2 = code(angle_s, a, b, angle_m)
    	tmp = 0.0;
    	if (a <= 4.5e-101)
    		tmp = b * (b * sin((0.011111111111111112 * (pi * angle_m))));
    	else
    		tmp = (b + a) * ((pi * angle_m) * ((b - a) * 0.011111111111111112));
    	end
    	tmp_2 = angle_s * tmp;
    end
    
    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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 4.5e-101], N[(b * N[(b * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;a \leq 4.5 \cdot 10^{-101}:\\
    \;\;\;\;b \cdot \left(b \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(b + a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 4.4999999999999998e-101

      1. Initial program 55.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. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*l*N/A

          \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
        4. unpow2N/A

          \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        6. difference-of-squaresN/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        7. associate-*l*N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
        12. 2-sinN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
        13. count-2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      4. Applied egg-rr66.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)} \]
      5. Taylor expanded in b around inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(b \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{b}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{b}\right)\right) \]
        3. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
        6. PI-lowering-PI.f6443.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), b\right)\right) \]
      7. Simplified43.4%

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

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{b}, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), b\right)\right) \]
      9. Step-by-step derivation
        1. Simplified42.5%

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

        if 4.4999999999999998e-101 < a

        1. Initial program 42.0%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
          3. associate-*l*N/A

            \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
          4. unpow2N/A

            \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          6. difference-of-squaresN/A

            \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          7. associate-*l*N/A

            \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
          11. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
          12. 2-sinN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
          13. count-2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        4. Applied egg-rr63.3%

          \[\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)} \]
        5. Step-by-step derivation
          1. add-sqr-sqrtN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
          2. pow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{2}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
          3. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)}\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
          5. PI-lowering-PI.f6468.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        6. Applied egg-rr68.9%

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
        7. Taylor expanded in angle around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)\right) \]
          3. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), \left(\color{blue}{\left(b - a\right)} \cdot \frac{1}{90}\right)\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \left(\left(b - \color{blue}{a}\right) \cdot \frac{1}{90}\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\frac{1}{90}}\right)\right)\right) \]
          8. --lowering--.f6469.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \frac{1}{90}\right)\right)\right) \]
        9. Simplified69.7%

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

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

      Alternative 9: 54.8% accurate, 23.3× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 1.1 \cdot 10^{+147}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (*
        angle_s
        (if (<= b 1.1e+147)
          (* (* 0.011111111111111112 (* PI angle_m)) (- (* b b) (* a a)))
          (* (+ b a) (* 0.011111111111111112 (* angle_m (* b PI)))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (b <= 1.1e+147) {
      		tmp = (0.011111111111111112 * (((double) M_PI) * angle_m)) * ((b * b) - (a * a));
      	} else {
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * (b * ((double) M_PI))));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (b <= 1.1e+147) {
      		tmp = (0.011111111111111112 * (Math.PI * angle_m)) * ((b * b) - (a * a));
      	} else {
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * (b * Math.PI)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	tmp = 0
      	if b <= 1.1e+147:
      		tmp = (0.011111111111111112 * (math.pi * angle_m)) * ((b * b) - (a * a))
      	else:
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * (b * math.pi)))
      	return angle_s * tmp
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	tmp = 0.0
      	if (b <= 1.1e+147)
      		tmp = Float64(Float64(0.011111111111111112 * Float64(pi * angle_m)) * Float64(Float64(b * b) - Float64(a * a)));
      	else
      		tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(b * pi))));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp_2 = code(angle_s, a, b, angle_m)
      	tmp = 0.0;
      	if (b <= 1.1e+147)
      		tmp = (0.011111111111111112 * (pi * angle_m)) * ((b * b) - (a * a));
      	else
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * (b * pi)));
      	end
      	tmp_2 = angle_s * tmp;
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 1.1e+147], N[(N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;b \leq 1.1 \cdot 10^{+147}:\\
      \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b \cdot \pi\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 1.1000000000000001e147

        1. Initial program 54.2%

          \[\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. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
          11. *-lowering-*.f6454.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
        5. Simplified54.0%

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

        if 1.1000000000000001e147 < b

        1. Initial program 34.2%

          \[\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. Add Preprocessing
        3. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
          3. associate-*l*N/A

            \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
          4. unpow2N/A

            \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          6. difference-of-squaresN/A

            \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          7. associate-*l*N/A

            \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
          11. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
          12. 2-sinN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
          13. count-2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        4. Applied egg-rr70.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)} \]
        5. Taylor expanded in b around inf

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(b \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{b}\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{b}\right)\right) \]
          3. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
          6. PI-lowering-PI.f6459.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), b\right)\right) \]
        7. Simplified59.7%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
        9. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{b}\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{b}\right)\right)\right)\right) \]
          5. PI-lowering-PI.f6473.3%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), b\right)\right)\right)\right) \]
        10. Simplified73.3%

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

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

      Alternative 10: 46.1% accurate, 26.2× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 1.32 \cdot 10^{+37}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (*
        angle_s
        (if (<= a 1.32e+37)
          (* (+ b a) (* 0.011111111111111112 (* angle_m (* b PI))))
          (* -0.011111111111111112 (* a (* a (* PI angle_m)))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (a <= 1.32e+37) {
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * (b * ((double) M_PI))));
      	} else {
      		tmp = -0.011111111111111112 * (a * (a * (((double) M_PI) * angle_m)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (a <= 1.32e+37) {
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * (b * Math.PI)));
      	} else {
      		tmp = -0.011111111111111112 * (a * (a * (Math.PI * angle_m)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	tmp = 0
      	if a <= 1.32e+37:
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * (b * math.pi)))
      	else:
      		tmp = -0.011111111111111112 * (a * (a * (math.pi * angle_m)))
      	return angle_s * tmp
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	tmp = 0.0
      	if (a <= 1.32e+37)
      		tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(b * pi))));
      	else
      		tmp = Float64(-0.011111111111111112 * Float64(a * Float64(a * Float64(pi * angle_m))));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp_2 = code(angle_s, a, b, angle_m)
      	tmp = 0.0;
      	if (a <= 1.32e+37)
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * (b * pi)));
      	else
      		tmp = -0.011111111111111112 * (a * (a * (pi * angle_m)));
      	end
      	tmp_2 = angle_s * tmp;
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 1.32e+37], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;a \leq 1.32 \cdot 10^{+37}:\\
      \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b \cdot \pi\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < 1.3199999999999999e37

        1. Initial program 54.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. Add Preprocessing
        3. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
          3. associate-*l*N/A

            \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
          4. unpow2N/A

            \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          6. difference-of-squaresN/A

            \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
          7. associate-*l*N/A

            \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
          11. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
          12. 2-sinN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
          13. count-2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        4. Applied egg-rr66.8%

          \[\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)} \]
        5. Taylor expanded in b around inf

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(b \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{b}\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{b}\right)\right) \]
          3. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), b\right)\right) \]
          6. PI-lowering-PI.f6445.4%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), b\right)\right) \]
        7. Simplified45.4%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
        9. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{b}\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{b}\right)\right)\right)\right) \]
          5. PI-lowering-PI.f6444.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), b\right)\right)\right)\right) \]
        10. Simplified44.0%

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

        if 1.3199999999999999e37 < a

        1. Initial program 38.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. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
          11. *-lowering-*.f6445.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
        5. Simplified45.5%

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

          \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left({a}^{2} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left({a}^{2} \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({a}^{2}\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          7. PI-lowering-PI.f6448.3%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Simplified48.3%

          \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
        9. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(a \cdot a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(a \cdot a\right)}\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot \color{blue}{a}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right), \color{blue}{a}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), a\right), a\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot angle\right), a\right), a\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), angle\right), a\right), a\right)\right) \]
          8. PI-lowering-PI.f6458.7%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), a\right), a\right)\right) \]
        10. Applied egg-rr58.7%

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

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

      Alternative 11: 42.7% accurate, 29.9× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 2.05 \cdot 10^{+36}:\\ \;\;\;\;\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (*
        angle_s
        (if (<= a 2.05e+36)
          (* (* angle_m 0.011111111111111112) (* PI (* b b)))
          (* -0.011111111111111112 (* a (* a (* PI angle_m)))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (a <= 2.05e+36) {
      		tmp = (angle_m * 0.011111111111111112) * (((double) M_PI) * (b * b));
      	} else {
      		tmp = -0.011111111111111112 * (a * (a * (((double) M_PI) * angle_m)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (a <= 2.05e+36) {
      		tmp = (angle_m * 0.011111111111111112) * (Math.PI * (b * b));
      	} else {
      		tmp = -0.011111111111111112 * (a * (a * (Math.PI * angle_m)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	tmp = 0
      	if a <= 2.05e+36:
      		tmp = (angle_m * 0.011111111111111112) * (math.pi * (b * b))
      	else:
      		tmp = -0.011111111111111112 * (a * (a * (math.pi * angle_m)))
      	return angle_s * tmp
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	tmp = 0.0
      	if (a <= 2.05e+36)
      		tmp = Float64(Float64(angle_m * 0.011111111111111112) * Float64(pi * Float64(b * b)));
      	else
      		tmp = Float64(-0.011111111111111112 * Float64(a * Float64(a * Float64(pi * angle_m))));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp_2 = code(angle_s, a, b, angle_m)
      	tmp = 0.0;
      	if (a <= 2.05e+36)
      		tmp = (angle_m * 0.011111111111111112) * (pi * (b * b));
      	else
      		tmp = -0.011111111111111112 * (a * (a * (pi * angle_m)));
      	end
      	tmp_2 = angle_s * tmp;
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 2.05e+36], N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;a \leq 2.05 \cdot 10^{+36}:\\
      \;\;\;\;\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < 2.05000000000000006e36

        1. Initial program 54.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. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
          11. *-lowering-*.f6452.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
        5. Simplified52.7%

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

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot angle\right), \color{blue}{\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \left(\color{blue}{{b}^{2}} \cdot \mathsf{PI}\left(\right)\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{b}^{2}}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left({b}^{2}\right)}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({\color{blue}{b}}^{2}\right)\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right) \]
          8. *-lowering-*.f6438.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right) \]
        8. Simplified38.9%

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

        if 2.05000000000000006e36 < a

        1. Initial program 38.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. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
          11. *-lowering-*.f6445.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
        5. Simplified45.5%

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

          \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left({a}^{2} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left({a}^{2} \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({a}^{2}\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          7. PI-lowering-PI.f6448.3%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Simplified48.3%

          \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
        9. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(a \cdot a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(a \cdot a\right)}\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot \color{blue}{a}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right), \color{blue}{a}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), a\right), a\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot angle\right), a\right), a\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), angle\right), a\right), a\right)\right) \]
          8. PI-lowering-PI.f6458.7%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), a\right), a\right)\right) \]
        10. Applied egg-rr58.7%

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

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

      Alternative 12: 37.0% accurate, 29.9× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 10^{+26}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (*
        angle_s
        (if (<= a 1e+26)
          (* -0.011111111111111112 (* PI (* angle_m (* a a))))
          (* -0.011111111111111112 (* a (* a (* PI angle_m)))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (a <= 1e+26) {
      		tmp = -0.011111111111111112 * (((double) M_PI) * (angle_m * (a * a)));
      	} else {
      		tmp = -0.011111111111111112 * (a * (a * (((double) M_PI) * angle_m)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (a <= 1e+26) {
      		tmp = -0.011111111111111112 * (Math.PI * (angle_m * (a * a)));
      	} else {
      		tmp = -0.011111111111111112 * (a * (a * (Math.PI * angle_m)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	tmp = 0
      	if a <= 1e+26:
      		tmp = -0.011111111111111112 * (math.pi * (angle_m * (a * a)))
      	else:
      		tmp = -0.011111111111111112 * (a * (a * (math.pi * angle_m)))
      	return angle_s * tmp
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	tmp = 0.0
      	if (a <= 1e+26)
      		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle_m * Float64(a * a))));
      	else
      		tmp = Float64(-0.011111111111111112 * Float64(a * Float64(a * Float64(pi * angle_m))));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp_2 = code(angle_s, a, b, angle_m)
      	tmp = 0.0;
      	if (a <= 1e+26)
      		tmp = -0.011111111111111112 * (pi * (angle_m * (a * a)));
      	else
      		tmp = -0.011111111111111112 * (a * (a * (pi * angle_m)));
      	end
      	tmp_2 = angle_s * tmp;
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 1e+26], N[(-0.011111111111111112 * N[(Pi * N[(angle$95$m * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;a \leq 10^{+26}:\\
      \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(a \cdot a\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < 1.00000000000000005e26

        1. Initial program 55.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. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
          11. *-lowering-*.f6453.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
        5. Simplified53.5%

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

          \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left({a}^{2} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left({a}^{2} \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({a}^{2}\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          7. PI-lowering-PI.f6432.8%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Simplified32.8%

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

        if 1.00000000000000005e26 < a

        1. Initial program 38.5%

          \[\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. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
          11. *-lowering-*.f6443.4%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
        5. Simplified43.4%

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

          \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left({a}^{2} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left({a}^{2} \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({a}^{2}\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          7. PI-lowering-PI.f6445.9%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Simplified45.9%

          \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
        9. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(a \cdot a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(a \cdot a\right)}\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot \color{blue}{a}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right), \color{blue}{a}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), a\right), a\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot angle\right), a\right), a\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), angle\right), a\right), a\right)\right) \]
          8. PI-lowering-PI.f6455.7%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), a\right), a\right)\right) \]
        10. Applied egg-rr55.7%

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

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

      Alternative 13: 37.0% accurate, 29.9× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 10^{-28}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(a \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (*
        angle_s
        (if (<= a 1e-28)
          (* -0.011111111111111112 (* PI (* angle_m (* a a))))
          (* -0.011111111111111112 (* a (* angle_m (* a PI)))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (a <= 1e-28) {
      		tmp = -0.011111111111111112 * (((double) M_PI) * (angle_m * (a * a)));
      	} else {
      		tmp = -0.011111111111111112 * (a * (angle_m * (a * ((double) M_PI))));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (a <= 1e-28) {
      		tmp = -0.011111111111111112 * (Math.PI * (angle_m * (a * a)));
      	} else {
      		tmp = -0.011111111111111112 * (a * (angle_m * (a * Math.PI)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	tmp = 0
      	if a <= 1e-28:
      		tmp = -0.011111111111111112 * (math.pi * (angle_m * (a * a)))
      	else:
      		tmp = -0.011111111111111112 * (a * (angle_m * (a * math.pi)))
      	return angle_s * tmp
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	tmp = 0.0
      	if (a <= 1e-28)
      		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle_m * Float64(a * a))));
      	else
      		tmp = Float64(-0.011111111111111112 * Float64(a * Float64(angle_m * Float64(a * pi))));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp_2 = code(angle_s, a, b, angle_m)
      	tmp = 0.0;
      	if (a <= 1e-28)
      		tmp = -0.011111111111111112 * (pi * (angle_m * (a * a)));
      	else
      		tmp = -0.011111111111111112 * (a * (angle_m * (a * pi)));
      	end
      	tmp_2 = angle_s * tmp;
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 1e-28], N[(-0.011111111111111112 * N[(Pi * N[(angle$95$m * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(a * N[(angle$95$m * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;a \leq 10^{-28}:\\
      \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(a \cdot a\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(a \cdot \pi\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < 9.99999999999999971e-29

        1. Initial program 55.4%

          \[\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. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
          11. *-lowering-*.f6453.3%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
        5. Simplified53.3%

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

          \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left({a}^{2} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left({a}^{2} \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({a}^{2}\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          7. PI-lowering-PI.f6433.9%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Simplified33.9%

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

        if 9.99999999999999971e-29 < a

        1. Initial program 39.4%

          \[\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. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
          11. *-lowering-*.f6445.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
        5. Simplified45.0%

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

          \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left({a}^{2} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left({a}^{2} \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({a}^{2}\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
          7. PI-lowering-PI.f6441.2%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Simplified41.2%

          \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
        9. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot angle\right)}\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\mathsf{PI}\left(\right) \cdot \left(a \cdot \color{blue}{\left(a \cdot angle\right)}\right)\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot \color{blue}{\left(a \cdot angle\right)}\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot \left(angle \cdot \color{blue}{a}\right)\right)\right) \]
          5. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot angle\right) \cdot \color{blue}{a}\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot angle\right), \color{blue}{a}\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot a\right), angle\right), a\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), a\right), angle\right), a\right)\right) \]
          9. PI-lowering-PI.f6449.9%

            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), a\right), angle\right), a\right)\right) \]
        10. Applied egg-rr49.9%

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

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

      Alternative 14: 62.6% accurate, 32.2× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\right)\right) \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (* angle_s (* (+ b a) (* (* PI angle_m) (* (- b a) 0.011111111111111112)))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((b + a) * ((((double) M_PI) * angle_m) * ((b - a) * 0.011111111111111112)));
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((b + a) * ((Math.PI * angle_m) * ((b - a) * 0.011111111111111112)));
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	return angle_s * ((b + a) * ((math.pi * angle_m) * ((b - a) * 0.011111111111111112)))
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(Float64(b + a) * Float64(Float64(pi * angle_m) * Float64(Float64(b - a) * 0.011111111111111112))))
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp = code(angle_s, a, b, angle_m)
      	tmp = angle_s * ((b + a) * ((pi * angle_m) * ((b - a) * 0.011111111111111112)));
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 51.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. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*l*N/A

          \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
        4. unpow2N/A

          \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        6. difference-of-squaresN/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        7. associate-*l*N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
        12. 2-sinN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
        13. count-2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      4. Applied egg-rr65.8%

        \[\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)} \]
      5. Step-by-step derivation
        1. add-sqr-sqrtN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        2. pow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{2}\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)}\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
        5. PI-lowering-PI.f6467.6%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right)\right)\right) \]
      6. Applied egg-rr67.6%

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
      7. Taylor expanded in angle around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), \left(\color{blue}{\left(b - a\right)} \cdot \frac{1}{90}\right)\right)\right) \]
        6. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \left(\left(b - \color{blue}{a}\right) \cdot \frac{1}{90}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\frac{1}{90}}\right)\right)\right) \]
        8. --lowering--.f6463.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \frac{1}{90}\right)\right)\right) \]
      9. Simplified63.4%

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

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

      Alternative 15: 62.6% accurate, 32.2× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right) \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (* angle_s (* (+ b a) (* (* angle_m 0.011111111111111112) (* PI (- b a))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((b + a) * ((angle_m * 0.011111111111111112) * (((double) M_PI) * (b - a))));
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((b + a) * ((angle_m * 0.011111111111111112) * (Math.PI * (b - a))));
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	return angle_s * ((b + a) * ((angle_m * 0.011111111111111112) * (math.pi * (b - a))))
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(Float64(b + a) * Float64(Float64(angle_m * 0.011111111111111112) * Float64(pi * Float64(b - a)))))
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp = code(angle_s, a, b, angle_m)
      	tmp = angle_s * ((b + a) * ((angle_m * 0.011111111111111112) * (pi * (b - a))));
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 51.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. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*l*N/A

          \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
        4. unpow2N/A

          \[\leadsto \left(b \cdot b - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \left(b \cdot b - a \cdot a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        6. difference-of-squaresN/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        7. associate-*l*N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(b + a\right), \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)}\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\color{blue}{\left(b - a\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)}\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \left(\color{blue}{2} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)\right) \]
        12. 2-sinN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right) \]
        13. count-2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
      4. Applied egg-rr65.8%

        \[\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)} \]
      5. Taylor expanded in angle around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(b - a\right)}\right)\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{b} - a\right)\right)\right)\right) \]
        6. --lowering--.f6463.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right)\right)\right) \]
      7. Simplified63.4%

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

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

      Alternative 16: 62.6% accurate, 32.2× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right) \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (* angle_s (* (- b a) (* (+ b a) (* 0.011111111111111112 (* PI angle_m))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((b - a) * ((b + a) * (0.011111111111111112 * (((double) M_PI) * angle_m))));
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((b - a) * ((b + a) * (0.011111111111111112 * (Math.PI * angle_m))));
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	return angle_s * ((b - a) * ((b + a) * (0.011111111111111112 * (math.pi * angle_m))))
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * angle_m)))))
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp = code(angle_s, a, b, angle_m)
      	tmp = angle_s * ((b - a) * ((b + a) * (0.011111111111111112 * (pi * angle_m))));
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 51.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. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        2. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
        6. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
        7. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
        10. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
        11. *-lowering-*.f6451.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
      5. Simplified51.2%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot b - a \cdot a\right)} \]
      6. Step-by-step derivation
        1. difference-of-squaresN/A

          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        2. associate-*r*N/A

          \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b + a\right)\right), \color{blue}{\left(b - a\right)}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(b + a\right)\right), \left(\color{blue}{b} - a\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(b + a\right)\right), \left(b - a\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(\mathsf{PI}\left(\right) \cdot angle\right)\right), \left(b + a\right)\right), \left(b - a\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), angle\right)\right), \left(b + a\right)\right), \left(b - a\right)\right) \]
        8. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right), \left(b + a\right)\right), \left(b - a\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \left(b - a\right)\right) \]
        10. --lowering--.f6463.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right) \]
      7. Applied egg-rr63.4%

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

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

      Alternative 17: 34.8% accurate, 46.6× speedup?

      \[\begin{array}{l} 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(a \cdot \left(a \cdot \pi\right)\right)\right)\right) \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (* angle_s (* -0.011111111111111112 (* angle_m (* a (* a PI))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * (-0.011111111111111112 * (angle_m * (a * (a * ((double) M_PI)))));
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * (-0.011111111111111112 * (angle_m * (a * (a * Math.PI))));
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	return angle_s * (-0.011111111111111112 * (angle_m * (a * (a * math.pi))))
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(-0.011111111111111112 * Float64(angle_m * Float64(a * Float64(a * pi)))))
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp = code(angle_s, a, b, angle_m)
      	tmp = angle_s * (-0.011111111111111112 * (angle_m * (a * (a * pi))));
      end
      
      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_, b_, angle$95$m_] := N[(angle$95$s * N[(-0.011111111111111112 * N[(angle$95$m * N[(a * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      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(a \cdot \left(a \cdot \pi\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 51.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. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        2. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \left({b}^{\color{blue}{2}} - {a}^{2}\right)\right) \]
        6. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \left({b}^{2} - {a}^{2}\right)\right) \]
        7. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2}\right)}\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{a}}^{2}\right)\right)\right) \]
        10. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{a}\right)\right)\right) \]
        11. *-lowering-*.f6451.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
      5. Simplified51.2%

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

        \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left({a}^{2} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left({a}^{2} \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({a}^{2}\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
        7. PI-lowering-PI.f6435.8%

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. Simplified35.8%

        \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
      9. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot angle\right)}\right)\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\mathsf{PI}\left(\right) \cdot \left(a \cdot \color{blue}{\left(a \cdot angle\right)}\right)\right)\right) \]
        3. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot \color{blue}{\left(a \cdot angle\right)}\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot \left(angle \cdot \color{blue}{a}\right)\right)\right) \]
        5. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot angle\right) \cdot \color{blue}{a}\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot angle\right), \color{blue}{a}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot a\right), angle\right), a\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), a\right), angle\right), a\right)\right) \]
        9. PI-lowering-PI.f6437.6%

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), a\right), angle\right), a\right)\right) \]
      10. Applied egg-rr37.6%

        \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(\pi \cdot a\right) \cdot angle\right) \cdot a\right)} \]
      11. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(a \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot a\right) \cdot angle\right)}\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \left(\left(a \cdot \left(\mathsf{PI}\left(\right) \cdot a\right)\right) \cdot \color{blue}{angle}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\left(a \cdot \left(\mathsf{PI}\left(\right) \cdot a\right)\right), \color{blue}{angle}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \left(\mathsf{PI}\left(\right) \cdot a\right)\right), angle\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \left(a \cdot \mathsf{PI}\left(\right)\right)\right), angle\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{PI}\left(\right)\right)\right), angle\right)\right) \]
        7. PI-lowering-PI.f6435.8%

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right)\right), angle\right)\right) \]
      12. Applied egg-rr35.8%

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

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

      Reproduce

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