ab-angle->ABCF B

Percentage Accurate: 54.4% → 66.0%
Time: 15.2s
Alternatives: 13
Speedup: N/A×

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

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

Initial Program: 54.4% 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.0% accurate, N/A× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\\ t_2 := \sin \left(\frac{t\_1 + t\_1}{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 4 \cdot 10^{+298}:\\ \;\;\;\;\left(2 \cdot \left(t\_2 \cdot \cos \left(\frac{t\_1 - 0.5 \cdot \pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(t\_2 \cdot \cos \left(\frac{0}{2}\right)\right)\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle\_m \cdot angle\_m\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1 (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0)))
        (t_2 (sin (/ (+ t_1 t_1) 2.0))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
         4e+298)
      (*
       (* 2.0 (* t_2 (cos (/ (- t_1 (* 0.5 PI)) 2.0))))
       (* (* (sin (* (* angle_m PI) 0.005555555555555556)) (+ a b)) (- b a)))
      (*
       (* 2.0 (* t_2 (cos (/ 0.0 2.0))))
       (*
        (*
         (fma
          (* 0.005555555555555556 PI)
          (+ a b)
          (*
           (fma
            (* 4.410179116778721e-14 (* angle_m angle_m))
            (* (pow PI 5.0) (+ a b))
            (* (* -2.8577960676726107e-8 (pow PI 3.0)) (+ a b)))
           (* angle_m angle_m)))
         angle_m)
        (- b a)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0));
	double t_2 = sin(((t_1 + t_1) / 2.0));
	double tmp;
	if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= 4e+298) {
		tmp = (2.0 * (t_2 * cos(((t_1 - (0.5 * ((double) M_PI))) / 2.0)))) * ((sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)) * (a + b)) * (b - a));
	} else {
		tmp = (2.0 * (t_2 * cos((0.0 / 2.0)))) * ((fma((0.005555555555555556 * ((double) M_PI)), (a + b), (fma((4.410179116778721e-14 * (angle_m * angle_m)), (pow(((double) M_PI), 5.0) * (a + b)), ((-2.8577960676726107e-8 * pow(((double) M_PI), 3.0)) * (a + b))) * (angle_m * angle_m))) * angle_m) * (b - a));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0))
	t_2 = sin(Float64(Float64(t_1 + t_1) / 2.0))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 4e+298)
		tmp = Float64(Float64(2.0 * Float64(t_2 * cos(Float64(Float64(t_1 - Float64(0.5 * pi)) / 2.0)))) * Float64(Float64(sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)) * Float64(a + b)) * Float64(b - a)));
	else
		tmp = Float64(Float64(2.0 * Float64(t_2 * cos(Float64(0.0 / 2.0)))) * Float64(Float64(fma(Float64(0.005555555555555556 * pi), Float64(a + b), Float64(fma(Float64(4.410179116778721e-14 * Float64(angle_m * angle_m)), Float64((pi ^ 5.0) * Float64(a + b)), Float64(Float64(-2.8577960676726107e-8 * (pi ^ 3.0)) * Float64(a + b))) * Float64(angle_m * angle_m))) * angle_m) * Float64(b - a)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[(t$95$1 + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 4e+298], N[(N[(2.0 * N[(t$95$2 * N[Cos[N[(N[(t$95$1 - N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(t$95$2 * N[Cos[N[(0.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision] + N[(N[(N[(4.410179116778721e-14 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[Pi, 5.0], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.8577960676726107e-8 * N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(t\_2 \cdot \cos \left(\frac{0}{2}\right)\right)\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle\_m \cdot angle\_m\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\


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

    1. Initial program 55.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. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6456.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
      10. sum-sinN/A

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

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

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

      \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \frac{1}{2} \cdot \mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \frac{1}{2} \cdot \mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      2. lift-PI.f6462.9

        \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) - 0.5 \cdot \pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
    13. Applied rewrites62.9%

      \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) - 0.5 \cdot \pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]

    if 3.9999999999999998e298 < (*.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 45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6452.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
      10. sum-sinN/A

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

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

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

      \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right)\right)\right) \cdot \left(\left(angle \cdot \left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) + {angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(a + b\right)\right) + \frac{1}{22674816000000} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left(a + b\right)\right)\right)\right)\right)\right) \cdot \left(\color{blue}{b} - a\right)\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right)\right)\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) + {angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(a + b\right)\right) + \frac{1}{22674816000000} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left(a + b\right)\right)\right)\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right)\right)\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) + {angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(a + b\right)\right) + \frac{1}{22674816000000} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left(a + b\right)\right)\right)\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \]
    13. Applied rewrites81.6%

      \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) - \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right)\right)\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle \cdot angle\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle\right) \cdot \left(\color{blue}{b} - a\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \leq 4 \cdot 10^{+298}:\\ \;\;\;\;\left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) - 0.5 \cdot \pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{0}{2}\right)\right)\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle \cdot angle\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 66.9% accurate, N/A× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\ t_2 := \left(\sin t\_1 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\ t_3 := \mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -2 \cdot 10^{+239}:\\ \;\;\;\;\left(2 \cdot \left(\sin \left(\frac{t\_3 + t\_3}{2}\right) \cdot \cos \left(\frac{t\_3 - 0.5 \cdot \pi}{2}\right)\right)\right) \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \cos t\_1\right) \cdot t\_2\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1 (* (* angle_m PI) 0.005555555555555556))
        (t_2 (* (* (sin t_1) (+ a b)) (- b a)))
        (t_3 (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
         -2e+239)
      (*
       (* 2.0 (* (sin (/ (+ t_3 t_3) 2.0)) (cos (/ (- t_3 (* 0.5 PI)) 2.0))))
       t_2)
      (* (* 2.0 (cos t_1)) t_2)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
	double t_2 = (sin(t_1) * (a + b)) * (b - a);
	double t_3 = fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0));
	double tmp;
	if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -2e+239) {
		tmp = (2.0 * (sin(((t_3 + t_3) / 2.0)) * cos(((t_3 - (0.5 * ((double) M_PI))) / 2.0)))) * t_2;
	} else {
		tmp = (2.0 * cos(t_1)) * t_2;
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = Float64(Float64(angle_m * pi) * 0.005555555555555556)
	t_2 = Float64(Float64(sin(t_1) * Float64(a + b)) * Float64(b - a))
	t_3 = fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -2e+239)
		tmp = Float64(Float64(2.0 * Float64(sin(Float64(Float64(t_3 + t_3) / 2.0)) * cos(Float64(Float64(t_3 - Float64(0.5 * pi)) / 2.0)))) * t_2);
	else
		tmp = Float64(Float64(2.0 * cos(t_1)) * t_2);
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sin[t$95$1], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], -2e+239], N[(N[(2.0 * N[(N[Sin[N[(N[(t$95$3 + t$95$3), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$3 - N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(2.0 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]), $MachinePrecision]]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\
t_2 := \left(\sin t\_1 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\
t_3 := \mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -2 \cdot 10^{+239}:\\
\;\;\;\;\left(2 \cdot \left(\sin \left(\frac{t\_3 + t\_3}{2}\right) \cdot \cos \left(\frac{t\_3 - 0.5 \cdot \pi}{2}\right)\right)\right) \cdot t\_2\\

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \cos t\_1\right) \cdot t\_2\\


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

    1. Initial program 48.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6450.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
      10. sum-sinN/A

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

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

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

      \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \frac{1}{2} \cdot \mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \frac{1}{2} \cdot \mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      2. lift-PI.f6478.7

        \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) - 0.5 \cdot \pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
    13. Applied rewrites78.7%

      \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) - 0.5 \cdot \pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]

    if -1.99999999999999998e239 < (*.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 54.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6456.9

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

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

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

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

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

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

Alternative 3: 66.8% accurate, N/A× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\ t_2 := \left(\sin t\_1 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -2 \cdot 10^{+239}:\\ \;\;\;\;\left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right) + 0.5 \cdot \pi}{2}\right) \cdot \cos \left(\frac{0}{2}\right)\right)\right) \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \cos t\_1\right) \cdot t\_2\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1 (* (* angle_m PI) 0.005555555555555556))
        (t_2 (* (* (sin t_1) (+ a b)) (- b a))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
         -2e+239)
      (*
       (*
        2.0
        (*
         (sin
          (/
           (+ (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0)) (* 0.5 PI))
           2.0))
         (cos (/ 0.0 2.0))))
       t_2)
      (* (* 2.0 (cos t_1)) t_2)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
	double t_2 = (sin(t_1) * (a + b)) * (b - a);
	double tmp;
	if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -2e+239) {
		tmp = (2.0 * (sin(((fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0)) + (0.5 * ((double) M_PI))) / 2.0)) * cos((0.0 / 2.0)))) * t_2;
	} else {
		tmp = (2.0 * cos(t_1)) * t_2;
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = Float64(Float64(angle_m * pi) * 0.005555555555555556)
	t_2 = Float64(Float64(sin(t_1) * Float64(a + b)) * Float64(b - a))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -2e+239)
		tmp = Float64(Float64(2.0 * Float64(sin(Float64(Float64(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0)) + Float64(0.5 * pi)) / 2.0)) * cos(Float64(0.0 / 2.0)))) * t_2);
	else
		tmp = Float64(Float64(2.0 * cos(t_1)) * t_2);
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sin[t$95$1], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], -2e+239], N[(N[(2.0 * N[(N[Sin[N[(N[(N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(0.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(2.0 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \cos t\_1\right) \cdot t\_2\\


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

    1. Initial program 48.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6450.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
      10. sum-sinN/A

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

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

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

      \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right) - \mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      2. lift-PI.f6475.5

        \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + 0.5 \cdot \pi}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) - \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
    13. Applied rewrites75.5%

      \[\leadsto \left(2 \cdot \left(\sin \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) + 0.5 \cdot \pi}{2}\right) \cdot \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right) - \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]

    if -1.99999999999999998e239 < (*.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 54.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6456.9

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

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

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

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

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

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

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

Alternative 4: 67.4% accurate, N/A× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\ t_2 := \left(\sin t\_1 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -2 \cdot 10^{+291}:\\ \;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \left(angle\_m \cdot \pi\right) \cdot \left(-0.005555555555555556\right)\right)}{2}\right) \cdot \cos \left(\frac{t\_1 + t\_1}{2}\right)\right)\right) \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \cos t\_1\right) \cdot t\_2\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1 (* (* angle_m PI) 0.005555555555555556))
        (t_2 (* (* (sin t_1) (+ a b)) (- b a))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
         -2e+291)
      (*
       (*
        2.0
        (*
         (cos
          (/
           (fma
            (* 0.005555555555555556 angle_m)
            PI
            (* (* angle_m PI) (- 0.005555555555555556)))
           2.0))
         (cos (/ (+ t_1 t_1) 2.0))))
       t_2)
      (* (* 2.0 (cos t_1)) t_2)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
	double t_2 = (sin(t_1) * (a + b)) * (b - a);
	double tmp;
	if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -2e+291) {
		tmp = (2.0 * (cos((fma((0.005555555555555556 * angle_m), ((double) M_PI), ((angle_m * ((double) M_PI)) * -0.005555555555555556)) / 2.0)) * cos(((t_1 + t_1) / 2.0)))) * t_2;
	} else {
		tmp = (2.0 * cos(t_1)) * t_2;
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = Float64(Float64(angle_m * pi) * 0.005555555555555556)
	t_2 = Float64(Float64(sin(t_1) * Float64(a + b)) * Float64(b - a))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -2e+291)
		tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(Float64(angle_m * pi) * Float64(-0.005555555555555556))) / 2.0)) * cos(Float64(Float64(t_1 + t_1) / 2.0)))) * t_2);
	else
		tmp = Float64(Float64(2.0 * cos(t_1)) * t_2);
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sin[t$95$1], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], -2e+291], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(N[(angle$95$m * Pi), $MachinePrecision] * (-0.005555555555555556)), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$1 + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(2.0 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \cos t\_1\right) \cdot t\_2\\


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

    1. Initial program 52.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]
      8. cos-neg-revN/A

        \[\leadsto \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + \cos \left(\mathsf{neg}\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
      9. sum-cosN/A

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

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

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

      \[\leadsto \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, -\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}{2}\right) \cdot \cos \left(\frac{\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}{2}\right)\right)\right) \cdot \left(\color{blue}{\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]

    if -1.9999999999999999e291 < (*.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 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6455.5

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

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

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

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

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

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

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

Alternative 5: 67.2% accurate, N/A× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\ t_2 := 2 \cdot \cos t\_1\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -5 \cdot 10^{+294}:\\ \;\;\;\;t\_2 \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle\_m \cdot angle\_m\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \left(\left(\sin t\_1 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1 (* (* angle_m PI) 0.005555555555555556))
        (t_2 (* 2.0 (cos t_1))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
         -5e+294)
      (*
       t_2
       (*
        (*
         (fma
          (* 0.005555555555555556 PI)
          (+ a b)
          (*
           (fma
            (* 4.410179116778721e-14 (* angle_m angle_m))
            (* (pow PI 5.0) (+ a b))
            (* (* -2.8577960676726107e-8 (pow PI 3.0)) (+ a b)))
           (* angle_m angle_m)))
         angle_m)
        (- b a)))
      (* t_2 (* (* (sin t_1) (+ a b)) (- b a)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
	double t_2 = 2.0 * cos(t_1);
	double tmp;
	if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -5e+294) {
		tmp = t_2 * ((fma((0.005555555555555556 * ((double) M_PI)), (a + b), (fma((4.410179116778721e-14 * (angle_m * angle_m)), (pow(((double) M_PI), 5.0) * (a + b)), ((-2.8577960676726107e-8 * pow(((double) M_PI), 3.0)) * (a + b))) * (angle_m * angle_m))) * angle_m) * (b - a));
	} else {
		tmp = t_2 * ((sin(t_1) * (a + b)) * (b - a));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = Float64(Float64(angle_m * pi) * 0.005555555555555556)
	t_2 = Float64(2.0 * cos(t_1))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -5e+294)
		tmp = Float64(t_2 * Float64(Float64(fma(Float64(0.005555555555555556 * pi), Float64(a + b), Float64(fma(Float64(4.410179116778721e-14 * Float64(angle_m * angle_m)), Float64((pi ^ 5.0) * Float64(a + b)), Float64(Float64(-2.8577960676726107e-8 * (pi ^ 3.0)) * Float64(a + b))) * Float64(angle_m * angle_m))) * angle_m) * Float64(b - a)));
	else
		tmp = Float64(t_2 * Float64(Float64(sin(t_1) * Float64(a + b)) * Float64(b - a)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], -5e+294], N[(t$95$2 * N[(N[(N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision] + N[(N[(N[(4.410179116778721e-14 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[Pi, 5.0], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.8577960676726107e-8 * N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(N[(N[Sin[t$95$1], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\
t_2 := 2 \cdot \cos t\_1\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -5 \cdot 10^{+294}:\\
\;\;\;\;t\_2 \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle\_m \cdot angle\_m\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\

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


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

    1. Initial program 53.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) + {angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(a + b\right)\right) + \frac{1}{22674816000000} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left(a + b\right)\right)\right)\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) + {angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(a + b\right)\right) + \frac{1}{22674816000000} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left(a + b\right)\right)\right)\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \]
    11. Applied rewrites81.8%

      \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle \cdot angle\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle\right) \cdot \left(\color{blue}{b} - a\right)\right) \]

    if -4.9999999999999999e294 < (*.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 53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6455.3

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

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

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

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

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

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

Alternative 6: 67.0% accurate, N/A× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\ t_1 := 2 \cdot \cos t\_0\\ t_2 := \sin t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{+236}:\\ \;\;\;\;t\_1 \cdot \left(\left(\mathsf{fma}\left(b, \frac{t\_2}{a}, t\_2\right) \cdot a\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle\_m \cdot angle\_m\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* (* angle_m PI) 0.005555555555555556))
        (t_1 (* 2.0 (cos t_0)))
        (t_2 (sin t_0)))
   (*
    angle_s
    (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e+236)
      (* t_1 (* (* (fma b (/ t_2 a) t_2) a) (- b a)))
      (*
       t_1
       (*
        (*
         (fma
          (* 0.005555555555555556 PI)
          (+ a b)
          (*
           (fma
            (* 4.410179116778721e-14 (* angle_m angle_m))
            (* (pow PI 5.0) (+ a b))
            (* (* -2.8577960676726107e-8 (pow PI 3.0)) (+ a b)))
           (* angle_m angle_m)))
         angle_m)
        (- b a)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
	double t_1 = 2.0 * cos(t_0);
	double t_2 = sin(t_0);
	double tmp;
	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 1e+236) {
		tmp = t_1 * ((fma(b, (t_2 / a), t_2) * a) * (b - a));
	} else {
		tmp = t_1 * ((fma((0.005555555555555556 * ((double) M_PI)), (a + b), (fma((4.410179116778721e-14 * (angle_m * angle_m)), (pow(((double) M_PI), 5.0) * (a + b)), ((-2.8577960676726107e-8 * pow(((double) M_PI), 3.0)) * (a + b))) * (angle_m * angle_m))) * angle_m) * (b - a));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(Float64(angle_m * pi) * 0.005555555555555556)
	t_1 = Float64(2.0 * cos(t_0))
	t_2 = sin(t_0)
	tmp = 0.0
	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 1e+236)
		tmp = Float64(t_1 * Float64(Float64(fma(b, Float64(t_2 / a), t_2) * a) * Float64(b - a)));
	else
		tmp = Float64(t_1 * Float64(Float64(fma(Float64(0.005555555555555556 * pi), Float64(a + b), Float64(fma(Float64(4.410179116778721e-14 * Float64(angle_m * angle_m)), Float64((pi ^ 5.0) * Float64(a + b)), Float64(Float64(-2.8577960676726107e-8 * (pi ^ 3.0)) * Float64(a + b))) * Float64(angle_m * angle_m))) * angle_m) * Float64(b - a)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+236], N[(t$95$1 * N[(N[(N[(b * N[(t$95$2 / a), $MachinePrecision] + t$95$2), $MachinePrecision] * a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision] + N[(N[(N[(4.410179116778721e-14 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[Pi, 5.0], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.8577960676726107e-8 * N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle\_m \cdot angle\_m\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\


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

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6454.4

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\mathsf{fma}\left(b, \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}{a}, \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot a\right) \cdot \left(\color{blue}{b} - a\right)\right) \]

    if 1.00000000000000005e236 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

    1. Initial program 52.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6457.8

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) + {angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(a + b\right)\right) + \frac{1}{22674816000000} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left(a + b\right)\right)\right)\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) + {angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(a + b\right)\right) + \frac{1}{22674816000000} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left(a + b\right)\right)\right)\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \]
    11. Applied rewrites79.8%

      \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, a + b, \mathsf{fma}\left(4.410179116778721 \cdot 10^{-14} \cdot \left(angle \cdot angle\right), {\pi}^{5} \cdot \left(a + b\right), \left(-2.8577960676726107 \cdot 10^{-8} \cdot {\pi}^{3}\right) \cdot \left(a + b\right)\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle\right) \cdot \left(\color{blue}{b} - a\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 67.1% accurate, N/A× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\ t_1 := \sin t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{+153}:\\ \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\mathsf{fma}\left(b, \frac{t\_1}{a}, t\_1\right) \cdot a\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot 1\right) \cdot \left(\left(t\_1 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* (* angle_m PI) 0.005555555555555556)) (t_1 (sin t_0)))
   (*
    angle_s
    (if (<= (pow b 2.0) 5e+153)
      (* (* 2.0 (cos t_0)) (* (* (fma b (/ t_1 a) t_1) a) (- b a)))
      (* (* 2.0 1.0) (* (* t_1 (+ a b)) (- b a)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
	double t_1 = sin(t_0);
	double tmp;
	if (pow(b, 2.0) <= 5e+153) {
		tmp = (2.0 * cos(t_0)) * ((fma(b, (t_1 / a), t_1) * a) * (b - a));
	} else {
		tmp = (2.0 * 1.0) * ((t_1 * (a + b)) * (b - a));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(Float64(angle_m * pi) * 0.005555555555555556)
	t_1 = sin(t_0)
	tmp = 0.0
	if ((b ^ 2.0) <= 5e+153)
		tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(fma(b, Float64(t_1 / a), t_1) * a) * Float64(b - a)));
	else
		tmp = Float64(Float64(2.0 * 1.0) * Float64(Float64(t_1 * Float64(a + b)) * Float64(b - a)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e+153], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b * N[(t$95$1 / a), $MachinePrecision] + t$95$1), $MachinePrecision] * a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * 1.0), $MachinePrecision] * N[(N[(t$95$1 * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\
t_1 := \sin t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\mathsf{fma}\left(b, \frac{t\_1}{a}, t\_1\right) \cdot a\right) \cdot \left(b - a\right)\right)\\

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


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

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6457.8

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

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + \frac{b \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{a}\right) \cdot a\right) \cdot \left(b - a\right)\right) \]
    11. Applied rewrites65.7%

      \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\mathsf{fma}\left(b, \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}{a}, \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot a\right) \cdot \left(\color{blue}{b} - a\right)\right) \]

    if 5.00000000000000018e153 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 47.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      16. lower--.f6451.0

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot 1\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
    11. Recombined 2 regimes into one program.
    12. Add Preprocessing

    Alternative 8: 66.3% accurate, N/A× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(2 \cdot 1\right) \cdot \left(\left(\sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\right) \end{array} \]
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b angle_m)
     :precision binary64
     (*
      angle_s
      (*
       (* 2.0 1.0)
       (* (* (sin (* (* angle_m PI) 0.005555555555555556)) (+ a b)) (- b a)))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	return angle_s * ((2.0 * 1.0) * ((sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)) * (a + b)) * (b - a)));
    }
    
    angle\_m = Math.abs(angle);
    angle\_s = Math.copySign(1.0, angle);
    public static double code(double angle_s, double a, double b, double angle_m) {
    	return angle_s * ((2.0 * 1.0) * ((Math.sin(((angle_m * Math.PI) * 0.005555555555555556)) * (a + b)) * (b - a)));
    }
    
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b, angle_m):
    	return angle_s * ((2.0 * 1.0) * ((math.sin(((angle_m * math.pi) * 0.005555555555555556)) * (a + b)) * (b - a)))
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	return Float64(angle_s * Float64(Float64(2.0 * 1.0) * Float64(Float64(sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)) * Float64(a + b)) * Float64(b - a))))
    end
    
    angle\_m = abs(angle);
    angle\_s = sign(angle) * abs(1.0);
    function tmp = code(angle_s, a, b, angle_m)
    	tmp = angle_s * ((2.0 * 1.0) * ((sin(((angle_m * pi) * 0.005555555555555556)) * (a + b)) * (b - a)));
    end
    
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(2.0 * 1.0), $MachinePrecision] * N[(N[(N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \left(\left(2 \cdot 1\right) \cdot \left(\left(\sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 53.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(2 \cdot 1\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
    10. Step-by-step derivation
      1. Applied rewrites63.7%

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

      Alternative 9: 56.3% accurate, N/A× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\ \;\;\;\;\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\\ \end{array} \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (let* ((t_0 (* (* PI angle_m) 0.005555555555555556)))
         (*
          angle_s
          (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e-313)
            (* (* -2.0 (* a a)) (* (sin t_0) (cos t_0)))
            (*
             (* (* b b) 2.0)
             (*
              (sin (* (fma 0.011111111111111112 (* angle_m PI) PI) 0.5))
              (sin (* (* angle_m PI) 0.005555555555555556))))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
      	double tmp;
      	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 1e-313) {
      		tmp = (-2.0 * (a * a)) * (sin(t_0) * cos(t_0));
      	} else {
      		tmp = ((b * b) * 2.0) * (sin((fma(0.011111111111111112, (angle_m * ((double) M_PI)), ((double) M_PI)) * 0.5)) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
      	tmp = 0.0
      	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 1e-313)
      		tmp = Float64(Float64(-2.0 * Float64(a * a)) * Float64(sin(t_0) * cos(t_0)));
      	else
      		tmp = Float64(Float64(Float64(b * b) * 2.0) * Float64(sin(Float64(fma(0.011111111111111112, Float64(angle_m * pi), pi) * 0.5)) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556))));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e-313], N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * b), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision] + Pi), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\
      \;\;\;\;\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.00000000001e-313

        1. Initial program 55.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 a around inf

          \[\leadsto \color{blue}{-2 \cdot \left({a}^{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 \left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\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. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\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)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \left(\color{blue}{\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) \]
          4. unpow2N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\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) \]
          5. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\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) \]
          6. *-commutativeN/A

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

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

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

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

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

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
          13. lift-PI.f64N/A

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

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \]
        5. Applied rewrites57.0%

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

        if 1.00000000001e-313 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 51.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          16. lower--.f6454.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
          10. sum-sinN/A

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

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

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

          \[\leadsto 2 \cdot \color{blue}{\left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\mathsf{PI}\left(\right) + \frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)} \]
        12. Applied rewrites50.0%

          \[\leadsto \left(\left(b \cdot b\right) \cdot 2\right) \cdot \color{blue}{\left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 10: 41.4% accurate, N/A× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\ \;\;\;\;\left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(t\_0 + t\_0\right) + \sin \left(\mathsf{fma}\left(angle\_m \cdot \pi, 0.005555555555555556, \left(-0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin t\_0\right)\\ \end{array} \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (let* ((t_0 (* (* angle_m PI) 0.005555555555555556)))
         (*
          angle_s
          (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e-313)
            (*
             (* -2.0 (exp (* (log a) 2.0)))
             (/
              (+
               (sin (+ t_0 t_0))
               (sin
                (fma
                 (* angle_m PI)
                 0.005555555555555556
                 (* (* -0.005555555555555556 angle_m) PI))))
              2.0))
            (*
             (* (* b b) 2.0)
             (*
              (sin (* (fma 0.011111111111111112 (* angle_m PI) PI) 0.5))
              (sin t_0)))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double t_0 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
      	double tmp;
      	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 1e-313) {
      		tmp = (-2.0 * exp((log(a) * 2.0))) * ((sin((t_0 + t_0)) + sin(fma((angle_m * ((double) M_PI)), 0.005555555555555556, ((-0.005555555555555556 * angle_m) * ((double) M_PI))))) / 2.0);
      	} else {
      		tmp = ((b * b) * 2.0) * (sin((fma(0.011111111111111112, (angle_m * ((double) M_PI)), ((double) M_PI)) * 0.5)) * sin(t_0));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	t_0 = Float64(Float64(angle_m * pi) * 0.005555555555555556)
      	tmp = 0.0
      	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 1e-313)
      		tmp = Float64(Float64(-2.0 * exp(Float64(log(a) * 2.0))) * Float64(Float64(sin(Float64(t_0 + t_0)) + sin(fma(Float64(angle_m * pi), 0.005555555555555556, Float64(Float64(-0.005555555555555556 * angle_m) * pi)))) / 2.0));
      	else
      		tmp = Float64(Float64(Float64(b * b) * 2.0) * Float64(sin(Float64(fma(0.011111111111111112, Float64(angle_m * pi), pi) * 0.5)) * sin(t_0)));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e-313], N[(N[(-2.0 * N[Exp[N[(N[Log[a], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(t$95$0 + t$95$0), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556 + N[(N[(-0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * b), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision] + Pi), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\
      \;\;\;\;\left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(t\_0 + t\_0\right) + \sin \left(\mathsf{fma}\left(angle\_m \cdot \pi, 0.005555555555555556, \left(-0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)}{2}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin t\_0\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.00000000001e-313

        1. Initial program 55.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 a around inf

          \[\leadsto \color{blue}{-2 \cdot \left({a}^{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 \left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\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. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\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)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \left(\color{blue}{\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) \]
          4. unpow2N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\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) \]
          5. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\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) \]
          6. *-commutativeN/A

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

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

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

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

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

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
          13. lift-PI.f64N/A

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

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \]
        5. Applied rewrites57.0%

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          2. pow2N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          3. pow-to-expN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          4. lift-log.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          6. lift-exp.f6426.6

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \]
        7. Applied rewrites26.6%

          \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)}\right) \]
          2. lift-sin.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)}\right) \]
          3. lift-*.f64N/A

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

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          5. lift-*.f64N/A

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

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

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

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          9. cos-neg-revN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
          10. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
          11. lift-PI.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
          12. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
          15. sin-cos-multN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) - \left(\mathsf{neg}\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(\mathsf{neg}\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)}{\color{blue}{2}} \]
        9. Applied rewrites25.5%

          \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, -\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}{\color{blue}{2}} \]
        10. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, -\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          2. lift-PI.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \mathsf{PI}\left(\right), -\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          3. lift-fma.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          4. associate-*r*N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          5. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180} + \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          6. lower-fma.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \mathsf{PI}\left(\right), \frac{1}{180}, -\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          7. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \mathsf{PI}\left(\right), \frac{1}{180}, -\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          8. lift-PI.f6427.2

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, -\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}{2} \]
          9. lift-neg.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \mathsf{neg}\left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)\right)}{2} \]
          10. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \mathsf{neg}\left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)\right)}{2} \]
          11. lift-PI.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \mathsf{neg}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right)\right)}{2} \]
          12. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \mathsf{neg}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right)\right)}{2} \]
          13. distribute-rgt-neg-inN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(\frac{1}{180}\right)\right)\right)\right)}{2} \]
          14. metadata-evalN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{180}\right)\right)}{2} \]
          15. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{2} \]
          16. associate-*r*N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \left(\frac{-1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)}{2} \]
          17. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \left(\frac{-1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)}{2} \]
          18. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, \frac{1}{180}, \left(\frac{-1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)}{2} \]
          19. lift-PI.f6427.2

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}{2} \]
        11. Applied rewrites27.2%

          \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}{2} \]

        if 1.00000000001e-313 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 51.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          16. lower--.f6454.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
          10. sum-sinN/A

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

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

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

          \[\leadsto 2 \cdot \color{blue}{\left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\mathsf{PI}\left(\right) + \frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)} \]
        12. Applied rewrites50.0%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\ \;\;\;\;\left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 + \left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) + \sin \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 11: 41.1% accurate, N/A× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\ \;\;\;\;\left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(t\_0 + t\_0\right) + \sin \left(\mathsf{fma}\left(angle\_m, 0.005555555555555556 \cdot \pi, \left(-0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin t\_0\right)\\ \end{array} \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (let* ((t_0 (* (* angle_m PI) 0.005555555555555556)))
         (*
          angle_s
          (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e-313)
            (*
             (* -2.0 (exp (* (log a) 2.0)))
             (/
              (+
               (sin (+ t_0 t_0))
               (sin
                (fma
                 angle_m
                 (* 0.005555555555555556 PI)
                 (* (* -0.005555555555555556 angle_m) PI))))
              2.0))
            (*
             (* (* b b) 2.0)
             (*
              (sin (* (fma 0.011111111111111112 (* angle_m PI) PI) 0.5))
              (sin t_0)))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double t_0 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
      	double tmp;
      	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 1e-313) {
      		tmp = (-2.0 * exp((log(a) * 2.0))) * ((sin((t_0 + t_0)) + sin(fma(angle_m, (0.005555555555555556 * ((double) M_PI)), ((-0.005555555555555556 * angle_m) * ((double) M_PI))))) / 2.0);
      	} else {
      		tmp = ((b * b) * 2.0) * (sin((fma(0.011111111111111112, (angle_m * ((double) M_PI)), ((double) M_PI)) * 0.5)) * sin(t_0));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	t_0 = Float64(Float64(angle_m * pi) * 0.005555555555555556)
      	tmp = 0.0
      	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 1e-313)
      		tmp = Float64(Float64(-2.0 * exp(Float64(log(a) * 2.0))) * Float64(Float64(sin(Float64(t_0 + t_0)) + sin(fma(angle_m, Float64(0.005555555555555556 * pi), Float64(Float64(-0.005555555555555556 * angle_m) * pi)))) / 2.0));
      	else
      		tmp = Float64(Float64(Float64(b * b) * 2.0) * Float64(sin(Float64(fma(0.011111111111111112, Float64(angle_m * pi), pi) * 0.5)) * sin(t_0)));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e-313], N[(N[(-2.0 * N[Exp[N[(N[Log[a], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(t$95$0 + t$95$0), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision] + N[(N[(-0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * b), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision] + Pi), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\
      \;\;\;\;\left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(t\_0 + t\_0\right) + \sin \left(\mathsf{fma}\left(angle\_m, 0.005555555555555556 \cdot \pi, \left(-0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)}{2}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin t\_0\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.00000000001e-313

        1. Initial program 55.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 a around inf

          \[\leadsto \color{blue}{-2 \cdot \left({a}^{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 \left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\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. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\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)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \left(\color{blue}{\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) \]
          4. unpow2N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\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) \]
          5. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\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) \]
          6. *-commutativeN/A

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

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

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

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

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

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
          13. lift-PI.f64N/A

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

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \]
        5. Applied rewrites57.0%

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          2. pow2N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          3. pow-to-expN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          4. lift-log.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          6. lift-exp.f6426.6

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \]
        7. Applied rewrites26.6%

          \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)}\right) \]
          2. lift-sin.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)}\right) \]
          3. lift-*.f64N/A

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

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          5. lift-*.f64N/A

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

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

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

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          9. cos-neg-revN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
          10. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
          11. lift-PI.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
          12. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\mathsf{neg}\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
          15. sin-cos-multN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) - \left(\mathsf{neg}\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(\mathsf{neg}\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)}{\color{blue}{2}} \]
        9. Applied rewrites25.5%

          \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, -\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}{\color{blue}{2}} \]
        10. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, -\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          2. lift-PI.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \mathsf{PI}\left(\right), -\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          3. lift-fma.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          4. associate-*r*N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          5. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180} + \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          6. associate-*l*N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) + \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          7. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(angle \cdot \left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) + \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          8. lower-fma.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \mathsf{PI}\left(\right), -\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          9. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \mathsf{PI}\left(\right), -\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)}{2} \]
          10. lift-PI.f6426.9

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) + \sin \left(\mathsf{fma}\left(angle, 0.005555555555555556 \cdot \pi, -\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}{2} \]
          11. lift-neg.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \mathsf{neg}\left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)\right)}{2} \]
          12. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \mathsf{neg}\left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)\right)}{2} \]
          13. lift-PI.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \mathsf{neg}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right)\right)}{2} \]
          14. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \mathsf{neg}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right)\right)}{2} \]
          15. distribute-rgt-neg-inN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{neg}\left(\frac{1}{180}\right)\right)\right)\right)}{2} \]
          16. metadata-evalN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{180}\right)\right)}{2} \]
          17. *-commutativeN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{2} \]
          18. associate-*r*N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \left(\frac{-1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)}{2} \]
          19. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \left(\frac{-1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)}{2} \]
          20. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180} - \left(-\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right) + \sin \left(\mathsf{fma}\left(angle, \frac{1}{180} \cdot \pi, \left(\frac{-1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)}{2} \]
          21. lift-PI.f6426.5

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) + \sin \left(\mathsf{fma}\left(angle, 0.005555555555555556 \cdot \pi, \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}{2} \]
        11. Applied rewrites26.5%

          \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 - \left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) + \sin \left(\mathsf{fma}\left(angle, 0.005555555555555556 \cdot \pi, \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}{2} \]

        if 1.00000000001e-313 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 51.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          16. lower--.f6454.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
          10. sum-sinN/A

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

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

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

          \[\leadsto 2 \cdot \color{blue}{\left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\mathsf{PI}\left(\right) + \frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)} \]
        12. Applied rewrites50.0%

          \[\leadsto \left(\left(b \cdot b\right) \cdot 2\right) \cdot \color{blue}{\left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification36.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\ \;\;\;\;\left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \frac{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556 + \left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) + \sin \left(\mathsf{fma}\left(angle, 0.005555555555555556 \cdot \pi, \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 12: 41.2% accurate, N/A× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\ \;\;\;\;\left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\\ \end{array} \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (let* ((t_0 (* (* PI angle_m) 0.005555555555555556)))
         (*
          angle_s
          (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e-313)
            (* (* -2.0 (exp (* (log a) 2.0))) (* (sin t_0) (cos t_0)))
            (*
             (* (* b b) 2.0)
             (*
              (sin (* (fma 0.011111111111111112 (* angle_m PI) PI) 0.5))
              (sin (* (* angle_m PI) 0.005555555555555556))))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
      	double tmp;
      	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 1e-313) {
      		tmp = (-2.0 * exp((log(a) * 2.0))) * (sin(t_0) * cos(t_0));
      	} else {
      		tmp = ((b * b) * 2.0) * (sin((fma(0.011111111111111112, (angle_m * ((double) M_PI)), ((double) M_PI)) * 0.5)) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
      	tmp = 0.0
      	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 1e-313)
      		tmp = Float64(Float64(-2.0 * exp(Float64(log(a) * 2.0))) * Float64(sin(t_0) * cos(t_0)));
      	else
      		tmp = Float64(Float64(Float64(b * b) * 2.0) * Float64(sin(Float64(fma(0.011111111111111112, Float64(angle_m * pi), pi) * 0.5)) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556))));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e-313], N[(N[(-2.0 * N[Exp[N[(N[Log[a], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * b), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision] + Pi), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-313}:\\
      \;\;\;\;\left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.00000000001e-313

        1. Initial program 55.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 a around inf

          \[\leadsto \color{blue}{-2 \cdot \left({a}^{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 \left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\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. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\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)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \left(\color{blue}{\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) \]
          4. unpow2N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\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) \]
          5. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\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) \]
          6. *-commutativeN/A

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

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

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

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

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

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
          13. lift-PI.f64N/A

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

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \]
        5. Applied rewrites57.0%

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

            \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          2. pow2N/A

            \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          3. pow-to-expN/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          4. lift-log.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \]
          6. lift-exp.f6426.6

            \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \]
        7. Applied rewrites26.6%

          \[\leadsto \left(-2 \cdot e^{\log a \cdot 2}\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \]

        if 1.00000000001e-313 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 51.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot 2\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          16. lower--.f6454.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
          10. sum-sinN/A

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

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

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

          \[\leadsto 2 \cdot \color{blue}{\left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\mathsf{PI}\left(\right) + \frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)} \]
        12. Applied rewrites50.0%

          \[\leadsto \left(\left(b \cdot b\right) \cdot 2\right) \cdot \color{blue}{\left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 13: 35.8% accurate, N/A× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (*
        angle_s
        (*
         (* (* b b) 2.0)
         (*
          (sin (* (fma 0.011111111111111112 (* angle_m PI) PI) 0.5))
          (sin (* (* angle_m PI) 0.005555555555555556))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * (((b * b) * 2.0) * (sin((fma(0.011111111111111112, (angle_m * ((double) M_PI)), ((double) M_PI)) * 0.5)) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556))));
      }
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(Float64(Float64(b * b) * 2.0) * Float64(sin(Float64(fma(0.011111111111111112, Float64(angle_m * pi), pi) * 0.5)) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))))
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(N[(b * b), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision] + Pi), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle\_m \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 53.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) + \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
        10. sum-sinN/A

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\mathsf{PI}\left(\right) + \frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)} \]
      12. Applied rewrites30.2%

        \[\leadsto \left(\left(b \cdot b\right) \cdot 2\right) \cdot \color{blue}{\left(\sin \left(\mathsf{fma}\left(0.011111111111111112, angle \cdot \pi, \pi\right) \cdot 0.5\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)} \]
      13. Add Preprocessing

      Reproduce

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