ab-angle->ABCF B

Percentage Accurate: 54.0% → 67.5%
Time: 19.4s
Alternatives: 26
Speedup: 23.3×

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 26 alternatives:

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

Initial Program: 54.0% 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.5% accurate, 0.8× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \frac{\pi}{\frac{180}{angle\_m}}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 10^{-281}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\frac{\pi}{180}}{\frac{1}{angle\_m}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{180}{\pi \cdot angle\_m}\right)}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin t\_0\right) \cdot \left(\left(b - a\right) \cdot \cos t\_0\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 (/ PI (/ 180.0 angle_m))))
   (*
    angle_s
    (if (<= (pow b 2.0) 1e-281)
      (*
       (+ b a)
       (*
        (* 2.0 (sin (/ (/ PI 180.0) (/ 1.0 angle_m))))
        (* (- b a) (cos (exp (- 0.0 (log (/ 180.0 (* PI angle_m)))))))))
      (* (+ b a) (* (* 2.0 (sin t_0)) (* (- b a) (cos t_0))))))))
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 = ((double) M_PI) / (180.0 / angle_m);
	double tmp;
	if (pow(b, 2.0) <= 1e-281) {
		tmp = (b + a) * ((2.0 * sin(((((double) M_PI) / 180.0) / (1.0 / angle_m)))) * ((b - a) * cos(exp((0.0 - log((180.0 / (((double) M_PI) * angle_m))))))));
	} else {
		tmp = (b + a) * ((2.0 * sin(t_0)) * ((b - a) * cos(t_0)));
	}
	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.PI / (180.0 / angle_m);
	double tmp;
	if (Math.pow(b, 2.0) <= 1e-281) {
		tmp = (b + a) * ((2.0 * Math.sin(((Math.PI / 180.0) / (1.0 / angle_m)))) * ((b - a) * Math.cos(Math.exp((0.0 - Math.log((180.0 / (Math.PI * angle_m))))))));
	} else {
		tmp = (b + a) * ((2.0 * Math.sin(t_0)) * ((b - a) * Math.cos(t_0)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = math.pi / (180.0 / angle_m)
	tmp = 0
	if math.pow(b, 2.0) <= 1e-281:
		tmp = (b + a) * ((2.0 * math.sin(((math.pi / 180.0) / (1.0 / angle_m)))) * ((b - a) * math.cos(math.exp((0.0 - math.log((180.0 / (math.pi * angle_m))))))))
	else:
		tmp = (b + a) * ((2.0 * math.sin(t_0)) * ((b - a) * math.cos(t_0)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi / Float64(180.0 / angle_m))
	tmp = 0.0
	if ((b ^ 2.0) <= 1e-281)
		tmp = Float64(Float64(b + a) * Float64(Float64(2.0 * sin(Float64(Float64(pi / 180.0) / Float64(1.0 / angle_m)))) * Float64(Float64(b - a) * cos(exp(Float64(0.0 - log(Float64(180.0 / Float64(pi * angle_m)))))))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(2.0 * sin(t_0)) * Float64(Float64(b - a) * cos(t_0))));
	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)
	t_0 = pi / (180.0 / angle_m);
	tmp = 0.0;
	if ((b ^ 2.0) <= 1e-281)
		tmp = (b + a) * ((2.0 * sin(((pi / 180.0) / (1.0 / angle_m)))) * ((b - a) * cos(exp((0.0 - log((180.0 / (pi * angle_m))))))));
	else
		tmp = (b + a) * ((2.0 * sin(t_0)) * ((b - a) * cos(t_0)));
	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_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 1e-281], N[(N[(b + a), $MachinePrecision] * N[(N[(2.0 * N[Sin[N[(N[(Pi / 180.0), $MachinePrecision] / N[(1.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[N[Exp[N[(0.0 - N[Log[N[(180.0 / N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $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 := \frac{\pi}{\frac{180}{angle\_m}}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 10^{-281}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\frac{\pi}{180}}{\frac{1}{angle\_m}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{180}{\pi \cdot angle\_m}\right)}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin t\_0\right) \cdot \left(\left(b - a\right) \cdot \cos t\_0\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 1e-281

    1. Initial program 55.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr66.6%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{180 \cdot \frac{1}{angle}}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\frac{1}{angle}}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{180}\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f6467.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr67.6%

      \[\leadsto \left(b + a\right) \cdot \left(\left(2 \cdot \sin \color{blue}{\left(\frac{\frac{\pi}{180}}{\frac{1}{angle}}\right)}\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right) \]
    9. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\left({\left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\right)}^{-1}\right)\right)\right)\right)\right) \]
      3. pow-to-expN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\left(e^{\log \left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\right) \cdot -1}\right)\right)\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)\right), -1\right)\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(180, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), angle\right)\right)\right), -1\right)\right)\right)\right)\right)\right) \]
      11. PI-lowering-PI.f6431.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(180, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right)\right), -1\right)\right)\right)\right)\right)\right) \]
    10. Applied egg-rr31.5%

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

    if 1e-281 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 59.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr72.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 10^{-281}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\frac{\pi}{180}}{\frac{1}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{180}{\pi \cdot angle}\right)}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 67.3% accurate, 0.8× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \frac{\pi}{\frac{180}{angle\_m}}\\ t_1 := 2 \cdot \sin t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{-307}:\\ \;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{\frac{180}{angle\_m}}{\pi}\right)}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos t\_0\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 (/ PI (/ 180.0 angle_m))) (t_1 (* 2.0 (sin t_0))))
   (*
    angle_s
    (if (<= (pow b 2.0) 5e-307)
      (*
       (+ b a)
       (* t_1 (* (- b a) (cos (exp (- 0.0 (log (/ (/ 180.0 angle_m) PI))))))))
      (* (+ b a) (* t_1 (* (- b a) (cos t_0))))))))
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 = ((double) M_PI) / (180.0 / angle_m);
	double t_1 = 2.0 * sin(t_0);
	double tmp;
	if (pow(b, 2.0) <= 5e-307) {
		tmp = (b + a) * (t_1 * ((b - a) * cos(exp((0.0 - log(((180.0 / angle_m) / ((double) M_PI))))))));
	} else {
		tmp = (b + a) * (t_1 * ((b - a) * cos(t_0)));
	}
	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.PI / (180.0 / angle_m);
	double t_1 = 2.0 * Math.sin(t_0);
	double tmp;
	if (Math.pow(b, 2.0) <= 5e-307) {
		tmp = (b + a) * (t_1 * ((b - a) * Math.cos(Math.exp((0.0 - Math.log(((180.0 / angle_m) / Math.PI)))))));
	} else {
		tmp = (b + a) * (t_1 * ((b - a) * Math.cos(t_0)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = math.pi / (180.0 / angle_m)
	t_1 = 2.0 * math.sin(t_0)
	tmp = 0
	if math.pow(b, 2.0) <= 5e-307:
		tmp = (b + a) * (t_1 * ((b - a) * math.cos(math.exp((0.0 - math.log(((180.0 / angle_m) / math.pi)))))))
	else:
		tmp = (b + a) * (t_1 * ((b - a) * math.cos(t_0)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi / Float64(180.0 / angle_m))
	t_1 = Float64(2.0 * sin(t_0))
	tmp = 0.0
	if ((b ^ 2.0) <= 5e-307)
		tmp = Float64(Float64(b + a) * Float64(t_1 * Float64(Float64(b - a) * cos(exp(Float64(0.0 - log(Float64(Float64(180.0 / angle_m) / pi))))))));
	else
		tmp = Float64(Float64(b + a) * Float64(t_1 * Float64(Float64(b - a) * cos(t_0))));
	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)
	t_0 = pi / (180.0 / angle_m);
	t_1 = 2.0 * sin(t_0);
	tmp = 0.0;
	if ((b ^ 2.0) <= 5e-307)
		tmp = (b + a) * (t_1 * ((b - a) * cos(exp((0.0 - log(((180.0 / angle_m) / pi)))))));
	else
		tmp = (b + a) * (t_1 * ((b - a) * cos(t_0)));
	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_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e-307], N[(N[(b + a), $MachinePrecision] * N[(t$95$1 * N[(N[(b - a), $MachinePrecision] * N[Cos[N[Exp[N[(0.0 - N[Log[N[(N[(180.0 / angle$95$m), $MachinePrecision] / Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(t$95$1 * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $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 := \frac{\pi}{\frac{180}{angle\_m}}\\
t_1 := 2 \cdot \sin t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{-307}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{\frac{180}{angle\_m}}{\pi}\right)}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos t\_0\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 5.00000000000000014e-307

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr63.8%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\left({\left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\right)}^{-1}\right)\right)\right)\right)\right) \]
      3. pow-to-expN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\left(e^{\log \left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\right) \cdot -1}\right)\right)\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\right)\right), -1\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(\left(\frac{180}{angle}\right), \mathsf{PI}\left(\right)\right)\right), -1\right)\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(180, angle\right), \mathsf{PI}\left(\right)\right)\right), -1\right)\right)\right)\right)\right)\right) \]
      9. PI-lowering-PI.f6432.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(180, angle\right), \mathsf{PI.f64}\left(\right)\right)\right), -1\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr32.5%

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

    if 5.00000000000000014e-307 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 60.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr72.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{-307}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{\frac{180}{angle}}{\pi}\right)}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.3% accurate, 0.8× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \frac{\pi}{\frac{180}{angle\_m}}\\ t_1 := 2 \cdot \sin t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{-307}:\\ \;\;\;\;\left(\left(b + a\right) \cdot t\_1\right) \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{180}{\pi \cdot angle\_m}\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos t\_0\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 (/ PI (/ 180.0 angle_m))) (t_1 (* 2.0 (sin t_0))))
   (*
    angle_s
    (if (<= (pow b 2.0) 5e-307)
      (*
       (* (+ b a) t_1)
       (* (- b a) (cos (exp (- 0.0 (log (/ 180.0 (* PI angle_m))))))))
      (* (+ b a) (* t_1 (* (- b a) (cos t_0))))))))
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 = ((double) M_PI) / (180.0 / angle_m);
	double t_1 = 2.0 * sin(t_0);
	double tmp;
	if (pow(b, 2.0) <= 5e-307) {
		tmp = ((b + a) * t_1) * ((b - a) * cos(exp((0.0 - log((180.0 / (((double) M_PI) * angle_m)))))));
	} else {
		tmp = (b + a) * (t_1 * ((b - a) * cos(t_0)));
	}
	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.PI / (180.0 / angle_m);
	double t_1 = 2.0 * Math.sin(t_0);
	double tmp;
	if (Math.pow(b, 2.0) <= 5e-307) {
		tmp = ((b + a) * t_1) * ((b - a) * Math.cos(Math.exp((0.0 - Math.log((180.0 / (Math.PI * angle_m)))))));
	} else {
		tmp = (b + a) * (t_1 * ((b - a) * Math.cos(t_0)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = math.pi / (180.0 / angle_m)
	t_1 = 2.0 * math.sin(t_0)
	tmp = 0
	if math.pow(b, 2.0) <= 5e-307:
		tmp = ((b + a) * t_1) * ((b - a) * math.cos(math.exp((0.0 - math.log((180.0 / (math.pi * angle_m)))))))
	else:
		tmp = (b + a) * (t_1 * ((b - a) * math.cos(t_0)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi / Float64(180.0 / angle_m))
	t_1 = Float64(2.0 * sin(t_0))
	tmp = 0.0
	if ((b ^ 2.0) <= 5e-307)
		tmp = Float64(Float64(Float64(b + a) * t_1) * Float64(Float64(b - a) * cos(exp(Float64(0.0 - log(Float64(180.0 / Float64(pi * angle_m))))))));
	else
		tmp = Float64(Float64(b + a) * Float64(t_1 * Float64(Float64(b - a) * cos(t_0))));
	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)
	t_0 = pi / (180.0 / angle_m);
	t_1 = 2.0 * sin(t_0);
	tmp = 0.0;
	if ((b ^ 2.0) <= 5e-307)
		tmp = ((b + a) * t_1) * ((b - a) * cos(exp((0.0 - log((180.0 / (pi * angle_m)))))));
	else
		tmp = (b + a) * (t_1 * ((b - a) * cos(t_0)));
	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_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e-307], N[(N[(N[(b + a), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[N[Exp[N[(0.0 - N[Log[N[(180.0 / N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(t$95$1 * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $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 := \frac{\pi}{\frac{180}{angle\_m}}\\
t_1 := 2 \cdot \sin t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{-307}:\\
\;\;\;\;\left(\left(b + a\right) \cdot t\_1\right) \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{180}{\pi \cdot angle\_m}\right)}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos t\_0\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 5.00000000000000014e-307

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
    5. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left({\left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\right)}^{-1}\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      3. pow-to-expN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(e^{\log \left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\right) \cdot -1}\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\right)\right), -1\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      7. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\frac{180}{\mathsf{PI}\left(\right) \cdot angle}\right)\right), -1\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      8. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(180, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), angle\right)\right)\right), -1\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      10. PI-lowering-PI.f6432.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(180, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right)\right), -1\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
    6. Applied egg-rr32.5%

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

    if 5.00000000000000014e-307 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 60.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr72.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{-307}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(e^{0 - \log \left(\frac{180}{\pi \cdot angle}\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.5% accurate, 1.0× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \frac{\pi}{\frac{180}{angle\_m}}\\ t_1 := 2 \cdot \sin t\_0\\ t_2 := \pi \cdot \left(\pi \cdot \pi\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 10^{-204}:\\ \;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{{\left(t\_2 \cdot t\_2\right)}^{0.16666666666666666}}{\frac{180}{angle\_m}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos t\_0\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 (/ PI (/ 180.0 angle_m)))
        (t_1 (* 2.0 (sin t_0)))
        (t_2 (* PI (* PI PI))))
   (*
    angle_s
    (if (<= (pow b 2.0) 1e-204)
      (*
       (+ b a)
       (*
        t_1
        (*
         (- b a)
         (cos (/ (pow (* t_2 t_2) 0.16666666666666666) (/ 180.0 angle_m))))))
      (* (+ b a) (* t_1 (* (- b a) (cos t_0))))))))
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 = ((double) M_PI) / (180.0 / angle_m);
	double t_1 = 2.0 * sin(t_0);
	double t_2 = ((double) M_PI) * (((double) M_PI) * ((double) M_PI));
	double tmp;
	if (pow(b, 2.0) <= 1e-204) {
		tmp = (b + a) * (t_1 * ((b - a) * cos((pow((t_2 * t_2), 0.16666666666666666) / (180.0 / angle_m)))));
	} else {
		tmp = (b + a) * (t_1 * ((b - a) * cos(t_0)));
	}
	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.PI / (180.0 / angle_m);
	double t_1 = 2.0 * Math.sin(t_0);
	double t_2 = Math.PI * (Math.PI * Math.PI);
	double tmp;
	if (Math.pow(b, 2.0) <= 1e-204) {
		tmp = (b + a) * (t_1 * ((b - a) * Math.cos((Math.pow((t_2 * t_2), 0.16666666666666666) / (180.0 / angle_m)))));
	} else {
		tmp = (b + a) * (t_1 * ((b - a) * Math.cos(t_0)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = math.pi / (180.0 / angle_m)
	t_1 = 2.0 * math.sin(t_0)
	t_2 = math.pi * (math.pi * math.pi)
	tmp = 0
	if math.pow(b, 2.0) <= 1e-204:
		tmp = (b + a) * (t_1 * ((b - a) * math.cos((math.pow((t_2 * t_2), 0.16666666666666666) / (180.0 / angle_m)))))
	else:
		tmp = (b + a) * (t_1 * ((b - a) * math.cos(t_0)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi / Float64(180.0 / angle_m))
	t_1 = Float64(2.0 * sin(t_0))
	t_2 = Float64(pi * Float64(pi * pi))
	tmp = 0.0
	if ((b ^ 2.0) <= 1e-204)
		tmp = Float64(Float64(b + a) * Float64(t_1 * Float64(Float64(b - a) * cos(Float64((Float64(t_2 * t_2) ^ 0.16666666666666666) / Float64(180.0 / angle_m))))));
	else
		tmp = Float64(Float64(b + a) * Float64(t_1 * Float64(Float64(b - a) * cos(t_0))));
	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)
	t_0 = pi / (180.0 / angle_m);
	t_1 = 2.0 * sin(t_0);
	t_2 = pi * (pi * pi);
	tmp = 0.0;
	if ((b ^ 2.0) <= 1e-204)
		tmp = (b + a) * (t_1 * ((b - a) * cos((((t_2 * t_2) ^ 0.16666666666666666) / (180.0 / angle_m)))));
	else
		tmp = (b + a) * (t_1 * ((b - a) * cos(t_0)));
	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_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 1e-204], N[(N[(b + a), $MachinePrecision] * N[(t$95$1 * N[(N[(b - a), $MachinePrecision] * N[Cos[N[(N[Power[N[(t$95$2 * t$95$2), $MachinePrecision], 0.16666666666666666], $MachinePrecision] / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(t$95$1 * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $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 := \frac{\pi}{\frac{180}{angle\_m}}\\
t_1 := 2 \cdot \sin t\_0\\
t_2 := \pi \cdot \left(\pi \cdot \pi\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 10^{-204}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{{\left(t\_2 \cdot t\_2\right)}^{0.16666666666666666}}{\frac{180}{angle\_m}}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(t\_1 \cdot \left(\left(b - a\right) \cdot \cos t\_0\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 1e-204

    1. Initial program 57.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr69.5%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]
    7. 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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.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), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
      3. pow1/3N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)}^{\frac{1}{3}}\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
      4. sqr-powN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(\frac{\frac{1}{3}}{2}\right)\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr76.9%

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

    if 1e-204 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 58.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr71.3%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 67.4% accurate, 1.9× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \frac{\pi}{\frac{180}{angle\_m}}\\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(2 \cdot \sin t\_0\right) \cdot \left(\left(b - a\right) \cdot \cos t\_0\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
 (let* ((t_0 (/ PI (/ 180.0 angle_m))))
   (* angle_s (* (+ b a) (* (* 2.0 (sin t_0)) (* (- b a) (cos t_0)))))))
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 = ((double) M_PI) / (180.0 / angle_m);
	return angle_s * ((b + a) * ((2.0 * sin(t_0)) * ((b - a) * cos(t_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) {
	double t_0 = Math.PI / (180.0 / angle_m);
	return angle_s * ((b + a) * ((2.0 * Math.sin(t_0)) * ((b - a) * Math.cos(t_0))));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = math.pi / (180.0 / angle_m)
	return angle_s * ((b + a) * ((2.0 * math.sin(t_0)) * ((b - a) * math.cos(t_0))))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi / Float64(180.0 / angle_m))
	return Float64(angle_s * Float64(Float64(b + a) * Float64(Float64(2.0 * sin(t_0)) * Float64(Float64(b - a) * cos(t_0)))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	t_0 = pi / (180.0 / angle_m);
	tmp = angle_s * ((b + a) * ((2.0 * sin(t_0)) * ((b - a) * cos(t_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_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $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 := \frac{\pi}{\frac{180}{angle\_m}}\\
angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(2 \cdot \sin t\_0\right) \cdot \left(\left(b - a\right) \cdot \cos t\_0\right)\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 58.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
  5. Step-by-step derivation
    1. *-commutativeN/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
  6. Applied egg-rr70.7%

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

Alternative 6: 67.4% accurate, 1.9× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \frac{\pi}{\frac{180}{angle\_m}}\\ angle\_s \cdot \left(\left(\left(b + a\right) \cdot \left(2 \cdot \sin t\_0\right)\right) \cdot \left(\left(b - a\right) \cdot \cos t\_0\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
 (let* ((t_0 (/ PI (/ 180.0 angle_m))))
   (* angle_s (* (* (+ b a) (* 2.0 (sin t_0))) (* (- b a) (cos t_0))))))
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 = ((double) M_PI) / (180.0 / angle_m);
	return angle_s * (((b + a) * (2.0 * sin(t_0))) * ((b - a) * cos(t_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) {
	double t_0 = Math.PI / (180.0 / angle_m);
	return angle_s * (((b + a) * (2.0 * Math.sin(t_0))) * ((b - a) * Math.cos(t_0)));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = math.pi / (180.0 / angle_m)
	return angle_s * (((b + a) * (2.0 * math.sin(t_0))) * ((b - a) * math.cos(t_0)))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi / Float64(180.0 / angle_m))
	return Float64(angle_s * Float64(Float64(Float64(b + a) * Float64(2.0 * sin(t_0))) * Float64(Float64(b - a) * cos(t_0))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	t_0 = pi / (180.0 / angle_m);
	tmp = angle_s * (((b + a) * (2.0 * sin(t_0))) * ((b - a) * cos(t_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_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * N[(N[(N[(b + a), $MachinePrecision] * N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $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 := \frac{\pi}{\frac{180}{angle\_m}}\\
angle\_s \cdot \left(\left(\left(b + a\right) \cdot \left(2 \cdot \sin t\_0\right)\right) \cdot \left(\left(b - a\right) \cdot \cos t\_0\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 58.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(\left(b + a\right) \cdot \left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \]
  6. Add Preprocessing

Alternative 7: 67.9% accurate, 1.9× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\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) (cos (/ PI (/ 180.0 angle_m))))
   (* (+ b a) (* 2.0 (sin (* PI (/ angle_m 180.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) * cos((((double) M_PI) / (180.0 / angle_m)))) * ((b + a) * (2.0 * sin((((double) M_PI) * (angle_m / 180.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) * Math.cos((Math.PI / (180.0 / angle_m)))) * ((b + a) * (2.0 * Math.sin((Math.PI * (angle_m / 180.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) * math.cos((math.pi / (180.0 / angle_m)))) * ((b + a) * (2.0 * math.sin((math.pi * (angle_m / 180.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(Float64(b - a) * cos(Float64(pi / Float64(180.0 / angle_m)))) * Float64(Float64(b + a) * Float64(2.0 * sin(Float64(pi * Float64(angle_m / 180.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) * cos((pi / (180.0 / angle_m)))) * ((b + a) * (2.0 * sin((pi * (angle_m / 180.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[(N[(b - a), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle$95$m / 180.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(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 58.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
  5. Step-by-step derivation
    1. div-invN/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
    6. PI-lowering-PI.f6469.8%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
  6. Applied egg-rr69.8%

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

    \[\leadsto \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  8. Add Preprocessing

Alternative 8: 54.8% accurate, 3.4× 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 9.8 \cdot 10^{-231}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.62 \cdot 10^{+189}:\\ \;\;\;\;\frac{\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)}{\frac{1}{b + a}}\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\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 9.8e-231)
    (* (- b a) (* (* b 2.0) (sin (* 0.005555555555555556 (* PI angle_m)))))
    (if (<= a 1.62e+189)
      (/
       (* (- b a) (sin (* PI (* angle_m 0.011111111111111112))))
       (/ 1.0 (+ b a)))
      (* (+ b a) (* 0.011111111111111112 (* angle_m (* 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 (a <= 9.8e-231) {
		tmp = (b - a) * ((b * 2.0) * sin((0.005555555555555556 * (((double) M_PI) * angle_m))));
	} else if (a <= 1.62e+189) {
		tmp = ((b - a) * sin((((double) M_PI) * (angle_m * 0.011111111111111112)))) / (1.0 / (b + a));
	} else {
		tmp = (b + a) * (0.011111111111111112 * (angle_m * (((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 (a <= 9.8e-231) {
		tmp = (b - a) * ((b * 2.0) * Math.sin((0.005555555555555556 * (Math.PI * angle_m))));
	} else if (a <= 1.62e+189) {
		tmp = ((b - a) * Math.sin((Math.PI * (angle_m * 0.011111111111111112)))) / (1.0 / (b + a));
	} else {
		tmp = (b + a) * (0.011111111111111112 * (angle_m * (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 a <= 9.8e-231:
		tmp = (b - a) * ((b * 2.0) * math.sin((0.005555555555555556 * (math.pi * angle_m))))
	elif a <= 1.62e+189:
		tmp = ((b - a) * math.sin((math.pi * (angle_m * 0.011111111111111112)))) / (1.0 / (b + a))
	else:
		tmp = (b + a) * (0.011111111111111112 * (angle_m * (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 (a <= 9.8e-231)
		tmp = Float64(Float64(b - a) * Float64(Float64(b * 2.0) * sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))));
	elseif (a <= 1.62e+189)
		tmp = Float64(Float64(Float64(b - a) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))) / Float64(1.0 / Float64(b + a)));
	else
		tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(angle_m * 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 (a <= 9.8e-231)
		tmp = (b - a) * ((b * 2.0) * sin((0.005555555555555556 * (pi * angle_m))));
	elseif (a <= 1.62e+189)
		tmp = ((b - a) * sin((pi * (angle_m * 0.011111111111111112)))) / (1.0 / (b + a));
	else
		tmp = (b + a) * (0.011111111111111112 * (angle_m * (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[a, 9.8e-231], N[(N[(b - a), $MachinePrecision] * N[(N[(b * 2.0), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.62e+189], N[(N[(N[(b - a), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(b - a), $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 \begin{array}{l}
\mathbf{if}\;a \leq 9.8 \cdot 10^{-231}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

\mathbf{elif}\;a \leq 1.62 \cdot 10^{+189}:\\
\;\;\;\;\frac{\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)}{\frac{1}{b + a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 9.80000000000000007e-231

    1. Initial program 61.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      7. PI-lowering-PI.f6445.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
    7. Simplified45.0%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
    9. Step-by-step derivation
      1. Simplified46.3%

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

      if 9.80000000000000007e-231 < a < 1.6200000000000001e189

      1. Initial program 59.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
      5. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      6. Applied egg-rr69.2%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]
      7. Step-by-step derivation
        1. div-invN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{180 \cdot \frac{1}{angle}}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\frac{1}{angle}}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{180}\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
        6. /-lowering-/.f6467.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
      8. Applied egg-rr67.2%

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

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

      if 1.6200000000000001e189 < a

      1. Initial program 40.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
      5. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      6. Applied egg-rr72.5%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\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. *-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(\mathsf{PI}\left(\right) \cdot \left(b - a\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(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right)\right) \]
        3. *-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}{\left(b - a\right)}\right)\right)\right)\right) \]
        4. PI-lowering-PI.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.f64}\left(\right), \left(\color{blue}{b} - a\right)\right)\right)\right)\right) \]
        5. --lowering--.f6475.7%

          \[\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), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right)\right)\right)\right) \]
      9. Simplified75.7%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 9.8 \cdot 10^{-231}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.62 \cdot 10^{+189}:\\ \;\;\;\;\frac{\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}{\frac{1}{b + a}}\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
    12. Add Preprocessing

    Alternative 9: 54.8% accurate, 3.4× 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.2 \cdot 10^{-230}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+189}:\\ \;\;\;\;\left(b + a\right) \cdot \frac{\sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)}{\frac{1}{b - a}}\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\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 4.2e-230)
        (* (- b a) (* (* b 2.0) (sin (* 0.005555555555555556 (* PI angle_m)))))
        (if (<= a 1.6e+189)
          (*
           (+ b a)
           (/ (sin (* PI (* angle_m 0.011111111111111112))) (/ 1.0 (- b a))))
          (* (+ b a) (* 0.011111111111111112 (* angle_m (* 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 (a <= 4.2e-230) {
    		tmp = (b - a) * ((b * 2.0) * sin((0.005555555555555556 * (((double) M_PI) * angle_m))));
    	} else if (a <= 1.6e+189) {
    		tmp = (b + a) * (sin((((double) M_PI) * (angle_m * 0.011111111111111112))) / (1.0 / (b - a)));
    	} else {
    		tmp = (b + a) * (0.011111111111111112 * (angle_m * (((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 (a <= 4.2e-230) {
    		tmp = (b - a) * ((b * 2.0) * Math.sin((0.005555555555555556 * (Math.PI * angle_m))));
    	} else if (a <= 1.6e+189) {
    		tmp = (b + a) * (Math.sin((Math.PI * (angle_m * 0.011111111111111112))) / (1.0 / (b - a)));
    	} else {
    		tmp = (b + a) * (0.011111111111111112 * (angle_m * (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 a <= 4.2e-230:
    		tmp = (b - a) * ((b * 2.0) * math.sin((0.005555555555555556 * (math.pi * angle_m))))
    	elif a <= 1.6e+189:
    		tmp = (b + a) * (math.sin((math.pi * (angle_m * 0.011111111111111112))) / (1.0 / (b - a)))
    	else:
    		tmp = (b + a) * (0.011111111111111112 * (angle_m * (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 (a <= 4.2e-230)
    		tmp = Float64(Float64(b - a) * Float64(Float64(b * 2.0) * sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))));
    	elseif (a <= 1.6e+189)
    		tmp = Float64(Float64(b + a) * Float64(sin(Float64(pi * Float64(angle_m * 0.011111111111111112))) / Float64(1.0 / Float64(b - a))));
    	else
    		tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(angle_m * 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 (a <= 4.2e-230)
    		tmp = (b - a) * ((b * 2.0) * sin((0.005555555555555556 * (pi * angle_m))));
    	elseif (a <= 1.6e+189)
    		tmp = (b + a) * (sin((pi * (angle_m * 0.011111111111111112))) / (1.0 / (b - a)));
    	else
    		tmp = (b + a) * (0.011111111111111112 * (angle_m * (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[a, 4.2e-230], N[(N[(b - a), $MachinePrecision] * N[(N[(b * 2.0), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+189], N[(N[(b + a), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(1.0 / N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(b - a), $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 \begin{array}{l}
    \mathbf{if}\;a \leq 4.2 \cdot 10^{-230}:\\
    \;\;\;\;\left(b - a\right) \cdot \left(\left(b \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
    
    \mathbf{elif}\;a \leq 1.6 \cdot 10^{+189}:\\
    \;\;\;\;\left(b + a\right) \cdot \frac{\sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)}{\frac{1}{b - a}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < 4.1999999999999997e-230

      1. Initial program 61.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
        7. PI-lowering-PI.f6445.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      7. Simplified45.0%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      9. Step-by-step derivation
        1. Simplified46.3%

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

        if 4.1999999999999997e-230 < a < 1.6e189

        1. Initial program 59.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        6. Applied egg-rr69.2%

          \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{180 \cdot \frac{1}{angle}}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\frac{1}{angle}}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{180}\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
          6. /-lowering-/.f6467.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
        8. Applied egg-rr67.2%

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

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

        if 1.6e189 < a

        1. Initial program 40.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        6. Applied egg-rr72.5%

          \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\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. *-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(\mathsf{PI}\left(\right) \cdot \left(b - a\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(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right)\right) \]
          3. *-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}{\left(b - a\right)}\right)\right)\right)\right) \]
          4. PI-lowering-PI.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.f64}\left(\right), \left(\color{blue}{b} - a\right)\right)\right)\right)\right) \]
          5. --lowering--.f6475.7%

            \[\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), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right)\right)\right)\right) \]
        9. Simplified75.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 4.2 \cdot 10^{-230}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+189}:\\ \;\;\;\;\left(b + a\right) \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}{\frac{1}{b - a}}\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
      12. Add Preprocessing

      Alternative 10: 66.6% 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.35 \cdot 10^{+166}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{2}{\frac{\frac{180}{angle\_m}}{\pi}}\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.35e+166)
          (* (- b a) (* (+ b a) (sin (* (* PI angle_m) 0.011111111111111112))))
          (* b (* (- b a) (sin (/ 2.0 (/ (/ 180.0 angle_m) 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 <= 2.35e+166) {
      		tmp = (b - a) * ((b + a) * sin(((((double) M_PI) * angle_m) * 0.011111111111111112)));
      	} else {
      		tmp = b * ((b - a) * sin((2.0 / ((180.0 / angle_m) / ((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 <= 2.35e+166) {
      		tmp = (b - a) * ((b + a) * Math.sin(((Math.PI * angle_m) * 0.011111111111111112)));
      	} else {
      		tmp = b * ((b - a) * Math.sin((2.0 / ((180.0 / angle_m) / 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 <= 2.35e+166:
      		tmp = (b - a) * ((b + a) * math.sin(((math.pi * angle_m) * 0.011111111111111112)))
      	else:
      		tmp = b * ((b - a) * math.sin((2.0 / ((180.0 / angle_m) / 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 <= 2.35e+166)
      		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112))));
      	else
      		tmp = Float64(b * Float64(Float64(b - a) * sin(Float64(2.0 / Float64(Float64(180.0 / angle_m) / 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 <= 2.35e+166)
      		tmp = (b - a) * ((b + a) * sin(((pi * angle_m) * 0.011111111111111112)));
      	else
      		tmp = b * ((b - a) * sin((2.0 / ((180.0 / angle_m) / 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, 2.35e+166], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 / N[(N[(180.0 / angle$95$m), $MachinePrecision] / Pi), $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 \begin{array}{l}
      \mathbf{if}\;b \leq 2.35 \cdot 10^{+166}:\\
      \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{2}{\frac{\frac{180}{angle\_m}}{\pi}}\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 2.35e166

        1. Initial program 58.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        if 2.35e166 < b

        1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
          7. PI-lowering-PI.f6474.4%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
        7. Simplified74.4%

          \[\leadsto \color{blue}{\left(\left(2 \cdot b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right) \]
        8. Step-by-step derivation
          1. associate-*l*N/A

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

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

            \[\leadsto b \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        9. Applied egg-rr85.6%

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

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

      Alternative 11: 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 \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{2}{\frac{\frac{180}{angle\_m}}{\pi}}\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 (/ 2.0 (/ (/ 180.0 angle_m) 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 * ((b + a) * ((b - a) * sin((2.0 / ((180.0 / angle_m) / ((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 * ((b + a) * ((b - a) * Math.sin((2.0 / ((180.0 / angle_m) / 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 * ((b + a) * ((b - a) * math.sin((2.0 / ((180.0 / angle_m) / 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(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 / Float64(Float64(180.0 / angle_m) / 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 * ((b + a) * ((b - a) * sin((2.0 / ((180.0 / angle_m) / 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[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 / N[(N[(180.0 / angle$95$m), $MachinePrecision] / Pi), $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(\frac{2}{\frac{\frac{180}{angle\_m}}{\pi}}\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 58.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. pow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(b \cdot b - {a}^{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
        2. pow2N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
        4. *-commutativeN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{{b}^{3} - {a}^{3}}{b \cdot b + \left(a \cdot a + b \cdot a\right)} \cdot \left(b + a\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
        6. flip3-+N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{{b}^{3} - {a}^{3}}{b \cdot b + \left(a \cdot a + b \cdot a\right)} \cdot \frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot a\right)}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
        7. frac-timesN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\left({b}^{3} - {a}^{3}\right) \cdot \left({b}^{3} + {a}^{3}\right)\right), \left(\left(b \cdot b + \left(a \cdot a + b \cdot a\right)\right) \cdot \left(b \cdot b + \left(a \cdot a - b \cdot a\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
      4. Applied egg-rr11.8%

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(b - a\right), \color{blue}{\sin \left(2 \cdot \frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\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), \sin \color{blue}{\left(2 \cdot \frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)}\right)\right) \]
        7. sin-lowering-sin.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(\left(2 \cdot \frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right)\right)\right) \]
        8. clear-numN/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(2 \cdot \frac{1}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
        9. un-div-invN/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{2}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
        10. /-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(2, \left(\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}\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), \mathsf{sin.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{180}{angle}\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
        12. /-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(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(180, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
        13. PI-lowering-PI.f6469.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(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(180, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right) \]
      7. Applied egg-rr69.4%

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

      Alternative 12: 64.1% accurate, 11.0× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \left(b - a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+64}:\\ \;\;\;\;\left(b + a\right) \cdot \left(angle\_m \cdot \left(0.011111111111111112 \cdot t\_0 + \left(2 \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot t\_0\right) \cdot \left(angle\_m \cdot 0.011111111111111112\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 (* PI (- b a))))
         (*
          angle_s
          (if (<= (/ angle_m 180.0) 5e+64)
            (*
             (+ b a)
             (*
              angle_m
              (+
               (* 0.011111111111111112 t_0)
               (*
                (* 2.0 (* angle_m angle_m))
                (* (- b a) (* (* PI (* PI PI)) -1.1431184270690443e-7))))))
            (* (* (+ b a) t_0) (* 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 = ((double) M_PI) * (b - a);
      	double tmp;
      	if ((angle_m / 180.0) <= 5e+64) {
      		tmp = (b + a) * (angle_m * ((0.011111111111111112 * t_0) + ((2.0 * (angle_m * angle_m)) * ((b - a) * ((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * -1.1431184270690443e-7)))));
      	} else {
      		tmp = ((b + a) * t_0) * (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.PI * (b - a);
      	double tmp;
      	if ((angle_m / 180.0) <= 5e+64) {
      		tmp = (b + a) * (angle_m * ((0.011111111111111112 * t_0) + ((2.0 * (angle_m * angle_m)) * ((b - a) * ((Math.PI * (Math.PI * Math.PI)) * -1.1431184270690443e-7)))));
      	} else {
      		tmp = ((b + a) * t_0) * (angle_m * 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):
      	t_0 = math.pi * (b - a)
      	tmp = 0
      	if (angle_m / 180.0) <= 5e+64:
      		tmp = (b + a) * (angle_m * ((0.011111111111111112 * t_0) + ((2.0 * (angle_m * angle_m)) * ((b - a) * ((math.pi * (math.pi * math.pi)) * -1.1431184270690443e-7)))))
      	else:
      		tmp = ((b + a) * t_0) * (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 = Float64(pi * Float64(b - a))
      	tmp = 0.0
      	if (Float64(angle_m / 180.0) <= 5e+64)
      		tmp = Float64(Float64(b + a) * Float64(angle_m * Float64(Float64(0.011111111111111112 * t_0) + Float64(Float64(2.0 * Float64(angle_m * angle_m)) * Float64(Float64(b - a) * Float64(Float64(pi * Float64(pi * pi)) * -1.1431184270690443e-7))))));
      	else
      		tmp = Float64(Float64(Float64(b + a) * t_0) * Float64(angle_m * 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)
      	t_0 = pi * (b - a);
      	tmp = 0.0;
      	if ((angle_m / 180.0) <= 5e+64)
      		tmp = (b + a) * (angle_m * ((0.011111111111111112 * t_0) + ((2.0 * (angle_m * angle_m)) * ((b - a) * ((pi * (pi * pi)) * -1.1431184270690443e-7)))));
      	else
      		tmp = ((b + a) * t_0) * (angle_m * 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_] := Block[{t$95$0 = N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+64], N[(N[(b + a), $MachinePrecision] * N[(angle$95$m * N[(N[(0.011111111111111112 * t$95$0), $MachinePrecision] + N[(N[(2.0 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + a), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \pi \cdot \left(b - a\right)\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+64}:\\
      \;\;\;\;\left(b + a\right) \cdot \left(angle\_m \cdot \left(0.011111111111111112 \cdot t\_0 + \left(2 \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right)\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b + a\right) \cdot t\_0\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 angle #s(literal 180 binary64)) < 5e64

        1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        6. Applied egg-rr77.4%

          \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{180 \cdot \frac{1}{angle}}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\frac{1}{angle}}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{180}\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\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(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \left(\frac{1}{angle}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
          6. /-lowering-/.f6477.1%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right) \]
        8. Applied egg-rr77.1%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(b, a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(angle, angle\right)\right), \left(\frac{-1}{11664000} \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{3} \cdot \left(b - a\right)\right)} + \frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right) \]
        11. Simplified69.9%

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

        if 5e64 < (/.f64 angle #s(literal 180 binary64))

        1. Initial program 40.7%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 13: 63.6% accurate, 12.7× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \left(b - a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 26500000000:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot t\_0\right)\right)\\ \mathbf{elif}\;angle\_m \leq 2.3 \cdot 10^{+67}:\\ \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112 + \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(\left(angle\_m \cdot angle\_m\right) \cdot -2.2862368541380886 \cdot 10^{-7}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot t\_0\right) \cdot \left(angle\_m \cdot 0.011111111111111112\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 (* PI (- b a))))
         (*
          angle_s
          (if (<= angle_m 26500000000.0)
            (* (+ b a) (* 0.011111111111111112 (* angle_m t_0)))
            (if (<= angle_m 2.3e+67)
              (*
               b
               (*
                (- b a)
                (*
                 angle_m
                 (+
                  (* PI 0.011111111111111112)
                  (*
                   (* PI (* PI PI))
                   (* (* angle_m angle_m) -2.2862368541380886e-7))))))
              (* (* (+ b a) t_0) (* 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 = ((double) M_PI) * (b - a);
      	double tmp;
      	if (angle_m <= 26500000000.0) {
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * t_0));
      	} else if (angle_m <= 2.3e+67) {
      		tmp = b * ((b - a) * (angle_m * ((((double) M_PI) * 0.011111111111111112) + ((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * ((angle_m * angle_m) * -2.2862368541380886e-7)))));
      	} else {
      		tmp = ((b + a) * t_0) * (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.PI * (b - a);
      	double tmp;
      	if (angle_m <= 26500000000.0) {
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * t_0));
      	} else if (angle_m <= 2.3e+67) {
      		tmp = b * ((b - a) * (angle_m * ((Math.PI * 0.011111111111111112) + ((Math.PI * (Math.PI * Math.PI)) * ((angle_m * angle_m) * -2.2862368541380886e-7)))));
      	} else {
      		tmp = ((b + a) * t_0) * (angle_m * 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):
      	t_0 = math.pi * (b - a)
      	tmp = 0
      	if angle_m <= 26500000000.0:
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * t_0))
      	elif angle_m <= 2.3e+67:
      		tmp = b * ((b - a) * (angle_m * ((math.pi * 0.011111111111111112) + ((math.pi * (math.pi * math.pi)) * ((angle_m * angle_m) * -2.2862368541380886e-7)))))
      	else:
      		tmp = ((b + a) * t_0) * (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 = Float64(pi * Float64(b - a))
      	tmp = 0.0
      	if (angle_m <= 26500000000.0)
      		tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(angle_m * t_0)));
      	elseif (angle_m <= 2.3e+67)
      		tmp = Float64(b * Float64(Float64(b - a) * Float64(angle_m * Float64(Float64(pi * 0.011111111111111112) + Float64(Float64(pi * Float64(pi * pi)) * Float64(Float64(angle_m * angle_m) * -2.2862368541380886e-7))))));
      	else
      		tmp = Float64(Float64(Float64(b + a) * t_0) * Float64(angle_m * 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)
      	t_0 = pi * (b - a);
      	tmp = 0.0;
      	if (angle_m <= 26500000000.0)
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * t_0));
      	elseif (angle_m <= 2.3e+67)
      		tmp = b * ((b - a) * (angle_m * ((pi * 0.011111111111111112) + ((pi * (pi * pi)) * ((angle_m * angle_m) * -2.2862368541380886e-7)))));
      	else
      		tmp = ((b + a) * t_0) * (angle_m * 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_] := Block[{t$95$0 = N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 26500000000.0], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 2.3e+67], N[(b * N[(N[(b - a), $MachinePrecision] * N[(angle$95$m * N[(N[(Pi * 0.011111111111111112), $MachinePrecision] + N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * -2.2862368541380886e-7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + a), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \pi \cdot \left(b - a\right)\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;angle\_m \leq 26500000000:\\
      \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot t\_0\right)\right)\\
      
      \mathbf{elif}\;angle\_m \leq 2.3 \cdot 10^{+67}:\\
      \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112 + \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(\left(angle\_m \cdot angle\_m\right) \cdot -2.2862368541380886 \cdot 10^{-7}\right)\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b + a\right) \cdot t\_0\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if angle < 2.65e10

        1. Initial program 64.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        6. Applied egg-rr79.8%

          \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\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. *-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(\mathsf{PI}\left(\right) \cdot \left(b - a\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(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right)\right) \]
          3. *-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}{\left(b - a\right)}\right)\right)\right)\right) \]
          4. PI-lowering-PI.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.f64}\left(\right), \left(\color{blue}{b} - a\right)\right)\right)\right)\right) \]
          5. --lowering--.f6474.4%

            \[\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), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right)\right)\right)\right) \]
        9. Simplified74.4%

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

        if 2.65e10 < angle < 2.2999999999999999e67

        1. Initial program 20.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
          7. PI-lowering-PI.f6418.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
        7. Simplified18.2%

          \[\leadsto \color{blue}{\left(\left(2 \cdot b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right) \]
        8. Step-by-step derivation
          1. associate-*l*N/A

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

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

            \[\leadsto b \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        9. Applied egg-rr6.8%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{90}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4374000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{3}\right)\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
          12. cube-multN/A

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{90}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4374000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
        12. Simplified11.5%

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

        if 2.2999999999999999e67 < angle

        1. Initial program 40.7%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 14: 64.0% accurate, 23.3× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \left(b - a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 3 \cdot 10^{-25}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot t\_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot t\_0\right) \cdot \left(angle\_m \cdot 0.011111111111111112\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 (* PI (- b a))))
         (*
          angle_s
          (if (<= angle_m 3e-25)
            (* (+ b a) (* 0.011111111111111112 (* angle_m t_0)))
            (* (* (+ b a) t_0) (* 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 = ((double) M_PI) * (b - a);
      	double tmp;
      	if (angle_m <= 3e-25) {
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * t_0));
      	} else {
      		tmp = ((b + a) * t_0) * (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.PI * (b - a);
      	double tmp;
      	if (angle_m <= 3e-25) {
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * t_0));
      	} else {
      		tmp = ((b + a) * t_0) * (angle_m * 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):
      	t_0 = math.pi * (b - a)
      	tmp = 0
      	if angle_m <= 3e-25:
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * t_0))
      	else:
      		tmp = ((b + a) * t_0) * (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 = Float64(pi * Float64(b - a))
      	tmp = 0.0
      	if (angle_m <= 3e-25)
      		tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(angle_m * t_0)));
      	else
      		tmp = Float64(Float64(Float64(b + a) * t_0) * Float64(angle_m * 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)
      	t_0 = pi * (b - a);
      	tmp = 0.0;
      	if (angle_m <= 3e-25)
      		tmp = (b + a) * (0.011111111111111112 * (angle_m * t_0));
      	else
      		tmp = ((b + a) * t_0) * (angle_m * 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_] := Block[{t$95$0 = N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 3e-25], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + a), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \pi \cdot \left(b - a\right)\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;angle\_m \leq 3 \cdot 10^{-25}:\\
      \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot t\_0\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b + a\right) \cdot t\_0\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if angle < 2.9999999999999998e-25

        1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), \color{blue}{\left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        6. Applied egg-rr79.2%

          \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\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. *-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(\mathsf{PI}\left(\right) \cdot \left(b - a\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(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right)\right) \]
          3. *-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}{\left(b - a\right)}\right)\right)\right)\right) \]
          4. PI-lowering-PI.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.f64}\left(\right), \left(\color{blue}{b} - a\right)\right)\right)\right)\right) \]
          5. --lowering--.f6474.7%

            \[\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), \mathsf{\_.f64}\left(b, \color{blue}{a}\right)\right)\right)\right)\right) \]
        9. Simplified74.7%

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

        if 2.9999999999999998e-25 < angle

        1. Initial program 43.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 15: 56.4% 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.6 \cdot 10^{+156}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\_m\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.6e+156)
          (* (* (+ b a) (* PI (- b a))) (* angle_m 0.011111111111111112))
          (* (* b 0.011111111111111112) (* PI (* b 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 (b <= 1.6e+156) {
      		tmp = ((b + a) * (((double) M_PI) * (b - a))) * (angle_m * 0.011111111111111112);
      	} else {
      		tmp = (b * 0.011111111111111112) * (((double) M_PI) * (b * 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 (b <= 1.6e+156) {
      		tmp = ((b + a) * (Math.PI * (b - a))) * (angle_m * 0.011111111111111112);
      	} else {
      		tmp = (b * 0.011111111111111112) * (Math.PI * (b * 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 b <= 1.6e+156:
      		tmp = ((b + a) * (math.pi * (b - a))) * (angle_m * 0.011111111111111112)
      	else:
      		tmp = (b * 0.011111111111111112) * (math.pi * (b * 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 (b <= 1.6e+156)
      		tmp = Float64(Float64(Float64(b + a) * Float64(pi * Float64(b - a))) * Float64(angle_m * 0.011111111111111112));
      	else
      		tmp = Float64(Float64(b * 0.011111111111111112) * Float64(pi * Float64(b * 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 (b <= 1.6e+156)
      		tmp = ((b + a) * (pi * (b - a))) * (angle_m * 0.011111111111111112);
      	else
      		tmp = (b * 0.011111111111111112) * (pi * (b * 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[b, 1.6e+156], N[(N[(N[(b + a), $MachinePrecision] * N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(b * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b * angle$95$m), $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.6 \cdot 10^{+156}:\\
      \;\;\;\;\left(\left(b + a\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\_m\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 1.60000000000000001e156

        1. Initial program 59.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.60000000000000001e156 < b

        1. Initial program 51.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, b\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        12. Applied egg-rr78.5%

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

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

      Alternative 16: 54.6% 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.6 \cdot 10^{+150}:\\ \;\;\;\;angle\_m \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\_m\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.6e+150)
          (* angle_m (* 0.011111111111111112 (* PI (- (* b b) (* a a)))))
          (* (* b 0.011111111111111112) (* PI (* b 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 (b <= 1.6e+150) {
      		tmp = angle_m * (0.011111111111111112 * (((double) M_PI) * ((b * b) - (a * a))));
      	} else {
      		tmp = (b * 0.011111111111111112) * (((double) M_PI) * (b * 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 (b <= 1.6e+150) {
      		tmp = angle_m * (0.011111111111111112 * (Math.PI * ((b * b) - (a * a))));
      	} else {
      		tmp = (b * 0.011111111111111112) * (Math.PI * (b * 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 b <= 1.6e+150:
      		tmp = angle_m * (0.011111111111111112 * (math.pi * ((b * b) - (a * a))))
      	else:
      		tmp = (b * 0.011111111111111112) * (math.pi * (b * 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 (b <= 1.6e+150)
      		tmp = Float64(angle_m * Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b * b) - Float64(a * a)))));
      	else
      		tmp = Float64(Float64(b * 0.011111111111111112) * Float64(pi * Float64(b * 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 (b <= 1.6e+150)
      		tmp = angle_m * (0.011111111111111112 * (pi * ((b * b) - (a * a))));
      	else
      		tmp = (b * 0.011111111111111112) * (pi * (b * 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[b, 1.6e+150], N[(angle$95$m * N[(0.011111111111111112 * N[(Pi * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b * angle$95$m), $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.6 \cdot 10^{+150}:\\
      \;\;\;\;angle\_m \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\_m\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 1.60000000000000008e150

        1. Initial program 59.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.60000000000000008e150 < b

        1. Initial program 51.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        10. Applied egg-rr74.1%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, b\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        12. Applied egg-rr77.0%

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

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

      Alternative 17: 54.5% 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.8 \cdot 10^{+150}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\_m\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.8e+150)
          (* 0.011111111111111112 (* PI (* angle_m (- (* b b) (* a a)))))
          (* (* b 0.011111111111111112) (* PI (* b 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 (b <= 1.8e+150) {
      		tmp = 0.011111111111111112 * (((double) M_PI) * (angle_m * ((b * b) - (a * a))));
      	} else {
      		tmp = (b * 0.011111111111111112) * (((double) M_PI) * (b * 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 (b <= 1.8e+150) {
      		tmp = 0.011111111111111112 * (Math.PI * (angle_m * ((b * b) - (a * a))));
      	} else {
      		tmp = (b * 0.011111111111111112) * (Math.PI * (b * 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 b <= 1.8e+150:
      		tmp = 0.011111111111111112 * (math.pi * (angle_m * ((b * b) - (a * a))))
      	else:
      		tmp = (b * 0.011111111111111112) * (math.pi * (b * 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 (b <= 1.8e+150)
      		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle_m * Float64(Float64(b * b) - Float64(a * a)))));
      	else
      		tmp = Float64(Float64(b * 0.011111111111111112) * Float64(pi * Float64(b * 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 (b <= 1.8e+150)
      		tmp = 0.011111111111111112 * (pi * (angle_m * ((b * b) - (a * a))));
      	else
      		tmp = (b * 0.011111111111111112) * (pi * (b * 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[b, 1.8e+150], N[(0.011111111111111112 * N[(Pi * N[(angle$95$m * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b * angle$95$m), $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.8 \cdot 10^{+150}:\\
      \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\_m\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 1.79999999999999993e150

        1. Initial program 59.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.79999999999999993e150 < b

        1. Initial program 51.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        10. Applied egg-rr74.1%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, b\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        12. Applied egg-rr77.0%

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

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

      Alternative 18: 44.6% 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}\;b \leq 5.2 \cdot 10^{-32}:\\ \;\;\;\;\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\left(a \cdot a\right) \cdot \left(0 - \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\_m\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 5.2e-32)
          (* (* angle_m 0.011111111111111112) (* (* a a) (- 0.0 PI)))
          (* b (* (- b a) (* (* 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 tmp;
      	if (b <= 5.2e-32) {
      		tmp = (angle_m * 0.011111111111111112) * ((a * a) * (0.0 - ((double) M_PI)));
      	} else {
      		tmp = b * ((b - a) * ((((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 tmp;
      	if (b <= 5.2e-32) {
      		tmp = (angle_m * 0.011111111111111112) * ((a * a) * (0.0 - Math.PI));
      	} else {
      		tmp = b * ((b - a) * ((Math.PI * angle_m) * 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 <= 5.2e-32:
      		tmp = (angle_m * 0.011111111111111112) * ((a * a) * (0.0 - math.pi))
      	else:
      		tmp = b * ((b - a) * ((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)
      	tmp = 0.0
      	if (b <= 5.2e-32)
      		tmp = Float64(Float64(angle_m * 0.011111111111111112) * Float64(Float64(a * a) * Float64(0.0 - pi)));
      	else
      		tmp = Float64(b * Float64(Float64(b - a) * Float64(Float64(pi * angle_m) * 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 <= 5.2e-32)
      		tmp = (angle_m * 0.011111111111111112) * ((a * a) * (0.0 - pi));
      	else
      		tmp = b * ((b - a) * ((pi * angle_m) * 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, 5.2e-32], N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * N[(0.0 - Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(b - a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $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 5.2 \cdot 10^{-32}:\\
      \;\;\;\;\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\left(a \cdot a\right) \cdot \left(0 - \pi\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 5.1999999999999995e-32

        1. Initial program 60.7%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 5.1999999999999995e-32 < b

        1. Initial program 51.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
          7. PI-lowering-PI.f6451.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
        7. Simplified51.5%

          \[\leadsto \color{blue}{\left(\left(2 \cdot b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right) \]
        8. Step-by-step derivation
          1. associate-*l*N/A

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

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

            \[\leadsto b \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        9. Applied egg-rr52.8%

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

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

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

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

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

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

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

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

      Alternative 19: 44.7% 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}\;b \leq 5.5 \cdot 10^{-32}:\\ \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\_m\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 5.5e-32)
          (* (* PI angle_m) (* (* a a) -0.011111111111111112))
          (* b (* (- b a) (* (* 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 tmp;
      	if (b <= 5.5e-32) {
      		tmp = (((double) M_PI) * angle_m) * ((a * a) * -0.011111111111111112);
      	} else {
      		tmp = b * ((b - a) * ((((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 tmp;
      	if (b <= 5.5e-32) {
      		tmp = (Math.PI * angle_m) * ((a * a) * -0.011111111111111112);
      	} else {
      		tmp = b * ((b - a) * ((Math.PI * angle_m) * 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 <= 5.5e-32:
      		tmp = (math.pi * angle_m) * ((a * a) * -0.011111111111111112)
      	else:
      		tmp = b * ((b - a) * ((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)
      	tmp = 0.0
      	if (b <= 5.5e-32)
      		tmp = Float64(Float64(pi * angle_m) * Float64(Float64(a * a) * -0.011111111111111112));
      	else
      		tmp = Float64(b * Float64(Float64(b - a) * Float64(Float64(pi * angle_m) * 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 <= 5.5e-32)
      		tmp = (pi * angle_m) * ((a * a) * -0.011111111111111112);
      	else
      		tmp = b * ((b - a) * ((pi * angle_m) * 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, 5.5e-32], N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(b - a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $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 5.5 \cdot 10^{-32}:\\
      \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 5.50000000000000024e-32

        1. Initial program 60.7%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. associate-*r*N/A

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

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

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

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

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

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

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

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

        if 5.50000000000000024e-32 < b

        1. Initial program 51.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
          7. PI-lowering-PI.f6451.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
        7. Simplified51.5%

          \[\leadsto \color{blue}{\left(\left(2 \cdot b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right) \]
        8. Step-by-step derivation
          1. associate-*l*N/A

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

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

            \[\leadsto b \cdot \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\cos \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        9. Applied egg-rr52.8%

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

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

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

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

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

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

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

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

      Alternative 20: 44.7% 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}\;b \leq 5.5 \cdot 10^{-32}:\\ \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b \cdot angle\_m\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 5.5e-32)
          (* (* PI angle_m) (* (* a a) -0.011111111111111112))
          (* 0.011111111111111112 (* (* PI (- b a)) (* b 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 (b <= 5.5e-32) {
      		tmp = (((double) M_PI) * angle_m) * ((a * a) * -0.011111111111111112);
      	} else {
      		tmp = 0.011111111111111112 * ((((double) M_PI) * (b - a)) * (b * 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 (b <= 5.5e-32) {
      		tmp = (Math.PI * angle_m) * ((a * a) * -0.011111111111111112);
      	} else {
      		tmp = 0.011111111111111112 * ((Math.PI * (b - a)) * (b * 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 b <= 5.5e-32:
      		tmp = (math.pi * angle_m) * ((a * a) * -0.011111111111111112)
      	else:
      		tmp = 0.011111111111111112 * ((math.pi * (b - a)) * (b * 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 (b <= 5.5e-32)
      		tmp = Float64(Float64(pi * angle_m) * Float64(Float64(a * a) * -0.011111111111111112));
      	else
      		tmp = Float64(0.011111111111111112 * Float64(Float64(pi * Float64(b - a)) * Float64(b * 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 (b <= 5.5e-32)
      		tmp = (pi * angle_m) * ((a * a) * -0.011111111111111112);
      	else
      		tmp = 0.011111111111111112 * ((pi * (b - a)) * (b * 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[b, 5.5e-32], N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b * angle$95$m), $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 5.5 \cdot 10^{-32}:\\
      \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b \cdot angle\_m\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 5.50000000000000024e-32

        1. Initial program 60.7%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. associate-*r*N/A

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

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

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

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

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

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

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

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

        if 5.50000000000000024e-32 < b

        1. Initial program 51.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
          7. PI-lowering-PI.f6451.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, b\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
        7. Simplified51.5%

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

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

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

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

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

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

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

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

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

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

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

      Alternative 21: 43.1% 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}\;b \leq 1.25 \cdot 10^{+104}:\\ \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\_m\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.25e+104)
          (* (* PI angle_m) (* (* a a) -0.011111111111111112))
          (* (* b 0.011111111111111112) (* PI (* b 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 (b <= 1.25e+104) {
      		tmp = (((double) M_PI) * angle_m) * ((a * a) * -0.011111111111111112);
      	} else {
      		tmp = (b * 0.011111111111111112) * (((double) M_PI) * (b * 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 (b <= 1.25e+104) {
      		tmp = (Math.PI * angle_m) * ((a * a) * -0.011111111111111112);
      	} else {
      		tmp = (b * 0.011111111111111112) * (Math.PI * (b * 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 b <= 1.25e+104:
      		tmp = (math.pi * angle_m) * ((a * a) * -0.011111111111111112)
      	else:
      		tmp = (b * 0.011111111111111112) * (math.pi * (b * 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 (b <= 1.25e+104)
      		tmp = Float64(Float64(pi * angle_m) * Float64(Float64(a * a) * -0.011111111111111112));
      	else
      		tmp = Float64(Float64(b * 0.011111111111111112) * Float64(pi * Float64(b * 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 (b <= 1.25e+104)
      		tmp = (pi * angle_m) * ((a * a) * -0.011111111111111112);
      	else
      		tmp = (b * 0.011111111111111112) * (pi * (b * 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[b, 1.25e+104], N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(b * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b * angle$95$m), $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.25 \cdot 10^{+104}:\\
      \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\_m\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 1.2499999999999999e104

        1. Initial program 59.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          9. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
          12. *-lowering-*.f6455.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
        5. Simplified55.9%

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{-1}{90} \cdot {a}^{2}\right), \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \left({a}^{2}\right)\right), \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \left(a \cdot a\right)\right), \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          7. PI-lowering-PI.f6440.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Simplified40.0%

          \[\leadsto \color{blue}{\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)} \]

        if 1.2499999999999999e104 < b

        1. Initial program 53.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right), \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\color{blue}{\frac{1}{90}} \cdot angle\right)\right) \]
          5. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          9. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
          12. *-lowering-*.f6447.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
        5. Simplified47.7%

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \color{blue}{\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{b}^{2}}\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left({b}^{2}\right)}\right)\right)\right) \]
          5. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({\color{blue}{b}}^{2}\right)\right)\right)\right) \]
          6. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
          7. *-lowering-*.f6455.0%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
        8. Simplified55.0%

          \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
        9. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot \color{blue}{angle}\right)\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right) \cdot angle\right)\right) \]
          3. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot b\right), \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(b \cdot \mathsf{PI}\left(\right)\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI}\left(\right)\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
          7. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \left(b \cdot angle\right)\right)\right) \]
          8. *-lowering-*.f6461.4%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        10. Applied egg-rr61.4%

          \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]
        11. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \frac{1}{90} \cdot \left(b \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot angle\right)\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot b\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot angle\right)\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{90} \cdot b\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot angle\right)\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, b\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b \cdot angle\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, b\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
          6. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, b\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
          7. *-lowering-*.f6463.4%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, b\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        12. Applied egg-rr63.4%

          \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot b\right) \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification44.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.25 \cdot 10^{+104}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 22: 43.1% 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}\;b \leq 9 \cdot 10^{+102}:\\ \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \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 (<= b 9e+102)
          (* (* PI angle_m) (* (* a a) -0.011111111111111112))
          (* 0.011111111111111112 (* PI (* b (* b 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 (b <= 9e+102) {
      		tmp = (((double) M_PI) * angle_m) * ((a * a) * -0.011111111111111112);
      	} else {
      		tmp = 0.011111111111111112 * (((double) M_PI) * (b * (b * 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 (b <= 9e+102) {
      		tmp = (Math.PI * angle_m) * ((a * a) * -0.011111111111111112);
      	} else {
      		tmp = 0.011111111111111112 * (Math.PI * (b * (b * 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 b <= 9e+102:
      		tmp = (math.pi * angle_m) * ((a * a) * -0.011111111111111112)
      	else:
      		tmp = 0.011111111111111112 * (math.pi * (b * (b * 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 (b <= 9e+102)
      		tmp = Float64(Float64(pi * angle_m) * Float64(Float64(a * a) * -0.011111111111111112));
      	else
      		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(b * Float64(b * 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 (b <= 9e+102)
      		tmp = (pi * angle_m) * ((a * a) * -0.011111111111111112);
      	else
      		tmp = 0.011111111111111112 * (pi * (b * (b * 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[b, 9e+102], N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(Pi * N[(b * N[(b * 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}\;b \leq 9 \cdot 10^{+102}:\\
      \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\_m\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 9.00000000000000042e102

        1. Initial program 59.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right), \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\color{blue}{\frac{1}{90}} \cdot angle\right)\right) \]
          5. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          9. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
          12. *-lowering-*.f6455.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
        5. Simplified55.9%

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{-1}{90} \cdot {a}^{2}\right), \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \left({a}^{2}\right)\right), \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \left(a \cdot a\right)\right), \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
          7. PI-lowering-PI.f6440.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Simplified40.0%

          \[\leadsto \color{blue}{\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)} \]

        if 9.00000000000000042e102 < b

        1. Initial program 53.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right), \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\color{blue}{\frac{1}{90}} \cdot angle\right)\right) \]
          5. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          9. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
          12. *-lowering-*.f6447.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
        5. Simplified47.7%

          \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \color{blue}{\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{b}^{2}}\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left({b}^{2}\right)}\right)\right)\right) \]
          5. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({\color{blue}{b}}^{2}\right)\right)\right)\right) \]
          6. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
          7. *-lowering-*.f6455.0%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
        8. Simplified55.0%

          \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
        9. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot \color{blue}{angle}\right)\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right) \cdot angle\right)\right) \]
          3. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot b\right), \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(b \cdot \mathsf{PI}\left(\right)\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI}\left(\right)\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
          7. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \left(b \cdot angle\right)\right)\right) \]
          8. *-lowering-*.f6461.4%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        10. Applied egg-rr61.4%

          \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]
        11. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(b \cdot angle\right) \cdot \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\left(b \cdot angle\right) \cdot b\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(\left(b \cdot angle\right) \cdot b\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(b \cdot angle\right), b\right), \mathsf{PI}\left(\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, angle\right), b\right), \mathsf{PI}\left(\right)\right)\right) \]
          6. PI-lowering-PI.f6461.5%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, angle\right), b\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        12. Applied egg-rr61.5%

          \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(\left(b \cdot angle\right) \cdot b\right) \cdot \pi\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification43.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 9 \cdot 10^{+102}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 23: 39.0% 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(b \cdot \left(b \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 (* 0.011111111111111112 (* b (* b (* 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 * (0.011111111111111112 * (b * (b * (((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 * (0.011111111111111112 * (b * (b * (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 * (0.011111111111111112 * (b * (b * (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(0.011111111111111112 * Float64(b * Float64(b * 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 * (0.011111111111111112 * (b * (b * (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[(0.011111111111111112 * N[(b * N[(b * 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(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 58.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right), \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\color{blue}{\frac{1}{90}} \cdot angle\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
        12. *-lowering-*.f6454.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
      5. Simplified54.5%

        \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \color{blue}{\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{b}^{2}}\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left({b}^{2}\right)}\right)\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({\color{blue}{b}}^{2}\right)\right)\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
        7. *-lowering-*.f6436.7%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
      8. Simplified36.7%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
      9. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \color{blue}{b}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right), \color{blue}{b}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), b\right), b\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot angle\right), b\right), b\right)\right) \]
        6. *-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), b\right), b\right)\right) \]
        7. PI-lowering-PI.f6438.4%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), b\right), b\right)\right) \]
      10. Applied egg-rr38.4%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(\left(\pi \cdot angle\right) \cdot b\right) \cdot b\right)} \]
      11. Final simplification38.4%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right) \]
      12. Add Preprocessing

      Alternative 24: 39.0% 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(\pi \cdot \left(b \cdot \left(b \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 (* 0.011111111111111112 (* PI (* b (* b 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 * (0.011111111111111112 * (((double) M_PI) * (b * (b * 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 * (0.011111111111111112 * (Math.PI * (b * (b * 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 * (0.011111111111111112 * (math.pi * (b * (b * 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(0.011111111111111112 * Float64(pi * Float64(b * Float64(b * 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 * (0.011111111111111112 * (pi * (b * (b * 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[(0.011111111111111112 * N[(Pi * N[(b * N[(b * 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(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\_m\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 58.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right), \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\color{blue}{\frac{1}{90}} \cdot angle\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
        12. *-lowering-*.f6454.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
      5. Simplified54.5%

        \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \color{blue}{\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{b}^{2}}\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left({b}^{2}\right)}\right)\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({\color{blue}{b}}^{2}\right)\right)\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
        7. *-lowering-*.f6436.7%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
      8. Simplified36.7%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
      9. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot \color{blue}{angle}\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right) \cdot angle\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot b\right), \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(b \cdot \mathsf{PI}\left(\right)\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI}\left(\right)\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
        7. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \left(b \cdot angle\right)\right)\right) \]
        8. *-lowering-*.f6438.4%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
      10. Applied egg-rr38.4%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]
      11. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(b \cdot angle\right) \cdot \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\left(b \cdot angle\right) \cdot b\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(\left(b \cdot angle\right) \cdot b\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(b \cdot angle\right), b\right), \mathsf{PI}\left(\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, angle\right), b\right), \mathsf{PI}\left(\right)\right)\right) \]
        6. PI-lowering-PI.f6438.4%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, angle\right), b\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      12. Applied egg-rr38.4%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(\left(b \cdot angle\right) \cdot b\right) \cdot \pi\right)} \]
      13. Final simplification38.4%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right) \]
      14. Add Preprocessing

      Alternative 25: 38.9% 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(\left(b \cdot angle\_m\right) \cdot \left(b \cdot \pi\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 (* (* b 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) {
      	return angle_s * (0.011111111111111112 * ((b * angle_m) * (b * ((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 * ((b * angle_m) * (b * 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 * ((b * angle_m) * (b * 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(Float64(b * angle_m) * Float64(b * 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 * ((b * angle_m) * (b * 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[(N[(b * angle$95$m), $MachinePrecision] * N[(b * Pi), $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(\left(b \cdot angle\_m\right) \cdot \left(b \cdot \pi\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 58.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right), \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\color{blue}{\frac{1}{90}} \cdot angle\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
        12. *-lowering-*.f6454.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
      5. Simplified54.5%

        \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \color{blue}{\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{b}^{2}}\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left({b}^{2}\right)}\right)\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({\color{blue}{b}}^{2}\right)\right)\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
        7. *-lowering-*.f6436.7%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
      8. Simplified36.7%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
      9. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot \color{blue}{angle}\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right) \cdot angle\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot b\right), \color{blue}{\left(b \cdot angle\right)}\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\left(b \cdot \mathsf{PI}\left(\right)\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI}\left(\right)\right), \left(\color{blue}{b} \cdot angle\right)\right)\right) \]
        7. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \left(b \cdot angle\right)\right)\right) \]
        8. *-lowering-*.f6438.4%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
      10. Applied egg-rr38.4%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]
      11. Final simplification38.4%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right) \]
      12. Add Preprocessing

      Alternative 26: 35.1% 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(\pi \cdot \left(b \cdot b\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 (* PI (* b b))))))
      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 * (((double) M_PI) * (b * b))));
      }
      
      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 * (Math.PI * (b * b))));
      }
      
      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 * (math.pi * (b * b))))
      
      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(pi * Float64(b * b)))))
      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 * (pi * (b * b))));
      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[(Pi * N[(b * b), $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(\pi \cdot \left(b \cdot b\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 58.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 \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right), \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\color{blue}{\frac{1}{90}} \cdot angle\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({b}^{2} - {a}^{2}\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
        12. *-lowering-*.f6454.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
      5. Simplified54.5%

        \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\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. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \color{blue}{\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{b}^{2}}\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left({b}^{2}\right)}\right)\right)\right) \]
        5. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left({\color{blue}{b}}^{2}\right)\right)\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
        7. *-lowering-*.f6436.7%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
      8. Simplified36.7%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
      9. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2024158 
      (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)))))