ab-angle->ABCF B

Percentage Accurate: 54.4% → 67.1%
Time: 18.4s
Alternatives: 24
Speedup: 23.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 24 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: 67.1% accurate, 1.0× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+95}:\\ \;\;\;\;\left(\sin \left(\sqrt[3]{{\pi}^{3}} \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+185}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left({\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)}^{0.3333333333333333}\right)}^{3}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt{\pi}\right)\right)\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \pi\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (/ angle_m 180.0) 2e+95)
    (*
     (* (sin (* (cbrt (pow PI 3.0)) (* angle_m 0.011111111111111112))) (+ b a))
     (- b a))
    (if (<= (/ angle_m 180.0) 2e+185)
      (*
       (- b a)
       (*
        (+ b a)
        (sin
         (pow
          (pow (* PI (* angle_m 0.011111111111111112)) 0.3333333333333333)
          3.0))))
      (*
       (*
        (* 2.0 (* (+ b a) (- b a)))
        (sin (* (sqrt PI) (* (* angle_m 0.005555555555555556) (sqrt PI)))))
       (cos (* (/ angle_m 180.0) PI)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if ((angle_m / 180.0) <= 2e+95) {
		tmp = (sin((cbrt(pow(((double) M_PI), 3.0)) * (angle_m * 0.011111111111111112))) * (b + a)) * (b - a);
	} else if ((angle_m / 180.0) <= 2e+185) {
		tmp = (b - a) * ((b + a) * sin(pow(pow((((double) M_PI) * (angle_m * 0.011111111111111112)), 0.3333333333333333), 3.0)));
	} else {
		tmp = ((2.0 * ((b + a) * (b - a))) * sin((sqrt(((double) M_PI)) * ((angle_m * 0.005555555555555556) * sqrt(((double) M_PI)))))) * cos(((angle_m / 180.0) * ((double) M_PI)));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if ((angle_m / 180.0) <= 2e+95) {
		tmp = (Math.sin((Math.cbrt(Math.pow(Math.PI, 3.0)) * (angle_m * 0.011111111111111112))) * (b + a)) * (b - a);
	} else if ((angle_m / 180.0) <= 2e+185) {
		tmp = (b - a) * ((b + a) * Math.sin(Math.pow(Math.pow((Math.PI * (angle_m * 0.011111111111111112)), 0.3333333333333333), 3.0)));
	} else {
		tmp = ((2.0 * ((b + a) * (b - a))) * Math.sin((Math.sqrt(Math.PI) * ((angle_m * 0.005555555555555556) * Math.sqrt(Math.PI))))) * Math.cos(((angle_m / 180.0) * Math.PI));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 2e+95)
		tmp = Float64(Float64(sin(Float64(cbrt((pi ^ 3.0)) * Float64(angle_m * 0.011111111111111112))) * Float64(b + a)) * Float64(b - a));
	elseif (Float64(angle_m / 180.0) <= 2e+185)
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(((Float64(pi * Float64(angle_m * 0.011111111111111112)) ^ 0.3333333333333333) ^ 3.0))));
	else
		tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b + a) * Float64(b - a))) * sin(Float64(sqrt(pi) * Float64(Float64(angle_m * 0.005555555555555556) * sqrt(pi))))) * cos(Float64(Float64(angle_m / 180.0) * pi)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+95], N[(N[(N[Sin[N[(N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+185], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[Power[N[Power[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+185}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left({\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)}^{0.3333333333333333}\right)}^{3}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt{\pi}\right)\right)\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \pi\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000004e95

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*54.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr25.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define36.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*36.1%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*36.1%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified36.1%

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

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out56.1%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*54.8%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval54.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    12. Applied egg-rr73.4%

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

    if 2.00000000000000004e95 < (/.f64 angle #s(literal 180 binary64)) < 2e185

    1. Initial program 15.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*15.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u8.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine7.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr7.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define8.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*8.7%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*8.7%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified8.7%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u20.0%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*15.3%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval15.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{3}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    13. Step-by-step derivation
      1. pow1/338.3%

        \[\leadsto \left(\sin \left({\color{blue}{\left({\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}^{0.3333333333333333}\right)}}^{3}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    14. Applied egg-rr38.3%

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

    if 2e185 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 33.2%

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. add-cube-cbrt37.7%

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. rem-cube-cbrt37.6%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.0% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+277}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left({\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)}^{0.3333333333333333}\right)}^{3}\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000004e95

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*54.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr25.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define36.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*36.1%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*36.1%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified36.1%

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

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out56.1%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*54.8%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval54.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    12. Applied egg-rr73.4%

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

    if 2.00000000000000004e95 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000001e277

    1. Initial program 21.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. Step-by-step derivation
      1. associate-*l*21.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u11.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine11.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr11.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define12.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*12.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*12.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified12.3%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u23.8%

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out22.7%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*21.4%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval21.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{3}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    13. Step-by-step derivation
      1. pow1/333.2%

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

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

    if 2.00000000000000001e277 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 54.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.1% accurate, 1.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+95}:\\ \;\;\;\;\left(\sin \left(\sqrt[3]{{\pi}^{3}} \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left({t\_0}^{0.3333333333333333}\right)}^{3}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|b - a\right| \cdot \left(\left(b + a\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 (* PI (* angle_m 0.011111111111111112))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 2e+95)
      (*
       (*
        (sin (* (cbrt (pow PI 3.0)) (* angle_m 0.011111111111111112)))
        (+ b a))
       (- b a))
      (if (<= (/ angle_m 180.0) 2e+277)
        (* (- b a) (* (+ b a) (sin (pow (pow t_0 0.3333333333333333) 3.0))))
        (* (fabs (- b a)) (* (+ b a) (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 = ((double) M_PI) * (angle_m * 0.011111111111111112);
	double tmp;
	if ((angle_m / 180.0) <= 2e+95) {
		tmp = (sin((cbrt(pow(((double) M_PI), 3.0)) * (angle_m * 0.011111111111111112))) * (b + a)) * (b - a);
	} else if ((angle_m / 180.0) <= 2e+277) {
		tmp = (b - a) * ((b + a) * sin(pow(pow(t_0, 0.3333333333333333), 3.0)));
	} else {
		tmp = fabs((b - a)) * ((b + a) * sin(t_0));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = Math.PI * (angle_m * 0.011111111111111112);
	double tmp;
	if ((angle_m / 180.0) <= 2e+95) {
		tmp = (Math.sin((Math.cbrt(Math.pow(Math.PI, 3.0)) * (angle_m * 0.011111111111111112))) * (b + a)) * (b - a);
	} else if ((angle_m / 180.0) <= 2e+277) {
		tmp = (b - a) * ((b + a) * Math.sin(Math.pow(Math.pow(t_0, 0.3333333333333333), 3.0)));
	} else {
		tmp = Math.abs((b - a)) * ((b + a) * Math.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(pi * Float64(angle_m * 0.011111111111111112))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 2e+95)
		tmp = Float64(Float64(sin(Float64(cbrt((pi ^ 3.0)) * Float64(angle_m * 0.011111111111111112))) * Float64(b + a)) * Float64(b - a));
	elseif (Float64(angle_m / 180.0) <= 2e+277)
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(((t_0 ^ 0.3333333333333333) ^ 3.0))));
	else
		tmp = Float64(abs(Float64(b - a)) * Float64(Float64(b + a) * 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[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+95], N[(N[(N[Sin[N[(N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+277], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 0.3333333333333333], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[(b - a), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $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 := \pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+95}:\\
\;\;\;\;\left(\sin \left(\sqrt[3]{{\pi}^{3}} \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+277}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left({t\_0}^{0.3333333333333333}\right)}^{3}\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000004e95

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*54.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr25.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define36.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*36.1%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*36.1%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified36.1%

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

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out56.1%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*54.8%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval54.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    12. Applied egg-rr73.4%

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

    if 2.00000000000000004e95 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000001e277

    1. Initial program 21.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. Step-by-step derivation
      1. associate-*l*21.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u11.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine11.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr11.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define12.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*12.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*12.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified12.3%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u23.8%

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out22.7%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*21.4%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval21.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{3}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    13. Step-by-step derivation
      1. pow1/333.2%

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

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

    if 2.00000000000000001e277 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 54.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*54.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u33.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine33.3%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr33.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define33.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*33.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*33.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified33.3%

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

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*54.1%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 66.4% accurate, 1.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+110}:\\ \;\;\;\;\left(\sin \left(\sqrt[3]{{\pi}^{3}} \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;\left|b - a\right| \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (/ angle_m 180.0) 5e+110)
    (*
     (* (sin (* (cbrt (pow PI 3.0)) (* angle_m 0.011111111111111112))) (+ b a))
     (- b a))
    (*
     (fabs (- b a))
     (* (+ b a) (sin (* PI (* angle_m 0.011111111111111112))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if ((angle_m / 180.0) <= 5e+110) {
		tmp = (sin((cbrt(pow(((double) M_PI), 3.0)) * (angle_m * 0.011111111111111112))) * (b + a)) * (b - a);
	} else {
		tmp = fabs((b - a)) * ((b + a) * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if ((angle_m / 180.0) <= 5e+110) {
		tmp = (Math.sin((Math.cbrt(Math.pow(Math.PI, 3.0)) * (angle_m * 0.011111111111111112))) * (b + a)) * (b - a);
	} else {
		tmp = Math.abs((b - a)) * ((b + a) * Math.sin((Math.PI * (angle_m * 0.011111111111111112))));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 5e+110)
		tmp = Float64(Float64(sin(Float64(cbrt((pi ^ 3.0)) * Float64(angle_m * 0.011111111111111112))) * Float64(b + a)) * Float64(b - a));
	else
		tmp = Float64(abs(Float64(b - a)) * Float64(Float64(b + a) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+110], N[(N[(N[Sin[N[(N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[(b - a), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 4.99999999999999978e110

    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. Step-by-step derivation
      1. associate-*l*53.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr24.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define35.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*35.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*35.5%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified35.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u52.0%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*53.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999978e110 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 27.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*27.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u15.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine14.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr14.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define15.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*15.9%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*15.9%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot 2\right)\right)}\right)\right)\right) \]
      4. metadata-eval15.9%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified15.9%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u29.8%

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out26.8%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*27.5%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval27.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 66.8% accurate, 1.3× speedup?

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

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+91}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle\_m \cdot \pi}{180}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000008e91

    1. Initial program 54.7%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*54.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr25.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define36.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*36.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*36.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified36.3%

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

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out55.9%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*54.6%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval54.6%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000008e91 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 24.7%

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

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

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

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

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

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

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

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

Alternative 6: 66.2% accurate, 1.8× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle\_m \cdot \pi}{180}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 4.00000000000000036e106

    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. Step-by-step derivation
      1. associate-*l*53.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr24.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define35.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*35.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*35.5%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified35.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u52.0%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000036e106 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 27.1%

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

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

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

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

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

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

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

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

Alternative 7: 66.0% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 3.99999999999999982e127

    1. Initial program 52.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*52.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u35.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine24.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr24.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define34.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*34.8%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot 2\right)\right)}\right)\right)\right) \]
      4. metadata-eval34.8%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified34.8%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u51.5%

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out54.6%

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999982e127 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 29.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*29.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u16.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine16.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr16.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define17.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*17.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*17.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified17.3%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u30.0%

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out26.6%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*30.0%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 66.3% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999996e86

    1. Initial program 54.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*54.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr25.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define36.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*36.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*36.5%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified36.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u53.4%

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out56.1%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e86 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 24.7%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*24.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u14.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine13.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr13.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define14.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*14.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*14.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified14.3%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u26.6%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*26.6%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval26.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 64.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 56.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*56.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u44.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine37.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr37.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define44.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*44.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*44.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified44.3%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u56.3%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*56.3%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval56.3%

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

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

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

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

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

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

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

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

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

    if 1.99999999999999992e-164 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 45.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. Step-by-step derivation
      1. associate-*l*45.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u26.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine15.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr15.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define25.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*25.6%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*25.6%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified25.6%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u43.8%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left({\left(\sqrt[3]{0.011111111111111112}\right)}^{3} \cdot \left(a + b\right)\right)\right)\right)} \cdot \left(b - a\right) \]
    14. Step-by-step derivation
      1. rem-cube-cbrt62.3%

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

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

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

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

Alternative 10: 64.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 56.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*56.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u44.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine37.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr37.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define44.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*44.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*44.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified44.3%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u56.3%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*56.3%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval56.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999992e-164 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 45.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. Step-by-step derivation
      1. associate-*l*45.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u26.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine15.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr15.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define25.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*25.6%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*25.6%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified25.6%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u43.8%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left({\left(\sqrt[3]{0.011111111111111112}\right)}^{3} \cdot \left(a + b\right)\right)\right)\right)} \cdot \left(b - a\right) \]
    14. Step-by-step derivation
      1. rem-cube-cbrt62.3%

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

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

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

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

Alternative 11: 64.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 64.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. Step-by-step derivation
      1. associate-*l*64.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u47.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine37.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr37.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define47.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*47.3%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*47.3%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified47.3%

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

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

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

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

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out62.7%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*64.4%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot \left(b - a\right) \]
    15. Step-by-step derivation
      1. *-commutative66.1%

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

        \[\leadsto \left(a \cdot \sin \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)}\right) \cdot \left(b - a\right) \]
      3. rem-cube-cbrt66.0%

        \[\leadsto \left(a \cdot \sin \left(angle \cdot \left(\pi \cdot \color{blue}{{\left(\sqrt[3]{0.011111111111111112}\right)}^{3}}\right)\right)\right) \cdot \left(b - a\right) \]
      4. rem-cube-cbrt67.9%

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

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

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

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

        \[\leadsto \left(a \cdot \sin \left(-\color{blue}{angle \cdot \left(\pi \cdot -0.011111111111111112\right)}\right)\right) \cdot \left(b - a\right) \]
      9. rem-cube-cbrt66.0%

        \[\leadsto \left(a \cdot \sin \left(-angle \cdot \left(\pi \cdot \color{blue}{{\left(\sqrt[3]{-0.011111111111111112}\right)}^{3}}\right)\right)\right) \cdot \left(b - a\right) \]
      10. mul-1-neg66.0%

        \[\leadsto \left(a \cdot \sin \color{blue}{\left(-1 \cdot \left(angle \cdot \left(\pi \cdot {\left(\sqrt[3]{-0.011111111111111112}\right)}^{3}\right)\right)\right)}\right) \cdot \left(b - a\right) \]
      11. mul-1-neg66.0%

        \[\leadsto \left(a \cdot \sin \color{blue}{\left(-angle \cdot \left(\pi \cdot {\left(\sqrt[3]{-0.011111111111111112}\right)}^{3}\right)\right)}\right) \cdot \left(b - a\right) \]
      12. rem-cube-cbrt67.9%

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

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

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

    if 5.00000000000000021e-216 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 42.8%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*42.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u26.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine17.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr17.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define26.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*26.0%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*26.0%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified26.0%

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

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*43.2%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left({\left(\sqrt[3]{0.011111111111111112}\right)}^{3} \cdot \left(a + b\right)\right)\right)\right)} \cdot \left(b - a\right) \]
    14. Step-by-step derivation
      1. rem-cube-cbrt61.2%

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

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

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

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

Alternative 12: 67.1% accurate, 3.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 1.5000000000000001e-12

    1. Initial program 56.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. Step-by-step derivation
      1. associate-*l*56.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u39.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine27.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr27.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define39.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*39.2%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*39.2%

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

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified39.2%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u55.3%

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left({\left(\sqrt[3]{0.011111111111111112}\right)}^{3} \cdot \left(a + b\right)\right)\right)\right)} \cdot \left(b - a\right) \]
    14. Step-by-step derivation
      1. rem-cube-cbrt71.3%

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

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

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

    if 1.5000000000000001e-12 < angle

    1. Initial program 28.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*28.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)} + \pi \cdot \frac{angle}{180}\right) \]
      4. metadata-eval32.6%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right) \]
      5. associate-*r*32.4%

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556 + \color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556}\right) \]
      9. distribute-lft-out29.5%

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \]
      12. log1p-expm1-u32.6%

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

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

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

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

Alternative 13: 67.5% accurate, 3.7× speedup?

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

\\
angle\_s \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*49.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    4. expm1-log1p-u32.6%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
    5. expm1-undefine23.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
  6. Applied egg-rr23.0%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
  7. Step-by-step derivation
    1. expm1-define32.2%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
    2. associate-*l*32.2%

      \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
    3. associate-*l*32.2%

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

      \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
  8. Simplified32.2%

    \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
  9. Step-by-step derivation
    1. expm1-log1p-u48.3%

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

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

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

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

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

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

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

      \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
    9. associate-*r*49.4%

      \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
    10. metadata-eval49.4%

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

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

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

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

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

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

      \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
  10. Applied egg-rr63.8%

    \[\leadsto \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)} \]
  11. Final simplification63.8%

    \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right) \]
  12. Add Preprocessing

Alternative 14: 62.1% accurate, 23.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.2 \cdot 10^{+109}:\\ \;\;\;\;\left(b - a\right) \cdot \left(angle\_m \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 2.2e+109)
    (* (- b a) (* angle_m (* (+ b a) (* PI 0.011111111111111112))))
    (* (* 0.011111111111111112 (* angle_m PI)) (* b a)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 2.2e+109) {
		tmp = (b - a) * (angle_m * ((b + a) * (((double) M_PI) * 0.011111111111111112)));
	} else {
		tmp = (0.011111111111111112 * (angle_m * ((double) M_PI))) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 2.2e+109) {
		tmp = (b - a) * (angle_m * ((b + a) * (Math.PI * 0.011111111111111112)));
	} else {
		tmp = (0.011111111111111112 * (angle_m * Math.PI)) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if angle_m <= 2.2e+109:
		tmp = (b - a) * (angle_m * ((b + a) * (math.pi * 0.011111111111111112)))
	else:
		tmp = (0.011111111111111112 * (angle_m * math.pi)) * (b * a)
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (angle_m <= 2.2e+109)
		tmp = Float64(Float64(b - a) * Float64(angle_m * Float64(Float64(b + a) * Float64(pi * 0.011111111111111112))));
	else
		tmp = Float64(Float64(0.011111111111111112 * Float64(angle_m * pi)) * Float64(b * a));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (angle_m <= 2.2e+109)
		tmp = (b - a) * (angle_m * ((b + a) * (pi * 0.011111111111111112)));
	else
		tmp = (0.011111111111111112 * (angle_m * pi)) * (b * a);
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.2e+109], N[(N[(b - a), $MachinePrecision] * N[(angle$95$m * N[(N[(b + a), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * N[(b * a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2.2 \cdot 10^{+109}:\\
\;\;\;\;\left(b - a\right) \cdot \left(angle\_m \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 2.1999999999999999e109

    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. Step-by-step derivation
      1. associate-*l*53.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*53.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified53.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*53.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*53.6%

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr24.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define35.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*35.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*35.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot 2\right)\right)}\right)\right)\right) \]
      4. metadata-eval35.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified35.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u52.0%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \]
      2. *-commutative52.0%

        \[\leadsto \color{blue}{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. associate-*r*55.2%

        \[\leadsto \sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      4. metadata-eval55.2%

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out55.2%

        \[\leadsto \sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556 + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. associate-*r*54.8%

        \[\leadsto \sin \left(\color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. metadata-eval54.8%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right) + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      8. div-inv55.3%

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*53.9%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval53.9%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      11. div-inv53.6%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \pi \cdot \color{blue}{\frac{angle}{180}}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      12. count-253.6%

        \[\leadsto \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      13. 2-sin53.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      14. unpow253.6%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      15. unpow253.6%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      16. difference-of-squares57.4%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    10. Applied egg-rr69.2%

      \[\leadsto \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)} \]
    11. Step-by-step derivation
      1. associate-*r*72.4%

        \[\leadsto \left(\sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      2. *-commutative72.4%

        \[\leadsto \left(\sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      3. *-commutative72.4%

        \[\leadsto \left(\sin \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      4. add-cube-cbrt73.0%

        \[\leadsto \left(\sin \color{blue}{\left(\left(\sqrt[3]{0.011111111111111112 \cdot \left(angle \cdot \pi\right)} \cdot \sqrt[3]{0.011111111111111112 \cdot \left(angle \cdot \pi\right)}\right) \cdot \sqrt[3]{0.011111111111111112 \cdot \left(angle \cdot \pi\right)}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      5. pow372.0%

        \[\leadsto \left(\sin \color{blue}{\left({\left(\sqrt[3]{0.011111111111111112 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      6. *-commutative72.0%

        \[\leadsto \left(\sin \left({\left(\sqrt[3]{\color{blue}{\left(angle \cdot \pi\right) \cdot 0.011111111111111112}}\right)}^{3}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      7. *-commutative72.0%

        \[\leadsto \left(\sin \left({\left(\sqrt[3]{\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.011111111111111112}\right)}^{3}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      8. associate-*r*71.8%

        \[\leadsto \left(\sin \left({\left(\sqrt[3]{\color{blue}{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}}\right)}^{3}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    12. Applied egg-rr71.8%

      \[\leadsto \left(\sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{3}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    13. Taylor expanded in angle around 0 66.4%

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left({\left(\sqrt[3]{0.011111111111111112}\right)}^{3} \cdot \left(a + b\right)\right)\right)\right)} \cdot \left(b - a\right) \]
    14. Step-by-step derivation
      1. rem-cube-cbrt67.0%

        \[\leadsto \left(angle \cdot \left(\pi \cdot \left(\color{blue}{0.011111111111111112} \cdot \left(a + b\right)\right)\right)\right) \cdot \left(b - a\right) \]
      2. associate-*r*67.1%

        \[\leadsto \left(angle \cdot \color{blue}{\left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(a + b\right)\right)}\right) \cdot \left(b - a\right) \]
    15. Simplified67.1%

      \[\leadsto \color{blue}{\left(angle \cdot \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(a + b\right)\right)\right)} \cdot \left(b - a\right) \]

    if 2.1999999999999999e109 < angle

    1. Initial program 27.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*27.1%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative27.1%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*27.1%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified27.1%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow227.1%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow227.1%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares31.8%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr31.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 27.0%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 22.4%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in a around 0 18.1%

      \[\leadsto \color{blue}{\left(a \cdot b\right)} \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2.2 \cdot 10^{+109}:\\ \;\;\;\;\left(b - a\right) \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 62.0% accurate, 23.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.2 \cdot 10^{+109}:\\ \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 2.2e+109)
    (* (- b a) (* 0.011111111111111112 (* angle_m (* PI (+ b a)))))
    (* (* 0.011111111111111112 (* angle_m PI)) (* b a)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 2.2e+109) {
		tmp = (b - a) * (0.011111111111111112 * (angle_m * (((double) M_PI) * (b + a))));
	} else {
		tmp = (0.011111111111111112 * (angle_m * ((double) M_PI))) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 2.2e+109) {
		tmp = (b - a) * (0.011111111111111112 * (angle_m * (Math.PI * (b + a))));
	} else {
		tmp = (0.011111111111111112 * (angle_m * Math.PI)) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if angle_m <= 2.2e+109:
		tmp = (b - a) * (0.011111111111111112 * (angle_m * (math.pi * (b + a))))
	else:
		tmp = (0.011111111111111112 * (angle_m * math.pi)) * (b * a)
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (angle_m <= 2.2e+109)
		tmp = Float64(Float64(b - a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(b + a)))));
	else
		tmp = Float64(Float64(0.011111111111111112 * Float64(angle_m * pi)) * Float64(b * a));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (angle_m <= 2.2e+109)
		tmp = (b - a) * (0.011111111111111112 * (angle_m * (pi * (b + a))));
	else
		tmp = (0.011111111111111112 * (angle_m * pi)) * (b * a);
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.2e+109], N[(N[(b - a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * N[(b * a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2.2 \cdot 10^{+109}:\\
\;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 2.1999999999999999e109

    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. Step-by-step derivation
      1. associate-*l*53.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*53.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified53.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*53.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*53.6%

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u36.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine25.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr24.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define35.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*35.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*35.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot 2\right)\right)}\right)\right)\right) \]
      4. metadata-eval35.5%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified35.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u52.0%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \]
      2. *-commutative52.0%

        \[\leadsto \color{blue}{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. associate-*r*55.2%

        \[\leadsto \sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      4. metadata-eval55.2%

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out55.2%

        \[\leadsto \sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556 + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. associate-*r*54.8%

        \[\leadsto \sin \left(\color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. metadata-eval54.8%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right) + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      8. div-inv55.3%

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*53.9%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval53.9%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      11. div-inv53.6%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \pi \cdot \color{blue}{\frac{angle}{180}}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      12. count-253.6%

        \[\leadsto \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      13. 2-sin53.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      14. unpow253.6%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      15. unpow253.6%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      16. difference-of-squares57.4%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    10. Applied egg-rr69.2%

      \[\leadsto \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)} \]
    11. Taylor expanded in angle around 0 67.0%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)} \cdot \left(b - a\right) \]

    if 2.1999999999999999e109 < angle

    1. Initial program 27.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*27.1%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative27.1%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*27.1%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified27.1%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow227.1%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow227.1%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares31.8%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr31.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 27.0%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 22.4%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in a around 0 18.1%

      \[\leadsto \color{blue}{\left(a \cdot b\right)} \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2.2 \cdot 10^{+109}:\\ \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 56.1% accurate, 23.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 2 \cdot 10^{+148}:\\ \;\;\;\;angle\_m \cdot \left(\pi \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= a 2e+148)
    (* angle_m (* PI (* 0.011111111111111112 (* (+ b a) (- b a)))))
    (* 0.011111111111111112 (* a (* angle_m (* PI (- b a))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 2e+148) {
		tmp = angle_m * (((double) M_PI) * (0.011111111111111112 * ((b + a) * (b - a))));
	} else {
		tmp = 0.011111111111111112 * (a * (angle_m * (((double) M_PI) * (b - a))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 2e+148) {
		tmp = angle_m * (Math.PI * (0.011111111111111112 * ((b + a) * (b - a))));
	} else {
		tmp = 0.011111111111111112 * (a * (angle_m * (Math.PI * (b - a))));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if a <= 2e+148:
		tmp = angle_m * (math.pi * (0.011111111111111112 * ((b + a) * (b - a))))
	else:
		tmp = 0.011111111111111112 * (a * (angle_m * (math.pi * (b - a))))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (a <= 2e+148)
		tmp = Float64(angle_m * Float64(pi * Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(b - a)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle_m * Float64(pi * Float64(b - a)))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (a <= 2e+148)
		tmp = angle_m * (pi * (0.011111111111111112 * ((b + a) * (b - a))));
	else
		tmp = 0.011111111111111112 * (a * (angle_m * (pi * (b - a))));
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 2e+148], N[(angle$95$m * N[(Pi * N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(angle$95$m * N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 2 \cdot 10^{+148}:\\
\;\;\;\;angle\_m \cdot \left(\pi \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.0000000000000001e148

    1. Initial program 50.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*50.9%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative50.9%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*50.9%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified50.9%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*50.9%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative50.9%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*50.9%

        \[\leadsto \color{blue}{\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)} \]
      4. expm1-log1p-u35.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
      5. expm1-undefine24.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)\right)} - 1} \]
    6. Applied egg-rr23.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-define34.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. associate-*l*34.7%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right) \]
      3. associate-*l*34.7%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot 2\right)\right)}\right)\right)\right) \]
      4. metadata-eval34.7%

        \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.011111111111111112}\right)\right)\right)\right) \]
    8. Simplified34.7%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u49.9%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \]
      2. *-commutative49.9%

        \[\leadsto \color{blue}{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. associate-*r*52.4%

        \[\leadsto \sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      4. metadata-eval52.4%

        \[\leadsto \sin \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(0.005555555555555556 + 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. distribute-lft-out52.4%

        \[\leadsto \sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556 + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. associate-*r*52.7%

        \[\leadsto \sin \left(\color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. metadata-eval52.7%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right) + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      8. div-inv52.6%

        \[\leadsto \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}} + \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. associate-*r*51.3%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. metadata-eval51.3%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      11. div-inv50.9%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180} + \pi \cdot \color{blue}{\frac{angle}{180}}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      12. count-250.9%

        \[\leadsto \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      13. 2-sin50.9%

        \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      14. unpow250.9%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      15. unpow250.9%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      16. difference-of-squares52.8%

        \[\leadsto \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    10. Applied egg-rr61.4%

      \[\leadsto \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)} \]
    11. Step-by-step derivation
      1. associate-*r*63.5%

        \[\leadsto \left(\sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      2. *-commutative63.5%

        \[\leadsto \left(\sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      3. *-commutative63.5%

        \[\leadsto \left(\sin \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      4. add-cube-cbrt63.9%

        \[\leadsto \left(\sin \color{blue}{\left(\left(\sqrt[3]{0.011111111111111112 \cdot \left(angle \cdot \pi\right)} \cdot \sqrt[3]{0.011111111111111112 \cdot \left(angle \cdot \pi\right)}\right) \cdot \sqrt[3]{0.011111111111111112 \cdot \left(angle \cdot \pi\right)}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      5. pow363.1%

        \[\leadsto \left(\sin \color{blue}{\left({\left(\sqrt[3]{0.011111111111111112 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      6. *-commutative63.1%

        \[\leadsto \left(\sin \left({\left(\sqrt[3]{\color{blue}{\left(angle \cdot \pi\right) \cdot 0.011111111111111112}}\right)}^{3}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      7. *-commutative63.1%

        \[\leadsto \left(\sin \left({\left(\sqrt[3]{\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.011111111111111112}\right)}^{3}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
      8. associate-*r*63.8%

        \[\leadsto \left(\sin \left({\left(\sqrt[3]{\color{blue}{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}}\right)}^{3}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    12. Applied egg-rr63.8%

      \[\leadsto \left(\sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{3}\right)} \cdot \left(b + a\right)\right) \cdot \left(b - a\right) \]
    13. Taylor expanded in angle around 0 51.0%

      \[\leadsto \color{blue}{angle \cdot \left(\pi \cdot \left({\left(\sqrt[3]{0.011111111111111112}\right)}^{3} \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    14. Step-by-step derivation
      1. rem-cube-cbrt51.4%

        \[\leadsto angle \cdot \left(\pi \cdot \left(\color{blue}{0.011111111111111112} \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
      2. *-commutative51.4%

        \[\leadsto angle \cdot \left(\pi \cdot \left(0.011111111111111112 \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right)\right) \]
    15. Simplified51.4%

      \[\leadsto \color{blue}{angle \cdot \left(\pi \cdot \left(0.011111111111111112 \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)} \]

    if 2.0000000000000001e148 < a

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l*38.0%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative38.0%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*38.0%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified38.0%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow238.0%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow238.0%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares55.1%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr55.1%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 43.3%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 35.0%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in angle around 0 55.5%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2 \cdot 10^{+148}:\\ \;\;\;\;angle \cdot \left(\pi \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 56.0% accurate, 23.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 2.25 \cdot 10^{+148}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= a 2.25e+148)
    (* 0.011111111111111112 (* angle_m (* PI (* (+ b a) (- b a)))))
    (* 0.011111111111111112 (* a (* angle_m (* PI (- b a))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 2.25e+148) {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((b + a) * (b - a))));
	} else {
		tmp = 0.011111111111111112 * (a * (angle_m * (((double) M_PI) * (b - a))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 2.25e+148) {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((b + a) * (b - a))));
	} else {
		tmp = 0.011111111111111112 * (a * (angle_m * (Math.PI * (b - a))));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if a <= 2.25e+148:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((b + a) * (b - a))))
	else:
		tmp = 0.011111111111111112 * (a * (angle_m * (math.pi * (b - a))))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (a <= 2.25e+148)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(b + a) * Float64(b - a)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle_m * Float64(pi * Float64(b - a)))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (a <= 2.25e+148)
		tmp = 0.011111111111111112 * (angle_m * (pi * ((b + a) * (b - a))));
	else
		tmp = 0.011111111111111112 * (a * (angle_m * (pi * (b - a))));
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 2.25e+148], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(angle$95$m * N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 2.25 \cdot 10^{+148}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.24999999999999997e148

    1. Initial program 50.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*50.9%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative50.9%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*50.9%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified50.9%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow250.9%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow250.9%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares52.8%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr52.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 51.3%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in angle around 0 51.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]

    if 2.24999999999999997e148 < a

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l*38.0%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative38.0%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*38.0%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified38.0%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow238.0%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow238.0%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares55.1%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr55.1%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 43.3%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 35.0%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in angle around 0 55.5%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.25 \cdot 10^{+148}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 45.1% accurate, 26.2× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 0.00058:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= a 0.00058)
    (* (* 0.011111111111111112 (* angle_m PI)) (* b (- b a)))
    (* a (* (- b a) (* angle_m (* PI 0.011111111111111112)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 0.00058) {
		tmp = (0.011111111111111112 * (angle_m * ((double) M_PI))) * (b * (b - a));
	} else {
		tmp = a * ((b - a) * (angle_m * (((double) M_PI) * 0.011111111111111112)));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 0.00058) {
		tmp = (0.011111111111111112 * (angle_m * Math.PI)) * (b * (b - a));
	} else {
		tmp = a * ((b - a) * (angle_m * (Math.PI * 0.011111111111111112)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if a <= 0.00058:
		tmp = (0.011111111111111112 * (angle_m * math.pi)) * (b * (b - a))
	else:
		tmp = a * ((b - a) * (angle_m * (math.pi * 0.011111111111111112)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (a <= 0.00058)
		tmp = Float64(Float64(0.011111111111111112 * Float64(angle_m * pi)) * Float64(b * Float64(b - a)));
	else
		tmp = Float64(a * Float64(Float64(b - a) * Float64(angle_m * Float64(pi * 0.011111111111111112))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (a <= 0.00058)
		tmp = (0.011111111111111112 * (angle_m * pi)) * (b * (b - a));
	else
		tmp = a * ((b - a) * (angle_m * (pi * 0.011111111111111112)));
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 0.00058], N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * N[(b * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(b - a), $MachinePrecision] * N[(angle$95$m * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 0.00058:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot \left(b - a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 5.8e-4

    1. Initial program 50.6%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*50.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative50.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*50.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified50.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow250.6%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow250.6%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares52.8%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr52.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 51.3%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around inf 40.7%

      \[\leadsto \left(\color{blue}{b} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]

    if 5.8e-4 < a

    1. Initial program 45.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. Step-by-step derivation
      1. associate-*l*45.4%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative45.4%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*45.4%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified45.4%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow245.4%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow245.4%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares53.7%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr53.7%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 47.6%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 39.6%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Step-by-step derivation
      1. pow139.6%

        \[\leadsto \color{blue}{{\left(\left(a \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)}^{1}} \]
      2. associate-*l*48.3%

        \[\leadsto {\color{blue}{\left(a \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}}^{1} \]
      3. *-commutative48.3%

        \[\leadsto {\left(a \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}\right)\right)}^{1} \]
      4. *-commutative48.3%

        \[\leadsto {\left(a \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.011111111111111112\right)\right)\right)}^{1} \]
      5. associate-*r*48.3%

        \[\leadsto {\left(a \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}\right)\right)}^{1} \]
    10. Applied egg-rr48.3%

      \[\leadsto \color{blue}{{\left(a \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow148.3%

        \[\leadsto \color{blue}{a \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)} \]
      2. associate-*r*48.3%

        \[\leadsto a \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)}\right) \]
      3. *-commutative48.3%

        \[\leadsto a \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \]
      4. associate-*r*48.4%

        \[\leadsto a \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)}\right) \]
    12. Simplified48.4%

      \[\leadsto \color{blue}{a \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 0.00058:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 40.3% accurate, 26.2× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.2 \cdot 10^{+109}:\\ \;\;\;\;a \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 2.2e+109)
    (* a (* (- b a) (* angle_m (* PI 0.011111111111111112))))
    (* (* 0.011111111111111112 (* angle_m PI)) (* b a)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 2.2e+109) {
		tmp = a * ((b - a) * (angle_m * (((double) M_PI) * 0.011111111111111112)));
	} else {
		tmp = (0.011111111111111112 * (angle_m * ((double) M_PI))) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 2.2e+109) {
		tmp = a * ((b - a) * (angle_m * (Math.PI * 0.011111111111111112)));
	} else {
		tmp = (0.011111111111111112 * (angle_m * Math.PI)) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if angle_m <= 2.2e+109:
		tmp = a * ((b - a) * (angle_m * (math.pi * 0.011111111111111112)))
	else:
		tmp = (0.011111111111111112 * (angle_m * math.pi)) * (b * a)
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (angle_m <= 2.2e+109)
		tmp = Float64(a * Float64(Float64(b - a) * Float64(angle_m * Float64(pi * 0.011111111111111112))));
	else
		tmp = Float64(Float64(0.011111111111111112 * Float64(angle_m * pi)) * Float64(b * a));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (angle_m <= 2.2e+109)
		tmp = a * ((b - a) * (angle_m * (pi * 0.011111111111111112)));
	else
		tmp = (0.011111111111111112 * (angle_m * pi)) * (b * a);
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.2e+109], N[(a * N[(N[(b - a), $MachinePrecision] * N[(angle$95$m * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * N[(b * a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2.2 \cdot 10^{+109}:\\
\;\;\;\;a \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 2.1999999999999999e109

    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. Step-by-step derivation
      1. associate-*l*53.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*53.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified53.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow253.6%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow253.6%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares57.4%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr57.4%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 54.9%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 38.0%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Step-by-step derivation
      1. pow138.0%

        \[\leadsto \color{blue}{{\left(\left(a \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)}^{1}} \]
      2. associate-*l*42.3%

        \[\leadsto {\color{blue}{\left(a \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}}^{1} \]
      3. *-commutative42.3%

        \[\leadsto {\left(a \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}\right)\right)}^{1} \]
      4. *-commutative42.3%

        \[\leadsto {\left(a \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.011111111111111112\right)\right)\right)}^{1} \]
      5. associate-*r*42.4%

        \[\leadsto {\left(a \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}\right)\right)}^{1} \]
    10. Applied egg-rr42.4%

      \[\leadsto \color{blue}{{\left(a \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow142.4%

        \[\leadsto \color{blue}{a \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)} \]
      2. associate-*r*42.3%

        \[\leadsto a \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)}\right) \]
      3. *-commutative42.3%

        \[\leadsto a \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \]
      4. associate-*r*42.4%

        \[\leadsto a \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)}\right) \]
    12. Simplified42.4%

      \[\leadsto \color{blue}{a \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)} \]

    if 2.1999999999999999e109 < angle

    1. Initial program 27.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*27.1%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative27.1%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*27.1%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified27.1%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow227.1%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow227.1%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares31.8%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr31.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 27.0%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 22.4%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in a around 0 18.1%

      \[\leadsto \color{blue}{\left(a \cdot b\right)} \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2.2 \cdot 10^{+109}:\\ \;\;\;\;a \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 40.2% accurate, 26.2× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.2 \cdot 10^{+109}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 2.2e+109)
    (* 0.011111111111111112 (* a (* angle_m (* PI (- b a)))))
    (* (* 0.011111111111111112 (* angle_m PI)) (* b a)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 2.2e+109) {
		tmp = 0.011111111111111112 * (a * (angle_m * (((double) M_PI) * (b - a))));
	} else {
		tmp = (0.011111111111111112 * (angle_m * ((double) M_PI))) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 2.2e+109) {
		tmp = 0.011111111111111112 * (a * (angle_m * (Math.PI * (b - a))));
	} else {
		tmp = (0.011111111111111112 * (angle_m * Math.PI)) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if angle_m <= 2.2e+109:
		tmp = 0.011111111111111112 * (a * (angle_m * (math.pi * (b - a))))
	else:
		tmp = (0.011111111111111112 * (angle_m * math.pi)) * (b * a)
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (angle_m <= 2.2e+109)
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle_m * Float64(pi * Float64(b - a)))));
	else
		tmp = Float64(Float64(0.011111111111111112 * Float64(angle_m * pi)) * Float64(b * a));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (angle_m <= 2.2e+109)
		tmp = 0.011111111111111112 * (a * (angle_m * (pi * (b - a))));
	else
		tmp = (0.011111111111111112 * (angle_m * pi)) * (b * a);
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.2e+109], N[(0.011111111111111112 * N[(a * N[(angle$95$m * N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * N[(b * a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2.2 \cdot 10^{+109}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 2.1999999999999999e109

    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. Step-by-step derivation
      1. associate-*l*53.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.6%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*53.6%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified53.6%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow253.6%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow253.6%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares57.4%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr57.4%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 54.9%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 38.0%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in angle around 0 42.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]

    if 2.1999999999999999e109 < angle

    1. Initial program 27.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*27.1%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative27.1%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*27.1%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified27.1%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow227.1%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow227.1%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares31.8%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr31.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 27.0%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 22.4%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in a around 0 18.1%

      \[\leadsto \color{blue}{\left(a \cdot b\right)} \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2.2 \cdot 10^{+109}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 35.6% accurate, 27.9× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 3.1 \cdot 10^{+156}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(-0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 3.1e+156)
    (* (* a a) (* (* angle_m PI) (- 0.011111111111111112)))
    (* (* 0.011111111111111112 (* angle_m PI)) (* b a)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 3.1e+156) {
		tmp = (a * a) * ((angle_m * ((double) M_PI)) * -0.011111111111111112);
	} else {
		tmp = (0.011111111111111112 * (angle_m * ((double) M_PI))) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 3.1e+156) {
		tmp = (a * a) * ((angle_m * Math.PI) * -0.011111111111111112);
	} else {
		tmp = (0.011111111111111112 * (angle_m * Math.PI)) * (b * a);
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if b <= 3.1e+156:
		tmp = (a * a) * ((angle_m * math.pi) * -0.011111111111111112)
	else:
		tmp = (0.011111111111111112 * (angle_m * math.pi)) * (b * a)
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (b <= 3.1e+156)
		tmp = Float64(Float64(a * a) * Float64(Float64(angle_m * pi) * Float64(-0.011111111111111112)));
	else
		tmp = Float64(Float64(0.011111111111111112 * Float64(angle_m * pi)) * Float64(b * a));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (b <= 3.1e+156)
		tmp = (a * a) * ((angle_m * pi) * -0.011111111111111112);
	else
		tmp = (0.011111111111111112 * (angle_m * pi)) * (b * a);
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 3.1e+156], N[(N[(a * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * (-0.011111111111111112)), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * N[(b * a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 3.1 \cdot 10^{+156}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(-0.011111111111111112\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 3.1000000000000002e156

    1. Initial program 51.8%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*51.8%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative51.8%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*51.8%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified51.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow251.8%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow251.8%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares54.5%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr54.5%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 52.1%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 38.2%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in b around 0 36.7%

      \[\leadsto \left(a \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    10. Step-by-step derivation
      1. neg-mul-136.7%

        \[\leadsto \left(a \cdot \color{blue}{\left(-a\right)}\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    11. Simplified36.7%

      \[\leadsto \left(a \cdot \color{blue}{\left(-a\right)}\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]

    if 3.1000000000000002e156 < b

    1. Initial program 32.8%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*32.8%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative32.8%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*32.8%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    3. Simplified32.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow232.8%

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. unpow232.8%

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares44.2%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr44.2%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 38.7%

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
    8. Taylor expanded in b around 0 18.1%

      \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
    9. Taylor expanded in a around 0 23.4%

      \[\leadsto \color{blue}{\left(a \cdot b\right)} \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 3.1 \cdot 10^{+156}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(-0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 21.0% accurate, 46.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* (* 0.011111111111111112 (* angle_m PI)) (* b 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 * ((0.011111111111111112 * (angle_m * ((double) M_PI))) * (b * a));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((0.011111111111111112 * (angle_m * Math.PI)) * (b * a));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((0.011111111111111112 * (angle_m * math.pi)) * (b * a))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(0.011111111111111112 * Float64(angle_m * pi)) * Float64(b * a)))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * ((0.011111111111111112 * (angle_m * pi)) * (b * a));
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(b \cdot a\right)\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*49.1%

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutative49.1%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*49.1%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  3. Simplified49.1%

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. unpow249.1%

      \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. unpow249.1%

      \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    3. difference-of-squares53.1%

      \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  6. Applied egg-rr53.1%

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  7. Taylor expanded in angle around 0 50.2%

    \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
  8. Taylor expanded in b around 0 35.4%

    \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  9. Taylor expanded in a around 0 20.0%

    \[\leadsto \color{blue}{\left(a \cdot b\right)} \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  10. Final simplification20.0%

    \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot a\right) \]
  11. Add Preprocessing

Alternative 23: 19.8% accurate, 46.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(angle\_m \cdot a\right) \cdot \left(\pi \cdot b\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* 0.011111111111111112 (* (* angle_m a) (* PI b)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * ((angle_m * a) * (((double) M_PI) * b)));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * ((angle_m * a) * (Math.PI * b)));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * (0.011111111111111112 * ((angle_m * a) * (math.pi * b)))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(angle_m * a) * Float64(pi * b))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * (0.011111111111111112 * ((angle_m * a) * (pi * b)));
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(angle$95$m * a), $MachinePrecision] * N[(Pi * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(angle\_m \cdot a\right) \cdot \left(\pi \cdot b\right)\right)\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*49.1%

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutative49.1%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*49.1%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  3. Simplified49.1%

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. unpow249.1%

      \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. unpow249.1%

      \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    3. difference-of-squares53.1%

      \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  6. Applied egg-rr53.1%

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  7. Taylor expanded in angle around 0 50.2%

    \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
  8. Taylor expanded in b around 0 35.4%

    \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  9. Taylor expanded in a around 0 17.8%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)} \]
  10. Step-by-step derivation
    1. associate-*r*17.4%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)} \]
    2. *-commutative17.4%

      \[\leadsto 0.011111111111111112 \cdot \left(\left(a \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot b\right)}\right) \]
  11. Simplified17.4%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(\left(a \cdot angle\right) \cdot \left(\pi \cdot b\right)\right)} \]
  12. Final simplification17.4%

    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot a\right) \cdot \left(\pi \cdot b\right)\right) \]
  13. Add Preprocessing

Alternative 24: 19.9% accurate, 46.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot b\right)\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* 0.011111111111111112 (* a (* angle_m (* PI b))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (a * (angle_m * (((double) M_PI) * b))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (a * (angle_m * (Math.PI * b))));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * (0.011111111111111112 * (a * (angle_m * (math.pi * b))))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(a * Float64(angle_m * Float64(pi * b)))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * (0.011111111111111112 * (a * (angle_m * (pi * b))));
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(a * N[(angle$95$m * N[(Pi * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot b\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*49.1%

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutative49.1%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*49.1%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  3. Simplified49.1%

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. unpow249.1%

      \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. unpow249.1%

      \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    3. difference-of-squares53.1%

      \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  6. Applied egg-rr53.1%

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  7. Taylor expanded in angle around 0 50.2%

    \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
  8. Taylor expanded in b around 0 35.4%

    \[\leadsto \left(\color{blue}{a} \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
  9. Taylor expanded in a around 0 17.8%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)} \]
  10. Step-by-step derivation
    1. *-commutative17.8%

      \[\leadsto 0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot b\right)}\right)\right) \]
  11. Simplified17.8%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024137 
(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)))))