ab-angle->ABCF B

Percentage Accurate: 53.9% → 66.9%
Time: 15.9s
Alternatives: 18
Speedup: 10.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 18 alternatives:

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

Initial Program: 53.9% 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: 66.9% accurate, 0.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \sqrt[3]{\pi} \cdot \sqrt[3]{\sqrt{\pi}}\\ \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{\left(a\_m + b\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \sqrt{\pi}\right) \cdot \left(angle \cdot \sqrt{\pi}\right)\right)}{\frac{-1}{a\_m - b}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(\left(t\_0 \cdot t\_0\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (let* ((t_0 (* (cbrt PI) (cbrt (sqrt PI)))))
   (if (<= (pow b 2.0) 5e+300)
     (/
      (*
       (+ a_m b)
       (sin (* (* 0.011111111111111112 (sqrt PI)) (* angle (sqrt PI)))))
      (/ -1.0 (- a_m b)))
     (*
      (* (sin (* (* (* t_0 t_0) angle) 0.011111111111111112)) (- b a_m))
      (+ a_m b)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double t_0 = cbrt(((double) M_PI)) * cbrt(sqrt(((double) M_PI)));
	double tmp;
	if (pow(b, 2.0) <= 5e+300) {
		tmp = ((a_m + b) * sin(((0.011111111111111112 * sqrt(((double) M_PI))) * (angle * sqrt(((double) M_PI)))))) / (-1.0 / (a_m - b));
	} else {
		tmp = (sin((((t_0 * t_0) * angle) * 0.011111111111111112)) * (b - a_m)) * (a_m + b);
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double t_0 = Math.cbrt(Math.PI) * Math.cbrt(Math.sqrt(Math.PI));
	double tmp;
	if (Math.pow(b, 2.0) <= 5e+300) {
		tmp = ((a_m + b) * Math.sin(((0.011111111111111112 * Math.sqrt(Math.PI)) * (angle * Math.sqrt(Math.PI))))) / (-1.0 / (a_m - b));
	} else {
		tmp = (Math.sin((((t_0 * t_0) * angle) * 0.011111111111111112)) * (b - a_m)) * (a_m + b);
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	t_0 = Float64(cbrt(pi) * cbrt(sqrt(pi)))
	tmp = 0.0
	if ((b ^ 2.0) <= 5e+300)
		tmp = Float64(Float64(Float64(a_m + b) * sin(Float64(Float64(0.011111111111111112 * sqrt(pi)) * Float64(angle * sqrt(pi))))) / Float64(-1.0 / Float64(a_m - b)));
	else
		tmp = Float64(Float64(sin(Float64(Float64(Float64(t_0 * t_0) * angle) * 0.011111111111111112)) * Float64(b - a_m)) * Float64(a_m + b));
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e+300], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[Sin[N[(N[(0.011111111111111112 * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(angle * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(-1.0 / N[(a$95$m - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := \sqrt[3]{\pi} \cdot \sqrt[3]{\sqrt{\pi}}\\
\mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{+300}:\\
\;\;\;\;\frac{\left(a\_m + b\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \sqrt{\pi}\right) \cdot \left(angle \cdot \sqrt{\pi}\right)\right)}{\frac{-1}{a\_m - b}}\\

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


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

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

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(b + a\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(angle \cdot \frac{1}{90}\right)}\right)}{\frac{-1}{a - b}} \]
      7. rem-square-sqrtN/A

        \[\leadsto \frac{\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \left(angle \cdot \frac{1}{90}\right)\right)}{\frac{-1}{a - b}} \]
      8. lift-sqrt.f64N/A

        \[\leadsto \frac{\left(b + a\right) \cdot \sin \left(\left(\color{blue}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \left(angle \cdot \frac{1}{90}\right)\right)}{\frac{-1}{a - b}} \]
      9. lift-sqrt.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(b + a\right) \cdot \sin \left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)}\right)}{\frac{-1}{a - b}} \]
      18. lower-*.f6464.7

        \[\leadsto \frac{\left(b + a\right) \cdot \sin \left(\left(\sqrt{\pi} \cdot angle\right) \cdot \color{blue}{\left(\sqrt{\pi} \cdot 0.011111111111111112\right)}\right)}{\frac{-1}{a - b}} \]
    7. Applied rewrites64.7%

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

    if 5.00000000000000026e300 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 39.4%

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

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
    5. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \frac{1}{90}\right)\right) \]
      2. add-cube-cbrtN/A

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \color{blue}{\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right)}\right) \cdot \frac{1}{90}\right)\right) \]
      4. add-sqr-sqrtN/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \left(\sqrt[3]{\color{blue}{\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right)\right) \cdot \frac{1}{90}\right)\right) \]
      5. cbrt-prodN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \left(\left(\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right)\right) \cdot \frac{1}{90}\right)\right) \]
      19. lower-cbrt.f6485.6

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

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

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

Alternative 2: 64.1% accurate, 0.5× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\ t_1 := \frac{angle}{180} \cdot \pi\\ t_2 := \cos t\_1 \cdot \left(\sin t\_1 \cdot \left(\left({b}^{2} - {a\_m}^{2}\right) \cdot 2\right)\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+133}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq 10^{+285}:\\ \;\;\;\;\left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (let* ((t_0
         (*
          (*
           (*
            (fma
             (* (* angle angle) -2.2862368541380886e-7)
             (* (* PI PI) PI)
             (* 0.011111111111111112 PI))
            angle)
           (- b a_m))
          (+ a_m b)))
        (t_1 (* (/ angle 180.0) PI))
        (t_2
         (* (cos t_1) (* (sin t_1) (* (- (pow b 2.0) (pow a_m 2.0)) 2.0)))))
   (if (<= t_2 -1e+133)
     t_0
     (if (<= t_2 1e+285)
       (* (* (- b a_m) (+ a_m b)) (* (* 0.011111111111111112 PI) angle))
       t_0))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double t_0 = ((fma(((angle * angle) * -2.2862368541380886e-7), ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)), (0.011111111111111112 * ((double) M_PI))) * angle) * (b - a_m)) * (a_m + b);
	double t_1 = (angle / 180.0) * ((double) M_PI);
	double t_2 = cos(t_1) * (sin(t_1) * ((pow(b, 2.0) - pow(a_m, 2.0)) * 2.0));
	double tmp;
	if (t_2 <= -1e+133) {
		tmp = t_0;
	} else if (t_2 <= 1e+285) {
		tmp = ((b - a_m) * (a_m + b)) * ((0.011111111111111112 * ((double) M_PI)) * angle);
	} else {
		tmp = t_0;
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	t_0 = Float64(Float64(Float64(fma(Float64(Float64(angle * angle) * -2.2862368541380886e-7), Float64(Float64(pi * pi) * pi), Float64(0.011111111111111112 * pi)) * angle) * Float64(b - a_m)) * Float64(a_m + b))
	t_1 = Float64(Float64(angle / 180.0) * pi)
	t_2 = Float64(cos(t_1) * Float64(sin(t_1) * Float64(Float64((b ^ 2.0) - (a_m ^ 2.0)) * 2.0)))
	tmp = 0.0
	if (t_2 <= -1e+133)
		tmp = t_0;
	elseif (t_2 <= 1e+285)
		tmp = Float64(Float64(Float64(b - a_m) * Float64(a_m + b)) * Float64(Float64(0.011111111111111112 * pi) * angle));
	else
		tmp = t_0;
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * -2.2862368541380886e-7), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[(N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+133], t$95$0, If[LessEqual[t$95$2, 1e+285], N[(N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := \left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\
t_1 := \frac{angle}{180} \cdot \pi\\
t_2 := \cos t\_1 \cdot \left(\sin t\_1 \cdot \left(\left({b}^{2} - {a\_m}^{2}\right) \cdot 2\right)\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+133}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_2 \leq 10^{+285}:\\
\;\;\;\;\left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


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

    1. Initial program 44.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. lift-*.f64N/A

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \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)}\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      8. unpow3N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      9. unpow2N/A

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{{\mathsf{PI}\left(\right)}^{2} \cdot \mathsf{PI}\left(\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      11. unpow2N/A

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      13. lower-PI.f64N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      14. lower-PI.f64N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      15. lower-PI.f64N/A

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{1}{90}}\right) \cdot angle\right)\right) \]
      18. lower-PI.f6470.7

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \left(\pi \cdot \pi\right) \cdot \pi, \color{blue}{\pi} \cdot 0.011111111111111112\right) \cdot angle\right)\right) \]
    7. Applied rewrites70.7%

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

    if -1e133 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 9.9999999999999998e284

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      15. lower--.f6459.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cos \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)\right) \leq -1 \cdot 10^{+133}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;\cos \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)\right) \leq 10^{+285}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 65.2% accurate, 0.8× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := {b}^{2} - {a\_m}^{2}\\ t_1 := \left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-218}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+287}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (let* ((t_0 (- (pow b 2.0) (pow a_m 2.0)))
        (t_1
         (*
          (*
           (*
            (fma
             (* (* angle angle) -2.2862368541380886e-7)
             (* (* PI PI) PI)
             (* 0.011111111111111112 PI))
            angle)
           (- b a_m))
          (+ a_m b))))
   (if (<= t_0 -1e-218)
     t_1
     (if (<= t_0 5e+287)
       (* (* b b) (sin (* (* angle PI) 0.011111111111111112)))
       t_1))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double t_0 = pow(b, 2.0) - pow(a_m, 2.0);
	double t_1 = ((fma(((angle * angle) * -2.2862368541380886e-7), ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)), (0.011111111111111112 * ((double) M_PI))) * angle) * (b - a_m)) * (a_m + b);
	double tmp;
	if (t_0 <= -1e-218) {
		tmp = t_1;
	} else if (t_0 <= 5e+287) {
		tmp = (b * b) * sin(((angle * ((double) M_PI)) * 0.011111111111111112));
	} else {
		tmp = t_1;
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	t_0 = Float64((b ^ 2.0) - (a_m ^ 2.0))
	t_1 = Float64(Float64(Float64(fma(Float64(Float64(angle * angle) * -2.2862368541380886e-7), Float64(Float64(pi * pi) * pi), Float64(0.011111111111111112 * pi)) * angle) * Float64(b - a_m)) * Float64(a_m + b))
	tmp = 0.0
	if (t_0 <= -1e-218)
		tmp = t_1;
	elseif (t_0 <= 5e+287)
		tmp = Float64(Float64(b * b) * sin(Float64(Float64(angle * pi) * 0.011111111111111112)));
	else
		tmp = t_1;
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * -2.2862368541380886e-7), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-218], t$95$1, If[LessEqual[t$95$0, 5e+287], N[(N[(b * b), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := {b}^{2} - {a\_m}^{2}\\
t_1 := \left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-218}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 50.1%

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

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \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)}\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      8. unpow3N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      9. unpow2N/A

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{{\mathsf{PI}\left(\right)}^{2} \cdot \mathsf{PI}\left(\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      11. unpow2N/A

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      13. lower-PI.f64N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      14. lower-PI.f64N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      15. lower-PI.f64N/A

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{1}{90}}\right) \cdot angle\right)\right) \]
      18. lower-PI.f6468.9

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \left(\pi \cdot \pi\right) \cdot \pi, \color{blue}{\pi} \cdot 0.011111111111111112\right) \cdot angle\right)\right) \]
    7. Applied rewrites68.9%

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

    if -1e-218 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 5e287

    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. lift-*.f64N/A

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
      9. lower-PI.f6462.6

        \[\leadsto \left(b \cdot b\right) \cdot \sin \left(\left(\color{blue}{\pi} \cdot angle\right) \cdot 0.011111111111111112\right) \]
    7. Applied rewrites62.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-218}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{+287}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.1% accurate, 1.2× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;a\_m \leq 2.8 \cdot 10^{-31}:\\ \;\;\;\;\left(\sin \left(\left(\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \mathsf{fma}\left(\frac{b}{a\_m}, a\_m, a\_m\right)\right) \cdot \left(b - a\_m\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= a_m 2.8e-31)
   (*
    (*
     (sin
      (*
       (*
        (* (pow (* (* PI PI) (sqrt PI)) 0.3333333333333333) (cbrt (sqrt PI)))
        angle)
       0.011111111111111112))
     (- b a_m))
    (+ a_m b))
   (*
    (* (sin (* (* 0.011111111111111112 PI) angle)) (fma (/ b a_m) a_m a_m))
    (- b a_m))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if (a_m <= 2.8e-31) {
		tmp = (sin((((pow(((((double) M_PI) * ((double) M_PI)) * sqrt(((double) M_PI))), 0.3333333333333333) * cbrt(sqrt(((double) M_PI)))) * angle) * 0.011111111111111112)) * (b - a_m)) * (a_m + b);
	} else {
		tmp = (sin(((0.011111111111111112 * ((double) M_PI)) * angle)) * fma((b / a_m), a_m, a_m)) * (b - a_m);
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if (a_m <= 2.8e-31)
		tmp = Float64(Float64(sin(Float64(Float64(Float64((Float64(Float64(pi * pi) * sqrt(pi)) ^ 0.3333333333333333) * cbrt(sqrt(pi))) * angle) * 0.011111111111111112)) * Float64(b - a_m)) * Float64(a_m + b));
	else
		tmp = Float64(Float64(sin(Float64(Float64(0.011111111111111112 * pi) * angle)) * fma(Float64(b / a_m), a_m, a_m)) * Float64(b - a_m));
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 2.8e-31], N[(N[(N[Sin[N[(N[(N[(N[Power[N[(N[(Pi * Pi), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * N[(N[(b / a$95$m), $MachinePrecision] * a$95$m + a$95$m), $MachinePrecision]), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

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

\mathbf{else}:\\
\;\;\;\;\left(\sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \mathsf{fma}\left(\frac{b}{a\_m}, a\_m, a\_m\right)\right) \cdot \left(b - a\_m\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.7999999999999999e-31

    1. Initial program 53.1%

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

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
    5. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \frac{1}{90}\right)\right) \]
      2. add-cbrt-cubeN/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}}\right) \cdot \frac{1}{90}\right)\right) \]
      3. pow1/3N/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}^{\frac{1}{3}}}\right) \cdot \frac{1}{90}\right)\right) \]
      4. add-sqr-sqrtN/A

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot {\color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}}\right) \cdot \frac{1}{90}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot {\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}\right)}\right) \cdot \frac{1}{90}\right)\right) \]
      7. pow1/3N/A

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)}\right) \cdot \frac{1}{90}\right)\right) \]
      9. lower-pow.f64N/A

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)\right) \cdot \frac{1}{90}\right)\right) \]
      16. lower-cbrt.f64N/A

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}\right)\right) \cdot \frac{1}{90}\right)\right) \]
      18. lower-sqrt.f6464.0

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\color{blue}{\sqrt{\pi}}}\right)\right) \cdot 0.011111111111111112\right)\right) \]
    6. Applied rewrites64.0%

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

    if 2.7999999999999999e-31 < a

    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. lift-*.f64N/A

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)} \]
      10. lower-*.f6470.5

        \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
      11. lift-*.f64N/A

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \]
      17. lower-*.f6474.0

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(a \cdot \color{blue}{\left(\frac{b}{a} + 1\right)}\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      2. distribute-rgt-inN/A

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\color{blue}{\mathsf{fma}\left(\frac{b}{a}, a, a\right)} \cdot \sin \left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      5. lower-/.f6474.0

        \[\leadsto \left(b - a\right) \cdot \left(\mathsf{fma}\left(\color{blue}{\frac{b}{a}}, a, a\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\right) \]
    9. Applied rewrites74.0%

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

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

Alternative 5: 65.3% accurate, 1.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -5 \cdot 10^{-230}:\\ \;\;\;\;\left(-a\_m\right) \cdot \left(\sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(a\_m + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot b\right) \cdot \left(b - a\_m\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= (- (pow b 2.0) (pow a_m 2.0)) -5e-230)
   (* (- a_m) (* (sin (* (* 0.011111111111111112 PI) angle)) (+ a_m b)))
   (* (* (sin (* (* angle PI) 0.011111111111111112)) b) (- b a_m))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -5e-230) {
		tmp = -a_m * (sin(((0.011111111111111112 * ((double) M_PI)) * angle)) * (a_m + b));
	} else {
		tmp = (sin(((angle * ((double) M_PI)) * 0.011111111111111112)) * b) * (b - a_m);
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double tmp;
	if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -5e-230) {
		tmp = -a_m * (Math.sin(((0.011111111111111112 * Math.PI) * angle)) * (a_m + b));
	} else {
		tmp = (Math.sin(((angle * Math.PI) * 0.011111111111111112)) * b) * (b - a_m);
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	tmp = 0
	if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -5e-230:
		tmp = -a_m * (math.sin(((0.011111111111111112 * math.pi) * angle)) * (a_m + b))
	else:
		tmp = (math.sin(((angle * math.pi) * 0.011111111111111112)) * b) * (b - a_m)
	return tmp
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -5e-230)
		tmp = Float64(Float64(-a_m) * Float64(sin(Float64(Float64(0.011111111111111112 * pi) * angle)) * Float64(a_m + b)));
	else
		tmp = Float64(Float64(sin(Float64(Float64(angle * pi) * 0.011111111111111112)) * b) * Float64(b - a_m));
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle)
	tmp = 0.0;
	if (((b ^ 2.0) - (a_m ^ 2.0)) <= -5e-230)
		tmp = -a_m * (sin(((0.011111111111111112 * pi) * angle)) * (a_m + b));
	else
		tmp = (sin(((angle * pi) * 0.011111111111111112)) * b) * (b - a_m);
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -5e-230], N[((-a$95$m) * N[(N[Sin[N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

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

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


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

    1. Initial program 54.2%

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

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)} \]
      10. lower-*.f6462.4

        \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
      11. lift-*.f64N/A

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \]
      17. lower-*.f6465.1

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot \left(\left(b + a\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      2. lower-neg.f6463.9

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

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

    if -5.00000000000000035e-230 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 54.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. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)} \]
      10. lower-*.f6469.4

        \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
      11. lift-*.f64N/A

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \]
      17. lower-*.f6469.1

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(b \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
      7. lower-PI.f6467.4

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

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

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

Alternative 6: 59.2% accurate, 1.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -\infty:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(\pi \cdot a\_m\right) \cdot angle\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= (- (pow b 2.0) (pow a_m 2.0)) (- INFINITY))
   (* (* -0.011111111111111112 a_m) (* (* PI a_m) angle))
   (* (* (- b a_m) (+ a_m b)) (* (* 0.011111111111111112 PI) angle))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -((double) INFINITY)) {
		tmp = (-0.011111111111111112 * a_m) * ((((double) M_PI) * a_m) * angle);
	} else {
		tmp = ((b - a_m) * (a_m + b)) * ((0.011111111111111112 * ((double) M_PI)) * angle);
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double tmp;
	if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -Double.POSITIVE_INFINITY) {
		tmp = (-0.011111111111111112 * a_m) * ((Math.PI * a_m) * angle);
	} else {
		tmp = ((b - a_m) * (a_m + b)) * ((0.011111111111111112 * Math.PI) * angle);
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	tmp = 0
	if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -math.inf:
		tmp = (-0.011111111111111112 * a_m) * ((math.pi * a_m) * angle)
	else:
		tmp = ((b - a_m) * (a_m + b)) * ((0.011111111111111112 * math.pi) * angle)
	return tmp
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= Float64(-Inf))
		tmp = Float64(Float64(-0.011111111111111112 * a_m) * Float64(Float64(pi * a_m) * angle));
	else
		tmp = Float64(Float64(Float64(b - a_m) * Float64(a_m + b)) * Float64(Float64(0.011111111111111112 * pi) * angle));
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle)
	tmp = 0.0;
	if (((b ^ 2.0) - (a_m ^ 2.0)) <= -Inf)
		tmp = (-0.011111111111111112 * a_m) * ((pi * a_m) * angle);
	else
		tmp = ((b - a_m) * (a_m + b)) * ((0.011111111111111112 * pi) * angle);
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(N[(Pi * a$95$m), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -\infty:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(\pi \cdot a\_m\right) \cdot angle\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      15. lower--.f6444.4

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

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

      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites44.4%

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
      2. Step-by-step derivation
        1. Applied rewrites63.5%

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \pi\right)}\right) \]
        2. Step-by-step derivation
          1. Applied rewrites63.6%

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

          if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
            15. lower--.f6454.2

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

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

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

        Alternative 7: 59.2% accurate, 1.9× speedup?

        \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -\infty:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(\pi \cdot a\_m\right) \cdot angle\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot angle\right)\\ \end{array} \end{array} \]
        a_m = (fabs.f64 a)
        (FPCore (a_m b angle)
         :precision binary64
         (if (<= (- (pow b 2.0) (pow a_m 2.0)) (- INFINITY))
           (* (* -0.011111111111111112 a_m) (* (* PI a_m) angle))
           (* (* (* (- b a_m) (+ a_m b)) PI) (* 0.011111111111111112 angle))))
        a_m = fabs(a);
        double code(double a_m, double b, double angle) {
        	double tmp;
        	if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -((double) INFINITY)) {
        		tmp = (-0.011111111111111112 * a_m) * ((((double) M_PI) * a_m) * angle);
        	} else {
        		tmp = (((b - a_m) * (a_m + b)) * ((double) M_PI)) * (0.011111111111111112 * angle);
        	}
        	return tmp;
        }
        
        a_m = Math.abs(a);
        public static double code(double a_m, double b, double angle) {
        	double tmp;
        	if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -Double.POSITIVE_INFINITY) {
        		tmp = (-0.011111111111111112 * a_m) * ((Math.PI * a_m) * angle);
        	} else {
        		tmp = (((b - a_m) * (a_m + b)) * Math.PI) * (0.011111111111111112 * angle);
        	}
        	return tmp;
        }
        
        a_m = math.fabs(a)
        def code(a_m, b, angle):
        	tmp = 0
        	if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -math.inf:
        		tmp = (-0.011111111111111112 * a_m) * ((math.pi * a_m) * angle)
        	else:
        		tmp = (((b - a_m) * (a_m + b)) * math.pi) * (0.011111111111111112 * angle)
        	return tmp
        
        a_m = abs(a)
        function code(a_m, b, angle)
        	tmp = 0.0
        	if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= Float64(-Inf))
        		tmp = Float64(Float64(-0.011111111111111112 * a_m) * Float64(Float64(pi * a_m) * angle));
        	else
        		tmp = Float64(Float64(Float64(Float64(b - a_m) * Float64(a_m + b)) * pi) * Float64(0.011111111111111112 * angle));
        	end
        	return tmp
        end
        
        a_m = abs(a);
        function tmp_2 = code(a_m, b, angle)
        	tmp = 0.0;
        	if (((b ^ 2.0) - (a_m ^ 2.0)) <= -Inf)
        		tmp = (-0.011111111111111112 * a_m) * ((pi * a_m) * angle);
        	else
        		tmp = (((b - a_m) * (a_m + b)) * pi) * (0.011111111111111112 * angle);
        	end
        	tmp_2 = tmp;
        end
        
        a_m = N[Abs[a], $MachinePrecision]
        code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(N[(Pi * a$95$m), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * N[(0.011111111111111112 * angle), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        a_m = \left|a\right|
        
        \\
        \begin{array}{l}
        \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -\infty:\\
        \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(\pi \cdot a\_m\right) \cdot angle\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot angle\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
            15. lower--.f6444.4

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

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

            \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
          7. Step-by-step derivation
            1. Applied rewrites44.4%

              \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
            2. Step-by-step derivation
              1. Applied rewrites63.5%

                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \pi\right)}\right) \]
              2. Step-by-step derivation
                1. Applied rewrites63.6%

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

                if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                  15. lower--.f6454.2

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

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

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

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

                Alternative 8: 58.1% accurate, 2.0× speedup?

                \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -5 \cdot 10^{-230}:\\ \;\;\;\;\left(\left(angle \cdot \pi\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
                a_m = (fabs.f64 a)
                (FPCore (a_m b angle)
                 :precision binary64
                 (if (<= (- (pow b 2.0) (pow a_m 2.0)) -5e-230)
                   (* (* (* angle PI) a_m) (* -0.011111111111111112 a_m))
                   (* (* (* (* b b) PI) angle) 0.011111111111111112)))
                a_m = fabs(a);
                double code(double a_m, double b, double angle) {
                	double tmp;
                	if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -5e-230) {
                		tmp = ((angle * ((double) M_PI)) * a_m) * (-0.011111111111111112 * a_m);
                	} else {
                		tmp = (((b * b) * ((double) M_PI)) * angle) * 0.011111111111111112;
                	}
                	return tmp;
                }
                
                a_m = Math.abs(a);
                public static double code(double a_m, double b, double angle) {
                	double tmp;
                	if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -5e-230) {
                		tmp = ((angle * Math.PI) * a_m) * (-0.011111111111111112 * a_m);
                	} else {
                		tmp = (((b * b) * Math.PI) * angle) * 0.011111111111111112;
                	}
                	return tmp;
                }
                
                a_m = math.fabs(a)
                def code(a_m, b, angle):
                	tmp = 0
                	if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -5e-230:
                		tmp = ((angle * math.pi) * a_m) * (-0.011111111111111112 * a_m)
                	else:
                		tmp = (((b * b) * math.pi) * angle) * 0.011111111111111112
                	return tmp
                
                a_m = abs(a)
                function code(a_m, b, angle)
                	tmp = 0.0
                	if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -5e-230)
                		tmp = Float64(Float64(Float64(angle * pi) * a_m) * Float64(-0.011111111111111112 * a_m));
                	else
                		tmp = Float64(Float64(Float64(Float64(b * b) * pi) * angle) * 0.011111111111111112);
                	end
                	return tmp
                end
                
                a_m = abs(a);
                function tmp_2 = code(a_m, b, angle)
                	tmp = 0.0;
                	if (((b ^ 2.0) - (a_m ^ 2.0)) <= -5e-230)
                		tmp = ((angle * pi) * a_m) * (-0.011111111111111112 * a_m);
                	else
                		tmp = (((b * b) * pi) * angle) * 0.011111111111111112;
                	end
                	tmp_2 = tmp;
                end
                
                a_m = N[Abs[a], $MachinePrecision]
                code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -5e-230], N[(N[(N[(angle * Pi), $MachinePrecision] * a$95$m), $MachinePrecision] * N[(-0.011111111111111112 * a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
                
                \begin{array}{l}
                a_m = \left|a\right|
                
                \\
                \begin{array}{l}
                \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -5 \cdot 10^{-230}:\\
                \;\;\;\;\left(\left(angle \cdot \pi\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -5.00000000000000035e-230

                  1. Initial program 54.2%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                    15. lower--.f6447.3

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

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

                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                  7. Step-by-step derivation
                    1. Applied rewrites46.4%

                      \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
                    2. Step-by-step derivation
                      1. Applied rewrites54.4%

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

                      if -5.00000000000000035e-230 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                      1. Initial program 54.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 b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \cos \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      5. Applied rewrites59.0%

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

                        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites53.7%

                          \[\leadsto \left(\left(\left(b \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot \color{blue}{0.011111111111111112} \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification54.0%

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

                      Alternative 9: 64.1% accurate, 3.1× speedup?

                      \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 3 \cdot 10^{+38}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
                      a_m = (fabs.f64 a)
                      (FPCore (a_m b angle)
                       :precision binary64
                       (if (<= (/ angle 180.0) 3e+38)
                         (*
                          (*
                           (*
                            (fma
                             (* (* angle angle) -2.2862368541380886e-7)
                             (* (* PI PI) PI)
                             (* 0.011111111111111112 PI))
                            angle)
                           (- b a_m))
                          (+ a_m b))
                         (* (* (- b a_m) (+ a_m b)) (sin (* (* angle PI) 0.011111111111111112)))))
                      a_m = fabs(a);
                      double code(double a_m, double b, double angle) {
                      	double tmp;
                      	if ((angle / 180.0) <= 3e+38) {
                      		tmp = ((fma(((angle * angle) * -2.2862368541380886e-7), ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)), (0.011111111111111112 * ((double) M_PI))) * angle) * (b - a_m)) * (a_m + b);
                      	} else {
                      		tmp = ((b - a_m) * (a_m + b)) * sin(((angle * ((double) M_PI)) * 0.011111111111111112));
                      	}
                      	return tmp;
                      }
                      
                      a_m = abs(a)
                      function code(a_m, b, angle)
                      	tmp = 0.0
                      	if (Float64(angle / 180.0) <= 3e+38)
                      		tmp = Float64(Float64(Float64(fma(Float64(Float64(angle * angle) * -2.2862368541380886e-7), Float64(Float64(pi * pi) * pi), Float64(0.011111111111111112 * pi)) * angle) * Float64(b - a_m)) * Float64(a_m + b));
                      	else
                      		tmp = Float64(Float64(Float64(b - a_m) * Float64(a_m + b)) * sin(Float64(Float64(angle * pi) * 0.011111111111111112)));
                      	end
                      	return tmp
                      end
                      
                      a_m = N[Abs[a], $MachinePrecision]
                      code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 3e+38], N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * -2.2862368541380886e-7), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      a_m = \left|a\right|
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;\frac{angle}{180} \leq 3 \cdot 10^{+38}:\\
                      \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (/.f64 angle #s(literal 180 binary64)) < 3.0000000000000001e38

                        1. Initial program 63.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. lift-*.f64N/A

                            \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                          2. lift-*.f64N/A

                            \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \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)}\right) \]
                        6. Step-by-step derivation
                          1. *-commutativeN/A

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

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

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

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

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

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          8. unpow3N/A

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          9. unpow2N/A

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{{\mathsf{PI}\left(\right)}^{2} \cdot \mathsf{PI}\left(\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          11. unpow2N/A

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          13. lower-PI.f64N/A

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          14. lower-PI.f64N/A

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          15. lower-PI.f64N/A

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

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{1}{90}}\right) \cdot angle\right)\right) \]
                          18. lower-PI.f6474.4

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \left(\pi \cdot \pi\right) \cdot \pi, \color{blue}{\pi} \cdot 0.011111111111111112\right) \cdot angle\right)\right) \]
                        7. Applied rewrites74.4%

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

                        if 3.0000000000000001e38 < (/.f64 angle #s(literal 180 binary64))

                        1. Initial program 28.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. lift-*.f64N/A

                            \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                          2. lift-*.f64N/A

                            \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 3 \cdot 10^{+38}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\ \end{array} \]
                      5. Add Preprocessing

                      Alternative 10: 65.0% accurate, 3.5× speedup?

                      \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;a\_m \leq 8.8 \cdot 10^{-111}:\\ \;\;\;\;\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot b\right) \cdot \left(a\_m + b\right)\\ \mathbf{elif}\;a\_m \leq 3.8 \cdot 10^{+249}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(b - a\_m\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(a\_m + b\right)\\ \end{array} \end{array} \]
                      a_m = (fabs.f64 a)
                      (FPCore (a_m b angle)
                       :precision binary64
                       (if (<= a_m 8.8e-111)
                         (* (* (sin (* (* angle PI) 0.011111111111111112)) b) (+ a_m b))
                         (if (<= a_m 3.8e+249)
                           (*
                            (*
                             (*
                              (fma
                               (* (* angle angle) -2.2862368541380886e-7)
                               (* (* PI PI) PI)
                               (* 0.011111111111111112 PI))
                              angle)
                             (- b a_m))
                            (+ a_m b))
                           (* (* (* (* (- b a_m) PI) angle) 0.011111111111111112) (+ a_m b)))))
                      a_m = fabs(a);
                      double code(double a_m, double b, double angle) {
                      	double tmp;
                      	if (a_m <= 8.8e-111) {
                      		tmp = (sin(((angle * ((double) M_PI)) * 0.011111111111111112)) * b) * (a_m + b);
                      	} else if (a_m <= 3.8e+249) {
                      		tmp = ((fma(((angle * angle) * -2.2862368541380886e-7), ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)), (0.011111111111111112 * ((double) M_PI))) * angle) * (b - a_m)) * (a_m + b);
                      	} else {
                      		tmp = ((((b - a_m) * ((double) M_PI)) * angle) * 0.011111111111111112) * (a_m + b);
                      	}
                      	return tmp;
                      }
                      
                      a_m = abs(a)
                      function code(a_m, b, angle)
                      	tmp = 0.0
                      	if (a_m <= 8.8e-111)
                      		tmp = Float64(Float64(sin(Float64(Float64(angle * pi) * 0.011111111111111112)) * b) * Float64(a_m + b));
                      	elseif (a_m <= 3.8e+249)
                      		tmp = Float64(Float64(Float64(fma(Float64(Float64(angle * angle) * -2.2862368541380886e-7), Float64(Float64(pi * pi) * pi), Float64(0.011111111111111112 * pi)) * angle) * Float64(b - a_m)) * Float64(a_m + b));
                      	else
                      		tmp = Float64(Float64(Float64(Float64(Float64(b - a_m) * pi) * angle) * 0.011111111111111112) * Float64(a_m + b));
                      	end
                      	return tmp
                      end
                      
                      a_m = N[Abs[a], $MachinePrecision]
                      code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 8.8e-111], N[(N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * b), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 3.8e+249], N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * -2.2862368541380886e-7), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      a_m = \left|a\right|
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;a\_m \leq 8.8 \cdot 10^{-111}:\\
                      \;\;\;\;\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot b\right) \cdot \left(a\_m + b\right)\\
                      
                      \mathbf{elif}\;a\_m \leq 3.8 \cdot 10^{+249}:\\
                      \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(\left(\left(\left(b - a\_m\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(a\_m + b\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if a < 8.8e-111

                        1. Initial program 52.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. lift-*.f64N/A

                            \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                          2. lift-*.f64N/A

                            \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(a + b\right) \cdot \left(b \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
                          7. lower-PI.f6447.6

                            \[\leadsto \left(a + b\right) \cdot \left(b \cdot \sin \left(\left(\color{blue}{\pi} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
                        7. Applied rewrites47.6%

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

                        if 8.8e-111 < a < 3.7999999999999997e249

                        1. Initial program 58.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. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                          2. lift-*.f64N/A

                            \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \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)}\right) \]
                        6. Step-by-step derivation
                          1. *-commutativeN/A

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

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

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

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

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

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          8. unpow3N/A

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          9. unpow2N/A

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{{\mathsf{PI}\left(\right)}^{2} \cdot \mathsf{PI}\left(\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          11. unpow2N/A

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          13. lower-PI.f64N/A

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          14. lower-PI.f64N/A

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \mathsf{PI}\left(\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                          15. lower-PI.f64N/A

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

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{1}{90}}\right) \cdot angle\right)\right) \]
                          18. lower-PI.f6467.2

                            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \left(\pi \cdot \pi\right) \cdot \pi, \color{blue}{\pi} \cdot 0.011111111111111112\right) \cdot angle\right)\right) \]
                        7. Applied rewrites67.2%

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

                        if 3.7999999999999997e249 < a

                        1. Initial program 50.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. lift-*.f64N/A

                            \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                          2. lift-*.f64N/A

                            \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(a + b\right) \cdot \left(\left(\left(\color{blue}{\left(b - a\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90}\right) \]
                          8. lower-PI.f6478.6

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 8.8 \cdot 10^{-111}:\\ \;\;\;\;\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot b\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+249}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \left(\pi \cdot \pi\right) \cdot \pi, 0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(a + b\right)\\ \end{array} \]
                      5. Add Preprocessing

                      Alternative 11: 67.4% accurate, 3.6× speedup?

                      \[\begin{array}{l} a_m = \left|a\right| \\ \left(\sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(a\_m + b\right)\right) \cdot \left(b - a\_m\right) \end{array} \]
                      a_m = (fabs.f64 a)
                      (FPCore (a_m b angle)
                       :precision binary64
                       (* (* (sin (* (* 0.011111111111111112 PI) angle)) (+ a_m b)) (- b a_m)))
                      a_m = fabs(a);
                      double code(double a_m, double b, double angle) {
                      	return (sin(((0.011111111111111112 * ((double) M_PI)) * angle)) * (a_m + b)) * (b - a_m);
                      }
                      
                      a_m = Math.abs(a);
                      public static double code(double a_m, double b, double angle) {
                      	return (Math.sin(((0.011111111111111112 * Math.PI) * angle)) * (a_m + b)) * (b - a_m);
                      }
                      
                      a_m = math.fabs(a)
                      def code(a_m, b, angle):
                      	return (math.sin(((0.011111111111111112 * math.pi) * angle)) * (a_m + b)) * (b - a_m)
                      
                      a_m = abs(a)
                      function code(a_m, b, angle)
                      	return Float64(Float64(sin(Float64(Float64(0.011111111111111112 * pi) * angle)) * Float64(a_m + b)) * Float64(b - a_m))
                      end
                      
                      a_m = abs(a);
                      function tmp = code(a_m, b, angle)
                      	tmp = (sin(((0.011111111111111112 * pi) * angle)) * (a_m + b)) * (b - a_m);
                      end
                      
                      a_m = N[Abs[a], $MachinePrecision]
                      code[a$95$m_, b_, angle_] := N[(N[(N[Sin[N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      a_m = \left|a\right|
                      
                      \\
                      \left(\sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(a\_m + b\right)\right) \cdot \left(b - a\_m\right)
                      \end{array}
                      
                      Derivation
                      1. Initial program 54.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. lift-*.f64N/A

                          \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                        2. lift-*.f64N/A

                          \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                        3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)} \]
                        10. lower-*.f6466.5

                          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
                        11. lift-*.f64N/A

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

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

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

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

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

                          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \]
                        17. lower-*.f6467.4

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

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

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

                      Alternative 12: 67.1% accurate, 3.6× speedup?

                      \[\begin{array}{l} a_m = \left|a\right| \\ \left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right) \end{array} \]
                      a_m = (fabs.f64 a)
                      (FPCore (a_m b angle)
                       :precision binary64
                       (* (* (sin (* (* angle PI) 0.011111111111111112)) (- b a_m)) (+ a_m b)))
                      a_m = fabs(a);
                      double code(double a_m, double b, double angle) {
                      	return (sin(((angle * ((double) M_PI)) * 0.011111111111111112)) * (b - a_m)) * (a_m + b);
                      }
                      
                      a_m = Math.abs(a);
                      public static double code(double a_m, double b, double angle) {
                      	return (Math.sin(((angle * Math.PI) * 0.011111111111111112)) * (b - a_m)) * (a_m + b);
                      }
                      
                      a_m = math.fabs(a)
                      def code(a_m, b, angle):
                      	return (math.sin(((angle * math.pi) * 0.011111111111111112)) * (b - a_m)) * (a_m + b)
                      
                      a_m = abs(a)
                      function code(a_m, b, angle)
                      	return Float64(Float64(sin(Float64(Float64(angle * pi) * 0.011111111111111112)) * Float64(b - a_m)) * Float64(a_m + b))
                      end
                      
                      a_m = abs(a);
                      function tmp = code(a_m, b, angle)
                      	tmp = (sin(((angle * pi) * 0.011111111111111112)) * (b - a_m)) * (a_m + b);
                      end
                      
                      a_m = N[Abs[a], $MachinePrecision]
                      code[a$95$m_, b_, angle_] := N[(N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      a_m = \left|a\right|
                      
                      \\
                      \left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)
                      \end{array}
                      
                      Derivation
                      1. Initial program 54.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. lift-*.f64N/A

                          \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                        2. lift-*.f64N/A

                          \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                        3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 13: 63.2% accurate, 7.4× speedup?

                      \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \left(0.011111111111111112 \cdot \pi\right) \cdot angle\\ \mathbf{if}\;\frac{angle}{180} \leq 10^{+147}:\\ \;\;\;\;\frac{t\_0 \cdot \left(b - a\_m\right)}{\frac{1}{a\_m + b}}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot t\_0\\ \end{array} \end{array} \]
                      a_m = (fabs.f64 a)
                      (FPCore (a_m b angle)
                       :precision binary64
                       (let* ((t_0 (* (* 0.011111111111111112 PI) angle)))
                         (if (<= (/ angle 180.0) 1e+147)
                           (/ (* t_0 (- b a_m)) (/ 1.0 (+ a_m b)))
                           (* (* (- a_m) (+ a_m b)) t_0))))
                      a_m = fabs(a);
                      double code(double a_m, double b, double angle) {
                      	double t_0 = (0.011111111111111112 * ((double) M_PI)) * angle;
                      	double tmp;
                      	if ((angle / 180.0) <= 1e+147) {
                      		tmp = (t_0 * (b - a_m)) / (1.0 / (a_m + b));
                      	} else {
                      		tmp = (-a_m * (a_m + b)) * t_0;
                      	}
                      	return tmp;
                      }
                      
                      a_m = Math.abs(a);
                      public static double code(double a_m, double b, double angle) {
                      	double t_0 = (0.011111111111111112 * Math.PI) * angle;
                      	double tmp;
                      	if ((angle / 180.0) <= 1e+147) {
                      		tmp = (t_0 * (b - a_m)) / (1.0 / (a_m + b));
                      	} else {
                      		tmp = (-a_m * (a_m + b)) * t_0;
                      	}
                      	return tmp;
                      }
                      
                      a_m = math.fabs(a)
                      def code(a_m, b, angle):
                      	t_0 = (0.011111111111111112 * math.pi) * angle
                      	tmp = 0
                      	if (angle / 180.0) <= 1e+147:
                      		tmp = (t_0 * (b - a_m)) / (1.0 / (a_m + b))
                      	else:
                      		tmp = (-a_m * (a_m + b)) * t_0
                      	return tmp
                      
                      a_m = abs(a)
                      function code(a_m, b, angle)
                      	t_0 = Float64(Float64(0.011111111111111112 * pi) * angle)
                      	tmp = 0.0
                      	if (Float64(angle / 180.0) <= 1e+147)
                      		tmp = Float64(Float64(t_0 * Float64(b - a_m)) / Float64(1.0 / Float64(a_m + b)));
                      	else
                      		tmp = Float64(Float64(Float64(-a_m) * Float64(a_m + b)) * t_0);
                      	end
                      	return tmp
                      end
                      
                      a_m = abs(a);
                      function tmp_2 = code(a_m, b, angle)
                      	t_0 = (0.011111111111111112 * pi) * angle;
                      	tmp = 0.0;
                      	if ((angle / 180.0) <= 1e+147)
                      		tmp = (t_0 * (b - a_m)) / (1.0 / (a_m + b));
                      	else
                      		tmp = (-a_m * (a_m + b)) * t_0;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      a_m = N[Abs[a], $MachinePrecision]
                      code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+147], N[(N[(t$95$0 * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-a$95$m) * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      a_m = \left|a\right|
                      
                      \\
                      \begin{array}{l}
                      t_0 := \left(0.011111111111111112 \cdot \pi\right) \cdot angle\\
                      \mathbf{if}\;\frac{angle}{180} \leq 10^{+147}:\\
                      \;\;\;\;\frac{t\_0 \cdot \left(b - a\_m\right)}{\frac{1}{a\_m + b}}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(\left(-a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot t\_0\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999998e146

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                          15. lower--.f6458.2

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

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

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

                          if 9.9999999999999998e146 < (/.f64 angle #s(literal 180 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                            15. lower--.f6411.3

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

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

                            \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot \color{blue}{a}\right)\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites15.1%

                              \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right) \]
                          8. Recombined 2 regimes into one program.
                          9. Final simplification58.7%

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

                          Alternative 14: 63.2% accurate, 10.3× speedup?

                          \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+147}:\\ \;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\ \end{array} \end{array} \]
                          a_m = (fabs.f64 a)
                          (FPCore (a_m b angle)
                           :precision binary64
                           (if (<= (/ angle 180.0) 1e+147)
                             (* (* (* (* angle PI) 0.011111111111111112) (- b a_m)) (+ a_m b))
                             (* (* (- a_m) (+ a_m b)) (* (* 0.011111111111111112 PI) angle))))
                          a_m = fabs(a);
                          double code(double a_m, double b, double angle) {
                          	double tmp;
                          	if ((angle / 180.0) <= 1e+147) {
                          		tmp = (((angle * ((double) M_PI)) * 0.011111111111111112) * (b - a_m)) * (a_m + b);
                          	} else {
                          		tmp = (-a_m * (a_m + b)) * ((0.011111111111111112 * ((double) M_PI)) * angle);
                          	}
                          	return tmp;
                          }
                          
                          a_m = Math.abs(a);
                          public static double code(double a_m, double b, double angle) {
                          	double tmp;
                          	if ((angle / 180.0) <= 1e+147) {
                          		tmp = (((angle * Math.PI) * 0.011111111111111112) * (b - a_m)) * (a_m + b);
                          	} else {
                          		tmp = (-a_m * (a_m + b)) * ((0.011111111111111112 * Math.PI) * angle);
                          	}
                          	return tmp;
                          }
                          
                          a_m = math.fabs(a)
                          def code(a_m, b, angle):
                          	tmp = 0
                          	if (angle / 180.0) <= 1e+147:
                          		tmp = (((angle * math.pi) * 0.011111111111111112) * (b - a_m)) * (a_m + b)
                          	else:
                          		tmp = (-a_m * (a_m + b)) * ((0.011111111111111112 * math.pi) * angle)
                          	return tmp
                          
                          a_m = abs(a)
                          function code(a_m, b, angle)
                          	tmp = 0.0
                          	if (Float64(angle / 180.0) <= 1e+147)
                          		tmp = Float64(Float64(Float64(Float64(angle * pi) * 0.011111111111111112) * Float64(b - a_m)) * Float64(a_m + b));
                          	else
                          		tmp = Float64(Float64(Float64(-a_m) * Float64(a_m + b)) * Float64(Float64(0.011111111111111112 * pi) * angle));
                          	end
                          	return tmp
                          end
                          
                          a_m = abs(a);
                          function tmp_2 = code(a_m, b, angle)
                          	tmp = 0.0;
                          	if ((angle / 180.0) <= 1e+147)
                          		tmp = (((angle * pi) * 0.011111111111111112) * (b - a_m)) * (a_m + b);
                          	else
                          		tmp = (-a_m * (a_m + b)) * ((0.011111111111111112 * pi) * angle);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          a_m = N[Abs[a], $MachinePrecision]
                          code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+147], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision], N[(N[((-a$95$m) * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          a_m = \left|a\right|
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;\frac{angle}{180} \leq 10^{+147}:\\
                          \;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\_m\right)\right) \cdot \left(a\_m + b\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(\left(-a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999998e146

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

                                \[\leadsto \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) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                              2. lift-*.f64N/A

                                \[\leadsto \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)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
                              5. lower-PI.f6464.7

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

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

                            if 9.9999999999999998e146 < (/.f64 angle #s(literal 180 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                              15. lower--.f6411.3

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

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

                              \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot \color{blue}{a}\right)\right) \]
                            7. Step-by-step derivation
                              1. Applied rewrites15.1%

                                \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right) \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification58.7%

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

                            Alternative 15: 63.2% accurate, 10.3× speedup?

                            \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+147}:\\ \;\;\;\;\left(\left(\left(a\_m + b\right) \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot angle\right)\right) \cdot \left(b - a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\ \end{array} \end{array} \]
                            a_m = (fabs.f64 a)
                            (FPCore (a_m b angle)
                             :precision binary64
                             (if (<= (/ angle 180.0) 1e+147)
                               (* (* (* (+ a_m b) PI) (* 0.011111111111111112 angle)) (- b a_m))
                               (* (* (- a_m) (+ a_m b)) (* (* 0.011111111111111112 PI) angle))))
                            a_m = fabs(a);
                            double code(double a_m, double b, double angle) {
                            	double tmp;
                            	if ((angle / 180.0) <= 1e+147) {
                            		tmp = (((a_m + b) * ((double) M_PI)) * (0.011111111111111112 * angle)) * (b - a_m);
                            	} else {
                            		tmp = (-a_m * (a_m + b)) * ((0.011111111111111112 * ((double) M_PI)) * angle);
                            	}
                            	return tmp;
                            }
                            
                            a_m = Math.abs(a);
                            public static double code(double a_m, double b, double angle) {
                            	double tmp;
                            	if ((angle / 180.0) <= 1e+147) {
                            		tmp = (((a_m + b) * Math.PI) * (0.011111111111111112 * angle)) * (b - a_m);
                            	} else {
                            		tmp = (-a_m * (a_m + b)) * ((0.011111111111111112 * Math.PI) * angle);
                            	}
                            	return tmp;
                            }
                            
                            a_m = math.fabs(a)
                            def code(a_m, b, angle):
                            	tmp = 0
                            	if (angle / 180.0) <= 1e+147:
                            		tmp = (((a_m + b) * math.pi) * (0.011111111111111112 * angle)) * (b - a_m)
                            	else:
                            		tmp = (-a_m * (a_m + b)) * ((0.011111111111111112 * math.pi) * angle)
                            	return tmp
                            
                            a_m = abs(a)
                            function code(a_m, b, angle)
                            	tmp = 0.0
                            	if (Float64(angle / 180.0) <= 1e+147)
                            		tmp = Float64(Float64(Float64(Float64(a_m + b) * pi) * Float64(0.011111111111111112 * angle)) * Float64(b - a_m));
                            	else
                            		tmp = Float64(Float64(Float64(-a_m) * Float64(a_m + b)) * Float64(Float64(0.011111111111111112 * pi) * angle));
                            	end
                            	return tmp
                            end
                            
                            a_m = abs(a);
                            function tmp_2 = code(a_m, b, angle)
                            	tmp = 0.0;
                            	if ((angle / 180.0) <= 1e+147)
                            		tmp = (((a_m + b) * pi) * (0.011111111111111112 * angle)) * (b - a_m);
                            	else
                            		tmp = (-a_m * (a_m + b)) * ((0.011111111111111112 * pi) * angle);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            a_m = N[Abs[a], $MachinePrecision]
                            code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+147], N[(N[(N[(N[(a$95$m + b), $MachinePrecision] * Pi), $MachinePrecision] * N[(0.011111111111111112 * angle), $MachinePrecision]), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[((-a$95$m) * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            a_m = \left|a\right|
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;\frac{angle}{180} \leq 10^{+147}:\\
                            \;\;\;\;\left(\left(\left(a\_m + b\right) \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot angle\right)\right) \cdot \left(b - a\_m\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(\left(-a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999998e146

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                15. lower--.f6458.2

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

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

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

                                if 9.9999999999999998e146 < (/.f64 angle #s(literal 180 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                  15. lower--.f6411.3

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

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

                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot \color{blue}{a}\right)\right) \]
                                7. Step-by-step derivation
                                  1. Applied rewrites15.1%

                                    \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right) \]
                                8. Recombined 2 regimes into one program.
                                9. Final simplification58.7%

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

                                Alternative 16: 39.2% accurate, 11.9× speedup?

                                \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 0.0001:\\ \;\;\;\;\left(\left(angle \cdot \pi\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right) \cdot \pi\right) \cdot angle\\ \end{array} \end{array} \]
                                a_m = (fabs.f64 a)
                                (FPCore (a_m b angle)
                                 :precision binary64
                                 (if (<= (/ angle 180.0) 0.0001)
                                   (* (* (* angle PI) a_m) (* -0.011111111111111112 a_m))
                                   (* (* (* (* a_m a_m) -0.011111111111111112) PI) angle)))
                                a_m = fabs(a);
                                double code(double a_m, double b, double angle) {
                                	double tmp;
                                	if ((angle / 180.0) <= 0.0001) {
                                		tmp = ((angle * ((double) M_PI)) * a_m) * (-0.011111111111111112 * a_m);
                                	} else {
                                		tmp = (((a_m * a_m) * -0.011111111111111112) * ((double) M_PI)) * angle;
                                	}
                                	return tmp;
                                }
                                
                                a_m = Math.abs(a);
                                public static double code(double a_m, double b, double angle) {
                                	double tmp;
                                	if ((angle / 180.0) <= 0.0001) {
                                		tmp = ((angle * Math.PI) * a_m) * (-0.011111111111111112 * a_m);
                                	} else {
                                		tmp = (((a_m * a_m) * -0.011111111111111112) * Math.PI) * angle;
                                	}
                                	return tmp;
                                }
                                
                                a_m = math.fabs(a)
                                def code(a_m, b, angle):
                                	tmp = 0
                                	if (angle / 180.0) <= 0.0001:
                                		tmp = ((angle * math.pi) * a_m) * (-0.011111111111111112 * a_m)
                                	else:
                                		tmp = (((a_m * a_m) * -0.011111111111111112) * math.pi) * angle
                                	return tmp
                                
                                a_m = abs(a)
                                function code(a_m, b, angle)
                                	tmp = 0.0
                                	if (Float64(angle / 180.0) <= 0.0001)
                                		tmp = Float64(Float64(Float64(angle * pi) * a_m) * Float64(-0.011111111111111112 * a_m));
                                	else
                                		tmp = Float64(Float64(Float64(Float64(a_m * a_m) * -0.011111111111111112) * pi) * angle);
                                	end
                                	return tmp
                                end
                                
                                a_m = abs(a);
                                function tmp_2 = code(a_m, b, angle)
                                	tmp = 0.0;
                                	if ((angle / 180.0) <= 0.0001)
                                		tmp = ((angle * pi) * a_m) * (-0.011111111111111112 * a_m);
                                	else
                                		tmp = (((a_m * a_m) * -0.011111111111111112) * pi) * angle;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                a_m = N[Abs[a], $MachinePrecision]
                                code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 0.0001], N[(N[(N[(angle * Pi), $MachinePrecision] * a$95$m), $MachinePrecision] * N[(-0.011111111111111112 * a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(a$95$m * a$95$m), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision]]
                                
                                \begin{array}{l}
                                a_m = \left|a\right|
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;\frac{angle}{180} \leq 0.0001:\\
                                \;\;\;\;\left(\left(angle \cdot \pi\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(\left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right) \cdot \pi\right) \cdot angle\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000005e-4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                    15. lower--.f6462.7

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

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

                                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites37.1%

                                      \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites40.2%

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

                                      if 1.00000000000000005e-4 < (/.f64 angle #s(literal 180 binary64))

                                      1. Initial program 29.9%

                                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                        15. lower--.f6427.4

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

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

                                        \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites23.8%

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

                                            \[\leadsto \left(\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot \pi\right) \cdot angle \]
                                        3. Recombined 2 regimes into one program.
                                        4. Final simplification35.5%

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

                                        Alternative 17: 39.2% accurate, 11.9× speedup?

                                        \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 0.0001:\\ \;\;\;\;\left(\left(angle \cdot \pi\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right) \cdot \left(angle \cdot \pi\right)\\ \end{array} \end{array} \]
                                        a_m = (fabs.f64 a)
                                        (FPCore (a_m b angle)
                                         :precision binary64
                                         (if (<= (/ angle 180.0) 0.0001)
                                           (* (* (* angle PI) a_m) (* -0.011111111111111112 a_m))
                                           (* (* (* a_m a_m) -0.011111111111111112) (* angle PI))))
                                        a_m = fabs(a);
                                        double code(double a_m, double b, double angle) {
                                        	double tmp;
                                        	if ((angle / 180.0) <= 0.0001) {
                                        		tmp = ((angle * ((double) M_PI)) * a_m) * (-0.011111111111111112 * a_m);
                                        	} else {
                                        		tmp = ((a_m * a_m) * -0.011111111111111112) * (angle * ((double) M_PI));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        a_m = Math.abs(a);
                                        public static double code(double a_m, double b, double angle) {
                                        	double tmp;
                                        	if ((angle / 180.0) <= 0.0001) {
                                        		tmp = ((angle * Math.PI) * a_m) * (-0.011111111111111112 * a_m);
                                        	} else {
                                        		tmp = ((a_m * a_m) * -0.011111111111111112) * (angle * Math.PI);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        a_m = math.fabs(a)
                                        def code(a_m, b, angle):
                                        	tmp = 0
                                        	if (angle / 180.0) <= 0.0001:
                                        		tmp = ((angle * math.pi) * a_m) * (-0.011111111111111112 * a_m)
                                        	else:
                                        		tmp = ((a_m * a_m) * -0.011111111111111112) * (angle * math.pi)
                                        	return tmp
                                        
                                        a_m = abs(a)
                                        function code(a_m, b, angle)
                                        	tmp = 0.0
                                        	if (Float64(angle / 180.0) <= 0.0001)
                                        		tmp = Float64(Float64(Float64(angle * pi) * a_m) * Float64(-0.011111111111111112 * a_m));
                                        	else
                                        		tmp = Float64(Float64(Float64(a_m * a_m) * -0.011111111111111112) * Float64(angle * pi));
                                        	end
                                        	return tmp
                                        end
                                        
                                        a_m = abs(a);
                                        function tmp_2 = code(a_m, b, angle)
                                        	tmp = 0.0;
                                        	if ((angle / 180.0) <= 0.0001)
                                        		tmp = ((angle * pi) * a_m) * (-0.011111111111111112 * a_m);
                                        	else
                                        		tmp = ((a_m * a_m) * -0.011111111111111112) * (angle * pi);
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        a_m = N[Abs[a], $MachinePrecision]
                                        code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 0.0001], N[(N[(N[(angle * Pi), $MachinePrecision] * a$95$m), $MachinePrecision] * N[(-0.011111111111111112 * a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a$95$m * a$95$m), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]]
                                        
                                        \begin{array}{l}
                                        a_m = \left|a\right|
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;\frac{angle}{180} \leq 0.0001:\\
                                        \;\;\;\;\left(\left(angle \cdot \pi\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right) \cdot \left(angle \cdot \pi\right)\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000005e-4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                            15. lower--.f6462.7

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

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

                                            \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites37.1%

                                              \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites40.2%

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

                                              if 1.00000000000000005e-4 < (/.f64 angle #s(literal 180 binary64))

                                              1. Initial program 29.9%

                                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                15. lower--.f6427.4

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

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

                                                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites23.8%

                                                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
                                              8. Recombined 2 regimes into one program.
                                              9. Final simplification35.5%

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

                                              Alternative 18: 38.3% accurate, 21.6× speedup?

                                              \[\begin{array}{l} a_m = \left|a\right| \\ \left(\left(angle \cdot \pi\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right) \end{array} \]
                                              a_m = (fabs.f64 a)
                                              (FPCore (a_m b angle)
                                               :precision binary64
                                               (* (* (* angle PI) a_m) (* -0.011111111111111112 a_m)))
                                              a_m = fabs(a);
                                              double code(double a_m, double b, double angle) {
                                              	return ((angle * ((double) M_PI)) * a_m) * (-0.011111111111111112 * a_m);
                                              }
                                              
                                              a_m = Math.abs(a);
                                              public static double code(double a_m, double b, double angle) {
                                              	return ((angle * Math.PI) * a_m) * (-0.011111111111111112 * a_m);
                                              }
                                              
                                              a_m = math.fabs(a)
                                              def code(a_m, b, angle):
                                              	return ((angle * math.pi) * a_m) * (-0.011111111111111112 * a_m)
                                              
                                              a_m = abs(a)
                                              function code(a_m, b, angle)
                                              	return Float64(Float64(Float64(angle * pi) * a_m) * Float64(-0.011111111111111112 * a_m))
                                              end
                                              
                                              a_m = abs(a);
                                              function tmp = code(a_m, b, angle)
                                              	tmp = ((angle * pi) * a_m) * (-0.011111111111111112 * a_m);
                                              end
                                              
                                              a_m = N[Abs[a], $MachinePrecision]
                                              code[a$95$m_, b_, angle_] := N[(N[(N[(angle * Pi), $MachinePrecision] * a$95$m), $MachinePrecision] * N[(-0.011111111111111112 * a$95$m), $MachinePrecision]), $MachinePrecision]
                                              
                                              \begin{array}{l}
                                              a_m = \left|a\right|
                                              
                                              \\
                                              \left(\left(angle \cdot \pi\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 54.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                15. lower--.f6452.5

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

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

                                                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites33.3%

                                                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites35.4%

                                                    \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \pi\right)}\right) \]
                                                  2. Final simplification35.4%

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

                                                  Reproduce

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