ab-angle->ABCF B

Percentage Accurate: 54.0% → 66.5%
Time: 17.0s
Alternatives: 20
Speedup: 10.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 54.0% accurate, 1.0× speedup?

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

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

Alternative 1: 66.5% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 53.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left({a}^{\left(\frac{1}{2}\right)}, {a}^{\left(\frac{1}{2}\right)}, b\right)} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. metadata-evalN/A

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\sqrt{a}}, {a}^{\left(\frac{1}{2}\right)}, b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, {a}^{\color{blue}{\frac{1}{2}}}, b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, \color{blue}{\sqrt{a}}, b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      10. lower-sqrt.f6432.9

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, \color{blue}{\sqrt{a}}, b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    7. Applied rewrites32.9%

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

    if 6.2000000000000001e250 < a

    1. Initial program 72.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. Applied rewrites66.7%

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\pi} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
      2. rem-square-sqrtN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 60.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+229}:\\
\;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot b\right)\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -9.99999999999999971e-305 or 2e229 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < +inf.0

    1. Initial program 50.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{90}\right)\right)}\right)\right) \]
    8. Applied rewrites68.1%

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

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

    1. Initial program 72.6%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites72.6%

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 0.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 59.6% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -9.99999999999999971e-305 or 4.9999999999999998e210 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < +inf.0

    1. Initial program 50.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. Applied rewrites65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{90}\right)\right)}\right)\right) \]
    8. Applied rewrites67.8%

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

    if -9.99999999999999971e-305 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 4.9999999999999998e210

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites45.9%

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 0.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 59.6% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -9.99999999999999971e-305 or 4.9999999999999998e210 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < +inf.0

    1. Initial program 50.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. Applied rewrites65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right) + \color{blue}{\left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) \cdot \left(b - a\right)}\right)\right) \]
    8. Applied rewrites67.8%

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

    if -9.99999999999999971e-305 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 4.9999999999999998e210

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites45.9%

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 0.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)\right)\\

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


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

    1. Initial program 61.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites66.1%

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

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

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

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

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

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

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

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

    if 4.9999999999999998e210 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < +inf.0

    1. Initial program 47.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites70.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{90}\right)\right)}\right)\right) \]
    8. Applied rewrites78.8%

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 0.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 66.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)\right)\\

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


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

    1. Initial program 60.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000006e263 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < +inf.0

    1. Initial program 49.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{90}\right)\right)}\right)\right) \]
    8. Applied rewrites82.0%

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 0.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 61.9% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
    8. Applied rewrites57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(a \cdot \frac{-1}{90}\right)}\right) \cdot a \]
      16. lower-*.f6468.6

        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(a \cdot -0.011111111111111112\right)}\right) \cdot a \]
    10. Applied rewrites68.6%

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

    if -5.00000000000000007e239 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e114

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}} \]
    7. Applied rewrites53.8%

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

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

    1. Initial program 35.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites36.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{90} \cdot angle\right)\right)} \cdot b\right) \cdot b \]
      10. lower-*.f6463.2

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

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

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(angle \cdot \frac{1}{90}\right)}\right) \cdot b\right) \cdot b \]
      13. lower-*.f6463.2

        \[\leadsto \left(\left(\pi \cdot \color{blue}{\left(angle \cdot 0.011111111111111112\right)}\right) \cdot b\right) \cdot b \]
    10. Applied rewrites63.2%

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

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

Alternative 8: 61.8% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
    8. Applied rewrites52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(a \cdot \frac{-1}{90}\right)}\right) \cdot a \]
      16. lower-*.f6466.0

        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(a \cdot -0.011111111111111112\right)}\right) \cdot a \]
    10. Applied rewrites66.0%

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

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

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites38.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\pi \cdot \color{blue}{\left(angle \cdot 0.011111111111111112\right)}\right) \cdot b\right) \cdot b \]
    10. Applied rewrites58.9%

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

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

Alternative 9: 61.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := {b}^{2} - {a\_m}^{2}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-264}:\\
\;\;\;\;a\_m \cdot \left(\left(\pi \cdot angle\right) \cdot \left(a\_m \cdot -0.011111111111111112\right)\right)\\

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

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


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

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
    8. Applied rewrites52.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(a \cdot \frac{-1}{90}\right)}\right) \cdot a \]
      16. lower-*.f6458.5

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

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

    if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 9.99999999999999983e72

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites61.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \cdot 0.011111111111111112 \]
    10. Applied rewrites61.3%

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

    if 9.99999999999999983e72 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites37.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\pi \cdot \color{blue}{\left(angle \cdot 0.011111111111111112\right)}\right) \cdot b\right) \cdot b \]
    10. Applied rewrites63.3%

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

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

Alternative 10: 61.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := {b}^{2} - {a\_m}^{2}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-264}:\\
\;\;\;\;a\_m \cdot \left(\left(\pi \cdot angle\right) \cdot \left(a\_m \cdot -0.011111111111111112\right)\right)\\

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

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


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

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
    8. Applied rewrites52.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right)} \]
      9. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{-1}{90} \cdot a\right)\right) \cdot a} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{-1}{90} \cdot a\right)\right) \cdot a} \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{-1}{90} \cdot a\right)\right)} \cdot a \]
      12. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\frac{-1}{90} \cdot a\right)\right) \cdot a \]
      13. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\frac{-1}{90} \cdot a\right)\right) \cdot a \]
      14. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\frac{-1}{90} \cdot a\right)\right) \cdot a \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(a \cdot \frac{-1}{90}\right)}\right) \cdot a \]
      16. lower-*.f6458.5

        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(a \cdot -0.011111111111111112\right)}\right) \cdot a \]
    10. Applied rewrites58.5%

      \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(a \cdot -0.011111111111111112\right)\right) \cdot a} \]

    if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 5.00000000000000045e24

    1. Initial program 65.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6461.6

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites61.6%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      8. lower-*.f6462.1

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites62.1%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)} \]

    if 5.00000000000000045e24 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 38.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6440.3

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites40.3%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      8. lower-*.f6438.1

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites38.1%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \]
      2. lift-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b \cdot b\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      4. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\frac{1}{90} \cdot angle\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)} \cdot \left(\frac{1}{90} \cdot angle\right) \]
      7. lift-*.f64N/A

        \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot \left(\frac{1}{90} \cdot angle\right) \]
      8. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right)} \cdot \left(\frac{1}{90} \cdot angle\right) \]
      9. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \left(b \cdot \left(\frac{1}{90} \cdot angle\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \left(b \cdot \left(\frac{1}{90} \cdot angle\right)\right)} \]
      11. *-commutativeN/A

        \[\leadsto \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(b \cdot \left(\frac{1}{90} \cdot angle\right)\right) \]
      12. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(b \cdot \left(\frac{1}{90} \cdot angle\right)\right) \]
      13. lower-*.f6462.7

        \[\leadsto \left(b \cdot \pi\right) \cdot \color{blue}{\left(b \cdot \left(0.011111111111111112 \cdot angle\right)\right)} \]
      14. lift-*.f64N/A

        \[\leadsto \left(b \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(b \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot \color{blue}{\left(angle \cdot \frac{1}{90}\right)}\right) \]
      16. lower-*.f6462.7

        \[\leadsto \left(b \cdot \pi\right) \cdot \left(b \cdot \color{blue}{\left(angle \cdot 0.011111111111111112\right)}\right) \]
    10. Applied rewrites62.7%

      \[\leadsto \color{blue}{\left(b \cdot \pi\right) \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification60.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;a \cdot \left(\left(\pi \cdot angle\right) \cdot \left(a \cdot -0.011111111111111112\right)\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{+24}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \pi\right) \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 61.7% accurate, 1.0× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := {b}^{2} - {a\_m}^{2}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-264}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+24}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \pi\right) \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (let* ((t_0 (- (pow b 2.0) (pow a_m 2.0))))
   (if (<= t_0 -1e-264)
     (* -0.011111111111111112 (* a_m (* a_m (* PI angle))))
     (if (<= t_0 5e+24)
       (* (* angle 0.011111111111111112) (* PI (* b b)))
       (* (* b PI) (* b (* angle 0.011111111111111112)))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double t_0 = pow(b, 2.0) - pow(a_m, 2.0);
	double tmp;
	if (t_0 <= -1e-264) {
		tmp = -0.011111111111111112 * (a_m * (a_m * (((double) M_PI) * angle)));
	} else if (t_0 <= 5e+24) {
		tmp = (angle * 0.011111111111111112) * (((double) M_PI) * (b * b));
	} else {
		tmp = (b * ((double) M_PI)) * (b * (angle * 0.011111111111111112));
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double t_0 = Math.pow(b, 2.0) - Math.pow(a_m, 2.0);
	double tmp;
	if (t_0 <= -1e-264) {
		tmp = -0.011111111111111112 * (a_m * (a_m * (Math.PI * angle)));
	} else if (t_0 <= 5e+24) {
		tmp = (angle * 0.011111111111111112) * (Math.PI * (b * b));
	} else {
		tmp = (b * Math.PI) * (b * (angle * 0.011111111111111112));
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	t_0 = math.pow(b, 2.0) - math.pow(a_m, 2.0)
	tmp = 0
	if t_0 <= -1e-264:
		tmp = -0.011111111111111112 * (a_m * (a_m * (math.pi * angle)))
	elif t_0 <= 5e+24:
		tmp = (angle * 0.011111111111111112) * (math.pi * (b * b))
	else:
		tmp = (b * math.pi) * (b * (angle * 0.011111111111111112))
	return tmp
a_m = abs(a)
function code(a_m, b, angle)
	t_0 = Float64((b ^ 2.0) - (a_m ^ 2.0))
	tmp = 0.0
	if (t_0 <= -1e-264)
		tmp = Float64(-0.011111111111111112 * Float64(a_m * Float64(a_m * Float64(pi * angle))));
	elseif (t_0 <= 5e+24)
		tmp = Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b * b)));
	else
		tmp = Float64(Float64(b * pi) * Float64(b * Float64(angle * 0.011111111111111112)));
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle)
	t_0 = (b ^ 2.0) - (a_m ^ 2.0);
	tmp = 0.0;
	if (t_0 <= -1e-264)
		tmp = -0.011111111111111112 * (a_m * (a_m * (pi * angle)));
	elseif (t_0 <= 5e+24)
		tmp = (angle * 0.011111111111111112) * (pi * (b * b));
	else
		tmp = (b * pi) * (b * (angle * 0.011111111111111112));
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-264], N[(-0.011111111111111112 * N[(a$95$m * N[(a$95$m * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+24], N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * Pi), $MachinePrecision] * N[(b * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := {b}^{2} - {a\_m}^{2}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-264}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \cdot \left(\pi \cdot angle\right)\right)\right)\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+24}:\\
\;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot \pi\right) \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e-264

    1. Initial program 64.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6452.6

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites52.6%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right)} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      4. unpow2N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      7. lower-PI.f6452.3

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
    8. Applied rewrites52.3%

      \[\leadsto \color{blue}{\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      2. lift-PI.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      4. associate-*l*N/A

        \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{90}} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{90}} \]
      7. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(a \cdot a\right)} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{90} \]
      8. associate-*l*N/A

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \frac{-1}{90} \]
      9. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \frac{-1}{90} \]
      10. lower-*.f6458.4

        \[\leadsto \left(a \cdot \color{blue}{\left(a \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot -0.011111111111111112 \]
      11. lift-*.f64N/A

        \[\leadsto \left(a \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \cdot \frac{-1}{90} \]
      12. *-commutativeN/A

        \[\leadsto \left(a \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \frac{-1}{90} \]
      13. lift-*.f6458.4

        \[\leadsto \left(a \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)\right) \cdot -0.011111111111111112 \]
    10. Applied rewrites58.4%

      \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right) \cdot -0.011111111111111112} \]

    if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 5.00000000000000045e24

    1. Initial program 65.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6461.6

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites61.6%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      8. lower-*.f6462.1

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites62.1%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)} \]

    if 5.00000000000000045e24 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 38.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6440.3

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites40.3%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      8. lower-*.f6438.1

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites38.1%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \]
      2. lift-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b \cdot b\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      4. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\frac{1}{90} \cdot angle\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)} \cdot \left(\frac{1}{90} \cdot angle\right) \]
      7. lift-*.f64N/A

        \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot \left(\frac{1}{90} \cdot angle\right) \]
      8. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right)} \cdot \left(\frac{1}{90} \cdot angle\right) \]
      9. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \left(b \cdot \left(\frac{1}{90} \cdot angle\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \left(b \cdot \left(\frac{1}{90} \cdot angle\right)\right)} \]
      11. *-commutativeN/A

        \[\leadsto \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(b \cdot \left(\frac{1}{90} \cdot angle\right)\right) \]
      12. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(b \cdot \left(\frac{1}{90} \cdot angle\right)\right) \]
      13. lower-*.f6462.7

        \[\leadsto \left(b \cdot \pi\right) \cdot \color{blue}{\left(b \cdot \left(0.011111111111111112 \cdot angle\right)\right)} \]
      14. lift-*.f64N/A

        \[\leadsto \left(b \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(b \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot \color{blue}{\left(angle \cdot \frac{1}{90}\right)}\right) \]
      16. lower-*.f6462.7

        \[\leadsto \left(b \cdot \pi\right) \cdot \left(b \cdot \color{blue}{\left(angle \cdot 0.011111111111111112\right)}\right) \]
    10. Applied rewrites62.7%

      \[\leadsto \color{blue}{\left(b \cdot \pi\right) \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification60.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{+24}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \pi\right) \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 66.5% accurate, 1.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;a\_m \leq 5.8 \cdot 10^{+250}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \left(\sqrt[3]{\sqrt{\pi}} \cdot {\left(\sqrt{\pi}\right)}^{1.6666666666666667}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= a_m 5.8e+250)
   (*
    (+ a_m b)
    (*
     (- b a_m)
     (sin
      (*
       0.011111111111111112
       (* angle (* (cbrt (sqrt PI)) (pow (sqrt PI) 1.6666666666666667)))))))
   (*
    (+ a_m b)
    (*
     (- b a_m)
     (sin
      (*
       0.011111111111111112
       (* angle (* (sqrt (* PI (sqrt PI))) (sqrt (sqrt PI))))))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if (a_m <= 5.8e+250) {
		tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (angle * (cbrt(sqrt(((double) M_PI))) * pow(sqrt(((double) M_PI)), 1.6666666666666667))))));
	} else {
		tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (angle * (sqrt((((double) M_PI) * sqrt(((double) M_PI)))) * sqrt(sqrt(((double) M_PI))))))));
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double tmp;
	if (a_m <= 5.8e+250) {
		tmp = (a_m + b) * ((b - a_m) * Math.sin((0.011111111111111112 * (angle * (Math.cbrt(Math.sqrt(Math.PI)) * Math.pow(Math.sqrt(Math.PI), 1.6666666666666667))))));
	} else {
		tmp = (a_m + b) * ((b - a_m) * Math.sin((0.011111111111111112 * (angle * (Math.sqrt((Math.PI * Math.sqrt(Math.PI))) * Math.sqrt(Math.sqrt(Math.PI)))))));
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if (a_m <= 5.8e+250)
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(0.011111111111111112 * Float64(angle * Float64(cbrt(sqrt(pi)) * (sqrt(pi) ^ 1.6666666666666667)))))));
	else
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(0.011111111111111112 * Float64(angle * Float64(sqrt(Float64(pi * sqrt(pi))) * sqrt(sqrt(pi))))))));
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 5.8e+250], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 1.6666666666666667], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle * N[(N[Sqrt[N[(Pi * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 5.8 \cdot 10^{+250}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \left(\sqrt[3]{\sqrt{\pi}} \cdot {\left(\sqrt{\pi}\right)}^{1.6666666666666667}\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 5.80000000000000018e250

    1. Initial program 53.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites68.6%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Step-by-step derivation
      1. add-cbrt-cubeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      2. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}^{\frac{1}{3}}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      3. add-sqr-sqrtN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}\right)}^{\frac{1}{3}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left({\color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. unpow-prod-downN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot {\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      6. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \color{blue}{\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      8. lower-pow.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      10. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      11. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      13. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      14. lower-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      15. lower-cbrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \color{blue}{\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      16. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      17. lower-sqrt.f6471.5

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\color{blue}{\sqrt{\pi}}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    5. Applied rewrites71.5%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\sqrt{\pi}}\right)} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    6. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      2. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      3. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      4. lift-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \mathsf{PI}\left(\right)\right)}}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. unpow-prod-downN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{\left({\left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{3}}\right)} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      10. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\color{blue}{\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{3}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      11. rem-square-sqrtN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\sqrt[3]{\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{3}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      12. lift-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\sqrt[3]{\left(\color{blue}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{3}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      13. lift-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\sqrt[3]{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{3}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      14. pow3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\sqrt[3]{\color{blue}{{\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{3}}} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{3}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      15. rem-cbrt-cubeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\color{blue}{\sqrt{\mathsf{PI}\left(\right)}} \cdot {\mathsf{PI}\left(\right)}^{\frac{1}{3}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      16. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \color{blue}{\sqrt[3]{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      17. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\color{blue}{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
    7. Applied rewrites71.5%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{\left(\sqrt{\pi} \cdot \sqrt[3]{\pi}\right)} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    8. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\sqrt{\color{blue}{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      2. pow1/2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left(\color{blue}{{\mathsf{PI}\left(\right)}^{\frac{1}{2}}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      3. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left({\mathsf{PI}\left(\right)}^{\frac{1}{2}} \cdot \sqrt[3]{\color{blue}{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      4. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\left({\mathsf{PI}\left(\right)}^{\frac{1}{2}} \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{\frac{1}{3}}}\right) \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. pow-prod-upN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\mathsf{PI}\left(\right)}^{\left(\frac{1}{2} + \frac{1}{3}\right)}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      6. unpow1N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\color{blue}{\left({\mathsf{PI}\left(\right)}^{1}\right)}}^{\left(\frac{1}{2} + \frac{1}{3}\right)} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left({\mathsf{PI}\left(\right)}^{\color{blue}{\left(\frac{2}{2}\right)}}\right)}^{\left(\frac{1}{2} + \frac{1}{3}\right)} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      8. sqrt-pow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\color{blue}{\left({\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{2}\right)}}^{\left(\frac{1}{2} + \frac{1}{3}\right)} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. lift-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left({\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)}\right)}}^{2}\right)}^{\left(\frac{1}{2} + \frac{1}{3}\right)} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      10. pow-powN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{\left(2 \cdot \left(\frac{1}{2} + \frac{1}{3}\right)\right)}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      11. lower-pow.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{\left(2 \cdot \left(\frac{1}{2} + \frac{1}{3}\right)\right)}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{\left(2 \cdot \color{blue}{\frac{5}{6}}\right)} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      13. metadata-eval71.5

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\sqrt{\pi}\right)}^{\color{blue}{1.6666666666666667}} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    9. Applied rewrites71.5%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\left(\sqrt{\pi}\right)}^{1.6666666666666667}} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]

    if 5.80000000000000018e250 < a

    1. Initial program 72.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. Applied rewrites66.7%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Step-by-step derivation
      1. lift-PI.f6466.7

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\pi} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
      2. rem-square-sqrtN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      3. sqrt-unprodN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\sqrt{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      4. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. add-sqr-sqrtN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\sqrt{\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      7. sqrt-prodN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. lower-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      10. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\sqrt{\color{blue}{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      11. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      12. lower-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      13. lower-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \color{blue}{\sqrt{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      14. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      15. lower-sqrt.f6488.9

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\color{blue}{\sqrt{\pi}}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    5. Applied rewrites88.9%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 5.8 \cdot 10^{+250}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \left(\sqrt[3]{\sqrt{\pi}} \cdot {\left(\sqrt{\pi}\right)}^{1.6666666666666667}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 66.3% accurate, 1.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{+41}:\\ \;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= (pow b 2.0) 4e+41)
   (* (- b a_m) (* (+ a_m b) (sin (* PI (* angle 0.011111111111111112)))))
   (*
    (+ a_m b)
    (*
     (- b a_m)
     (*
      angle
      (fma
       -2.2862368541380886e-7
       (* (* angle angle) (* PI (* PI PI)))
       (* PI 0.011111111111111112)))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if (pow(b, 2.0) <= 4e+41) {
		tmp = (b - a_m) * ((a_m + b) * sin((((double) M_PI) * (angle * 0.011111111111111112))));
	} else {
		tmp = (a_m + b) * ((b - a_m) * (angle * fma(-2.2862368541380886e-7, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.011111111111111112))));
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if ((b ^ 2.0) <= 4e+41)
		tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * sin(Float64(pi * Float64(angle * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(angle * fma(-2.2862368541380886e-7, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.011111111111111112)))));
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 4e+41], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(angle * N[(-2.2862368541380886e-7 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{+41}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \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)) < 4.00000000000000002e41

    1. Initial program 62.7%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites65.7%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(b + a\right)} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      2. lift--.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      3. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)}\right) \]
      6. lift-sin.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)}\right) \]
      7. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)} \]
      8. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)} \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right) \]
      9. associate-*l*N/A

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right)} \]
      11. lower-*.f6465.7

        \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
      12. lift-*.f64N/A

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)}\right) \]
      13. lift-*.f64N/A

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
      14. associate-*l*N/A

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{90}\right)\right)}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot angle\right)}\right)\right) \]
      16. lower-*.f64N/A

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{90} \cdot angle\right)\right)}\right) \]
      17. *-commutativeN/A

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(angle \cdot \frac{1}{90}\right)}\right)\right) \]
      18. lower-*.f6465.9

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(angle \cdot 0.011111111111111112\right)}\right)\right) \]
    5. Applied rewrites65.9%

      \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)} \]

    if 4.00000000000000002e41 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 45.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites71.5%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Taylor expanded in angle around 0

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{4374000}, {angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{{angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      6. cube-multN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      9. lower-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      12. lower-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      13. lower-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      14. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
      15. lower-PI.f6476.8

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
    6. Applied rewrites76.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{+41}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 66.1% accurate, 1.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+81}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= (pow b 2.0) 2e+81)
   (* (+ a_m b) (* (- b a_m) (sin (* 0.011111111111111112 (* PI angle)))))
   (*
    (+ a_m b)
    (*
     (- b a_m)
     (*
      angle
      (fma
       -2.2862368541380886e-7
       (* (* angle angle) (* PI (* PI PI)))
       (* PI 0.011111111111111112)))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if (pow(b, 2.0) <= 2e+81) {
		tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
	} else {
		tmp = (a_m + b) * ((b - a_m) * (angle * fma(-2.2862368541380886e-7, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.011111111111111112))));
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if ((b ^ 2.0) <= 2e+81)
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(0.011111111111111112 * Float64(pi * angle)))));
	else
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(angle * fma(-2.2862368541380886e-7, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.011111111111111112)))));
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 2e+81], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(angle * N[(-2.2862368541380886e-7 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+81}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \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)) < 1.99999999999999984e81

    1. Initial program 63.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites68.1%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]

    if 1.99999999999999984e81 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 41.8%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites68.9%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Taylor expanded in angle around 0

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{4374000}, {angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{{angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      6. cube-multN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      9. lower-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      12. lower-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      13. lower-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      14. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
      15. lower-PI.f6474.7

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
    6. Applied rewrites74.7%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+81}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 64.6% accurate, 1.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{-116}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(-a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= (pow b 2.0) 4e-116)
   (* (+ a_m b) (* (sin (* 0.011111111111111112 (* PI angle))) (- a_m)))
   (*
    (+ a_m b)
    (*
     (- b a_m)
     (*
      angle
      (*
       PI
       (fma
        (* -2.2862368541380886e-7 (* angle angle))
        (* PI PI)
        0.011111111111111112)))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if (pow(b, 2.0) <= 4e-116) {
		tmp = (a_m + b) * (sin((0.011111111111111112 * (((double) M_PI) * angle))) * -a_m);
	} else {
		tmp = (a_m + b) * ((b - a_m) * (angle * (((double) M_PI) * fma((-2.2862368541380886e-7 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 0.011111111111111112))));
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if ((b ^ 2.0) <= 4e-116)
		tmp = Float64(Float64(a_m + b) * Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle))) * Float64(-a_m)));
	else
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(angle * Float64(pi * fma(Float64(-2.2862368541380886e-7 * Float64(angle * angle)), Float64(pi * pi), 0.011111111111111112)))));
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 4e-116], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-a$95$m)), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(angle * N[(Pi * N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{-116}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(-a\_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 4e-116

    1. Initial program 63.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites65.5%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Taylor expanded in b around 0

      \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(-1 \cdot \left(a \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(a \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a}\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right)} \]
      4. mul-1-negN/A

        \[\leadsto \left(b + a\right) \cdot \left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(-1 \cdot a\right)\right)} \]
      6. lower-sin.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(-1 \cdot a\right)\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\sin \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(-1 \cdot a\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left(-1 \cdot a\right)\right) \]
      9. lower-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left(-1 \cdot a\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(b + a\right) \cdot \left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
      11. lower-neg.f6464.4

        \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\left(-a\right)}\right) \]
    6. Applied rewrites64.4%

      \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-a\right)\right)} \]

    if 4e-116 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 47.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Applied rewrites71.0%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Step-by-step derivation
      1. add-cbrt-cubeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      2. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}^{\frac{1}{3}}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      3. add-sqr-sqrtN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}\right)}^{\frac{1}{3}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left({\color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. unpow-prod-downN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot {\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      6. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \color{blue}{\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      8. lower-pow.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      10. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      11. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      13. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      14. lower-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      15. lower-cbrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \color{blue}{\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      16. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      17. lower-sqrt.f6479.0

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\color{blue}{\sqrt{\pi}}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    5. Applied rewrites79.0%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\sqrt{\pi}}\right)} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    6. Taylor expanded in angle around 0

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right)}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \frac{-1}{4374000} \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{3} \cdot {angle}^{2}\right)}\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \color{blue}{\left(\frac{-1}{4374000} \cdot {\mathsf{PI}\left(\right)}^{3}\right) \cdot {angle}^{2}}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \left(\frac{-1}{4374000} \cdot {\mathsf{PI}\left(\right)}^{3}\right) \cdot {angle}^{2}\right)\right)}\right) \]
      5. +-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\left(\frac{-1}{4374000} \cdot {\mathsf{PI}\left(\right)}^{3}\right) \cdot {angle}^{2} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\color{blue}{\frac{-1}{4374000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot {angle}^{2}\right)} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{-1}{4374000} \cdot \color{blue}{\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\color{blue}{\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{3}} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      9. unpow3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot \left(\color{blue}{{\mathsf{PI}\left(\right)}^{2}} \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      11. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\color{blue}{\left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \mathsf{PI}\left(\right)} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      12. distribute-rgt-outN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{90}\right)\right)}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{90}\right)\right)}\right)\right) \]
    8. Applied rewrites75.1%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{-116}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 56.9% accurate, 2.0× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= (- (pow b 2.0) (pow a_m 2.0)) -1e-264)
   (* -0.011111111111111112 (* a_m (* a_m (* PI angle))))
   (* (* angle 0.011111111111111112) (* PI (* b b)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -1e-264) {
		tmp = -0.011111111111111112 * (a_m * (a_m * (((double) M_PI) * angle)));
	} else {
		tmp = (angle * 0.011111111111111112) * (((double) M_PI) * (b * b));
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double tmp;
	if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -1e-264) {
		tmp = -0.011111111111111112 * (a_m * (a_m * (Math.PI * angle)));
	} else {
		tmp = (angle * 0.011111111111111112) * (Math.PI * (b * b));
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	tmp = 0
	if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -1e-264:
		tmp = -0.011111111111111112 * (a_m * (a_m * (math.pi * angle)))
	else:
		tmp = (angle * 0.011111111111111112) * (math.pi * (b * b))
	return tmp
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -1e-264)
		tmp = Float64(-0.011111111111111112 * Float64(a_m * Float64(a_m * Float64(pi * angle))));
	else
		tmp = Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b * b)));
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle)
	tmp = 0.0;
	if (((b ^ 2.0) - (a_m ^ 2.0)) <= -1e-264)
		tmp = -0.011111111111111112 * (a_m * (a_m * (pi * angle)));
	else
		tmp = (angle * 0.011111111111111112) * (pi * (b * b));
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -1e-264], N[(-0.011111111111111112 * N[(a$95$m * N[(a$95$m * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -1 \cdot 10^{-264}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \cdot \left(\pi \cdot angle\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e-264

    1. Initial program 64.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6452.6

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites52.6%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right)} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      4. unpow2N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      7. lower-PI.f6452.3

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
    8. Applied rewrites52.3%

      \[\leadsto \color{blue}{\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      2. lift-PI.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      4. associate-*l*N/A

        \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{90}} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{90}} \]
      7. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(a \cdot a\right)} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{90} \]
      8. associate-*l*N/A

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \frac{-1}{90} \]
      9. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \frac{-1}{90} \]
      10. lower-*.f6458.4

        \[\leadsto \left(a \cdot \color{blue}{\left(a \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot -0.011111111111111112 \]
      11. lift-*.f64N/A

        \[\leadsto \left(a \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \cdot \frac{-1}{90} \]
      12. *-commutativeN/A

        \[\leadsto \left(a \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \frac{-1}{90} \]
      13. lift-*.f6458.4

        \[\leadsto \left(a \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)\right) \cdot -0.011111111111111112 \]
    10. Applied rewrites58.4%

      \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right) \cdot -0.011111111111111112} \]

    if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 45.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6446.4

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites46.4%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      8. lower-*.f6445.0

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites45.0%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 52.7% accurate, 2.0× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= (- (pow b 2.0) (pow a_m 2.0)) -1e-264)
   (* (* PI angle) (* (* a_m a_m) -0.011111111111111112))
   (* (* angle 0.011111111111111112) (* PI (* b b)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -1e-264) {
		tmp = (((double) M_PI) * angle) * ((a_m * a_m) * -0.011111111111111112);
	} else {
		tmp = (angle * 0.011111111111111112) * (((double) M_PI) * (b * b));
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double tmp;
	if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -1e-264) {
		tmp = (Math.PI * angle) * ((a_m * a_m) * -0.011111111111111112);
	} else {
		tmp = (angle * 0.011111111111111112) * (Math.PI * (b * b));
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	tmp = 0
	if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -1e-264:
		tmp = (math.pi * angle) * ((a_m * a_m) * -0.011111111111111112)
	else:
		tmp = (angle * 0.011111111111111112) * (math.pi * (b * b))
	return tmp
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -1e-264)
		tmp = Float64(Float64(pi * angle) * Float64(Float64(a_m * a_m) * -0.011111111111111112));
	else
		tmp = Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b * b)));
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle)
	tmp = 0.0;
	if (((b ^ 2.0) - (a_m ^ 2.0)) <= -1e-264)
		tmp = (pi * angle) * ((a_m * a_m) * -0.011111111111111112);
	else
		tmp = (angle * 0.011111111111111112) * (pi * (b * b));
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -1e-264], N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a$95$m * a$95$m), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -1 \cdot 10^{-264}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right)\\

\mathbf{else}:\\
\;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e-264

    1. Initial program 64.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6452.6

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites52.6%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right)} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      4. unpow2N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
      7. lower-PI.f6452.3

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
    8. Applied rewrites52.3%

      \[\leadsto \color{blue}{\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)} \]

    if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 45.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6446.4

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites46.4%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)} \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      8. lower-*.f6445.0

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    8. Applied rewrites45.0%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 49.7% accurate, 3.5× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 6.5 \cdot 10^{-168}:\\ \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(a\_m \cdot \left(-a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= b 6.5e-168)
   (* (sin (* 0.011111111111111112 (* PI angle))) (* a_m (- a_m)))
   (*
    (+ a_m b)
    (*
     (- b a_m)
     (*
      angle
      (*
       PI
       (fma
        (* -2.2862368541380886e-7 (* angle angle))
        (* PI PI)
        0.011111111111111112)))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if (b <= 6.5e-168) {
		tmp = sin((0.011111111111111112 * (((double) M_PI) * angle))) * (a_m * -a_m);
	} else {
		tmp = (a_m + b) * ((b - a_m) * (angle * (((double) M_PI) * fma((-2.2862368541380886e-7 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 0.011111111111111112))));
	}
	return tmp;
}
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if (b <= 6.5e-168)
		tmp = Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle))) * Float64(a_m * Float64(-a_m)));
	else
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(angle * Float64(pi * fma(Float64(-2.2862368541380886e-7 * Float64(angle * angle)), Float64(pi * pi), 0.011111111111111112)))));
	end
	return tmp
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[b, 6.5e-168], N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a$95$m * (-a$95$m)), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(angle * N[(Pi * N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;b \leq 6.5 \cdot 10^{-168}:\\
\;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(a\_m \cdot \left(-a\_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 6.4999999999999997e-168

    1. Initial program 58.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. Applied rewrites70.3%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Taylor expanded in b around 0

      \[\leadsto \color{blue}{-1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      2. lower-neg.f64N/A

        \[\leadsto \color{blue}{\mathsf{neg}\left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{{a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(a \cdot a\right)} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(a \cdot a\right)} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      6. lower-sin.f64N/A

        \[\leadsto \mathsf{neg}\left(\left(a \cdot a\right) \cdot \color{blue}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{neg}\left(\left(a \cdot a\right) \cdot \sin \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{neg}\left(\left(a \cdot a\right) \cdot \sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      9. lower-PI.f6446.2

        \[\leadsto -\left(a \cdot a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
    6. Applied rewrites46.2%

      \[\leadsto \color{blue}{-\left(a \cdot a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]

    if 6.4999999999999997e-168 < b

    1. Initial program 47.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. Applied rewrites65.5%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Step-by-step derivation
      1. add-cbrt-cubeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      2. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}^{\frac{1}{3}}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      3. add-sqr-sqrtN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}\right)}^{\frac{1}{3}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left({\color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. unpow-prod-downN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot {\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      6. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \color{blue}{\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      8. lower-pow.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      10. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      11. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      13. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      14. lower-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      15. lower-cbrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \color{blue}{\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      16. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      17. lower-sqrt.f6472.3

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\color{blue}{\sqrt{\pi}}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    5. Applied rewrites72.3%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\sqrt{\pi}}\right)} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    6. Taylor expanded in angle around 0

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right)}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \frac{-1}{4374000} \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{3} \cdot {angle}^{2}\right)}\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \color{blue}{\left(\frac{-1}{4374000} \cdot {\mathsf{PI}\left(\right)}^{3}\right) \cdot {angle}^{2}}\right)\right)\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \left(\frac{-1}{4374000} \cdot {\mathsf{PI}\left(\right)}^{3}\right) \cdot {angle}^{2}\right)\right)}\right) \]
      5. +-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\left(\frac{-1}{4374000} \cdot {\mathsf{PI}\left(\right)}^{3}\right) \cdot {angle}^{2} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\color{blue}{\frac{-1}{4374000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot {angle}^{2}\right)} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{-1}{4374000} \cdot \color{blue}{\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\color{blue}{\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{3}} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      9. unpow3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot \left(\color{blue}{{\mathsf{PI}\left(\right)}^{2}} \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      11. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\color{blue}{\left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \mathsf{PI}\left(\right)} + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      12. distribute-rgt-outN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{90}\right)\right)}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{4374000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{90}\right)\right)}\right)\right) \]
    8. Applied rewrites72.2%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.5 \cdot 10^{-168}:\\ \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(a \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 0.011111111111111112\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 62.3% accurate, 10.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 1.2 \cdot 10^{+122}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(a\_m \cdot \left(a\_m + b\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (if (<= (/ angle 180.0) 1.2e+122)
   (* (+ a_m b) (* 0.011111111111111112 (* angle (* (- b a_m) PI))))
   (- (* (* 0.011111111111111112 (* PI angle)) (* a_m (+ a_m b))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double tmp;
	if ((angle / 180.0) <= 1.2e+122) {
		tmp = (a_m + b) * (0.011111111111111112 * (angle * ((b - a_m) * ((double) M_PI))));
	} else {
		tmp = -((0.011111111111111112 * (((double) M_PI) * angle)) * (a_m * (a_m + b)));
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double tmp;
	if ((angle / 180.0) <= 1.2e+122) {
		tmp = (a_m + b) * (0.011111111111111112 * (angle * ((b - a_m) * Math.PI)));
	} else {
		tmp = -((0.011111111111111112 * (Math.PI * angle)) * (a_m * (a_m + b)));
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	tmp = 0
	if (angle / 180.0) <= 1.2e+122:
		tmp = (a_m + b) * (0.011111111111111112 * (angle * ((b - a_m) * math.pi)))
	else:
		tmp = -((0.011111111111111112 * (math.pi * angle)) * (a_m * (a_m + b)))
	return tmp
a_m = abs(a)
function code(a_m, b, angle)
	tmp = 0.0
	if (Float64(angle / 180.0) <= 1.2e+122)
		tmp = Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a_m) * pi))));
	else
		tmp = Float64(-Float64(Float64(0.011111111111111112 * Float64(pi * angle)) * Float64(a_m * Float64(a_m + b))));
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle)
	tmp = 0.0;
	if ((angle / 180.0) <= 1.2e+122)
		tmp = (a_m + b) * (0.011111111111111112 * (angle * ((b - a_m) * pi)));
	else
		tmp = -((0.011111111111111112 * (pi * angle)) * (a_m * (a_m + b)));
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1.2e+122], N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision] * N[(a$95$m * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 1.2 \cdot 10^{+122}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;-\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(a\_m \cdot \left(a\_m + b\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 1.2000000000000001e122

    1. Initial program 61.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. Applied rewrites77.4%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    4. Step-by-step derivation
      1. add-cbrt-cubeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      2. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}^{\frac{1}{3}}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      3. add-sqr-sqrtN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}\right)}^{\frac{1}{3}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left({\color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. unpow-prod-downN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot {\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      6. pow1/3N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \color{blue}{\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)} \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      8. lower-pow.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      10. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      11. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      13. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      14. lower-sqrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      15. lower-cbrt.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \color{blue}{\sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      16. lift-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      17. lower-sqrt.f6478.6

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\color{blue}{\sqrt{\pi}}}\right) \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    5. Applied rewrites78.6%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\color{blue}{\left({\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\sqrt{\pi}}\right)} \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    6. Taylor expanded in angle around 0

      \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
      4. lower-PI.f64N/A

        \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b - a\right)\right)\right)\right) \]
      5. lower--.f6470.4

        \[\leadsto \left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
    8. Applied rewrites70.4%

      \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]

    if 1.2000000000000001e122 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 26.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      6. lower-PI.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      9. difference-of-squaresN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      12. lower--.f6415.4

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites15.4%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around 0

      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
      2. lower-neg.f6420.2

        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(-a\right)}\right) \]
    8. Applied rewrites20.2%

      \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(-a\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 1.2 \cdot 10^{+122}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(a \cdot \left(a + b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 35.6% accurate, 21.6× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \left(\pi \cdot angle\right) \cdot \left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right) \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (* (* PI angle) (* (* a_m a_m) -0.011111111111111112)))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	return (((double) M_PI) * angle) * ((a_m * a_m) * -0.011111111111111112);
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	return (Math.PI * angle) * ((a_m * a_m) * -0.011111111111111112);
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	return (math.pi * angle) * ((a_m * a_m) * -0.011111111111111112)
a_m = abs(a)
function code(a_m, b, angle)
	return Float64(Float64(pi * angle) * Float64(Float64(a_m * a_m) * -0.011111111111111112))
end
a_m = abs(a);
function tmp = code(a_m, b, angle)
	tmp = (pi * angle) * ((a_m * a_m) * -0.011111111111111112);
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a$95$m * a$95$m), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|

\\
\left(\pi \cdot angle\right) \cdot \left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right)
\end{array}
Derivation
  1. Initial program 54.4%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Add Preprocessing
  3. Taylor expanded in angle around 0

    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
  4. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
    2. associate-*r*N/A

      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
    3. lower-*.f64N/A

      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
    4. lower-*.f64N/A

      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
    5. lower-*.f64N/A

      \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
    6. lower-PI.f64N/A

      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
    7. unpow2N/A

      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
    8. unpow2N/A

      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
    9. difference-of-squaresN/A

      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    10. lower-*.f64N/A

      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    11. lower-+.f64N/A

      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
    12. lower--.f6449.3

      \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
  5. Applied rewrites49.3%

    \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
  6. Taylor expanded in b around 0

    \[\leadsto \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
  7. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
    2. lower-*.f64N/A

      \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
    3. lower-*.f64N/A

      \[\leadsto \color{blue}{\left(\frac{-1}{90} \cdot {a}^{2}\right)} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
    4. unpow2N/A

      \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
    5. lower-*.f64N/A

      \[\leadsto \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
    6. lower-*.f64N/A

      \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
    7. lower-PI.f6435.4

      \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
  8. Applied rewrites35.4%

    \[\leadsto \color{blue}{\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)} \]
  9. Final simplification35.4%

    \[\leadsto \left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024219 
(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)))))