ab-angle->ABCF B

Percentage Accurate: 53.2% → 67.1%
Time: 17.3s
Alternatives: 16
Speedup: 32.2×

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

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

Initial Program: 53.2% accurate, 1.0× speedup?

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

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

Alternative 1: 67.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \left(b - a\right) \cdot \left(\sin \left(\left(\left(angle \cdot \sqrt{\pi}\right) \cdot \left({\left({\left(\pi \cdot \pi\right)}^{1.3333333333333333}\right)}^{0.16666666666666666} \cdot {\left(\sqrt[3]{\pi}\right)}^{0.16666666666666666}\right)\right) \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (*
  (- b a)
  (*
   (sin
    (*
     (*
      (* angle (sqrt PI))
      (*
       (pow (pow (* PI PI) 1.3333333333333333) 0.16666666666666666)
       (pow (cbrt PI) 0.16666666666666666)))
     0.011111111111111112))
   (+ b a))))
double code(double a, double b, double angle) {
	return (b - a) * (sin((((angle * sqrt(((double) M_PI))) * (pow(pow((((double) M_PI) * ((double) M_PI)), 1.3333333333333333), 0.16666666666666666) * pow(cbrt(((double) M_PI)), 0.16666666666666666))) * 0.011111111111111112)) * (b + a));
}
public static double code(double a, double b, double angle) {
	return (b - a) * (Math.sin((((angle * Math.sqrt(Math.PI)) * (Math.pow(Math.pow((Math.PI * Math.PI), 1.3333333333333333), 0.16666666666666666) * Math.pow(Math.cbrt(Math.PI), 0.16666666666666666))) * 0.011111111111111112)) * (b + a));
}
function code(a, b, angle)
	return Float64(Float64(b - a) * Float64(sin(Float64(Float64(Float64(angle * sqrt(pi)) * Float64(((Float64(pi * pi) ^ 1.3333333333333333) ^ 0.16666666666666666) * (cbrt(pi) ^ 0.16666666666666666))) * 0.011111111111111112)) * Float64(b + a)))
end
code[a_, b_, angle_] := N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(N[(N[(angle * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[N[(Pi * Pi), $MachinePrecision], 1.3333333333333333], $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(b - a\right) \cdot \left(\sin \left(\left(\left(angle \cdot \sqrt{\pi}\right) \cdot \left({\left({\left(\pi \cdot \pi\right)}^{1.3333333333333333}\right)}^{0.16666666666666666} \cdot {\left(\sqrt[3]{\pi}\right)}^{0.16666666666666666}\right)\right) \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right)
\end{array}
Derivation
  1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
    2. add-sqr-sqrtN/A

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

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

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

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

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

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

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

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

    \[\leadsto \left(b - a\right) \cdot \left(\sin \left(\color{blue}{\left(\left(angle \cdot \sqrt{\pi}\right) \cdot \sqrt{\pi}\right)} \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right) \]
  7. Step-by-step derivation
    1. pow1/2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \left({\mathsf{PI}\left(\right)}^{\frac{1}{2}}\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
    2. add-cbrt-cubeN/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{3} \cdot \frac{1}{2}\right)}\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
    7. add-cbrt-cubeN/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{*.f64}\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}\right)}^{\left(\frac{1}{3} \cdot \frac{1}{2}\right)}\right), \left({\left(\sqrt[3]{\mathsf{PI}\left(\right)}\right)}^{\left(\frac{1}{3} \cdot \frac{1}{2}\right)}\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
  8. Applied egg-rr68.9%

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

Alternative 2: 67.7% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.9499999999999999e225

    1. Initial program 47.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      2. pow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      5. PI-lowering-PI.f6466.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right), 2\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
    6. Applied egg-rr66.0%

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

    if 2.9499999999999999e225 < b

    1. Initial program 56.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
    7. Simplified95.0%

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

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

Alternative 3: 67.7% accurate, 3.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 2.4 \cdot 10^{+66}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(b + a\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 2.4e+66)
   (* (- b a) (* (+ b a) (sin (* 0.011111111111111112 (* angle PI)))))
   (* (- b a) (* (* angle PI) (* 0.011111111111111112 (+ b a))))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 2.4e+66) {
		tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (angle * ((double) M_PI)))));
	} else {
		tmp = (b - a) * ((angle * ((double) M_PI)) * (0.011111111111111112 * (b + a)));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 2.4e+66) {
		tmp = (b - a) * ((b + a) * Math.sin((0.011111111111111112 * (angle * Math.PI))));
	} else {
		tmp = (b - a) * ((angle * Math.PI) * (0.011111111111111112 * (b + a)));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if a <= 2.4e+66:
		tmp = (b - a) * ((b + a) * math.sin((0.011111111111111112 * (angle * math.pi))))
	else:
		tmp = (b - a) * ((angle * math.pi) * (0.011111111111111112 * (b + a)))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (a <= 2.4e+66)
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(angle * pi)))));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(angle * pi) * Float64(0.011111111111111112 * Float64(b + a))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 2.4e+66)
		tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (angle * pi))));
	else
		tmp = (b - a) * ((angle * pi) * (0.011111111111111112 * (b + a)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[a, 2.4e+66], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * N[(0.011111111111111112 * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4000000000000002e66 < a

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.6% accurate, 3.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 1.8 \cdot 10^{+75}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(b + a\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 1.8e+75)
   (* (- b a) (* (+ b a) (sin (* angle (* PI 0.011111111111111112)))))
   (* (- b a) (* (* angle PI) (* 0.011111111111111112 (+ b a))))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 1.8e+75) {
		tmp = (b - a) * ((b + a) * sin((angle * (((double) M_PI) * 0.011111111111111112))));
	} else {
		tmp = (b - a) * ((angle * ((double) M_PI)) * (0.011111111111111112 * (b + a)));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 1.8e+75) {
		tmp = (b - a) * ((b + a) * Math.sin((angle * (Math.PI * 0.011111111111111112))));
	} else {
		tmp = (b - a) * ((angle * Math.PI) * (0.011111111111111112 * (b + a)));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if a <= 1.8e+75:
		tmp = (b - a) * ((b + a) * math.sin((angle * (math.pi * 0.011111111111111112))))
	else:
		tmp = (b - a) * ((angle * math.pi) * (0.011111111111111112 * (b + a)))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (a <= 1.8e+75)
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(angle * Float64(pi * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(angle * pi) * Float64(0.011111111111111112 * Float64(b + a))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 1.8e+75)
		tmp = (b - a) * ((b + a) * sin((angle * (pi * 0.011111111111111112))));
	else
		tmp = (b - a) * ((angle * pi) * (0.011111111111111112 * (b + a)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[a, 1.8e+75], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * N[(0.011111111111111112 * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e75 < a

    1. Initial program 32.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 54.1% accurate, 3.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 3.4 \cdot 10^{-111}:\\ \;\;\;\;\left(b - a\right) \cdot \left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 3.4e-111)
   (* (- b a) (* b (sin (* PI (* angle 0.011111111111111112)))))
   (* (- b a) (* (* angle 0.011111111111111112) (* PI (+ b a))))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 3.4e-111) {
		tmp = (b - a) * (b * sin((((double) M_PI) * (angle * 0.011111111111111112))));
	} else {
		tmp = (b - a) * ((angle * 0.011111111111111112) * (((double) M_PI) * (b + a)));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 3.4e-111) {
		tmp = (b - a) * (b * Math.sin((Math.PI * (angle * 0.011111111111111112))));
	} else {
		tmp = (b - a) * ((angle * 0.011111111111111112) * (Math.PI * (b + a)));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if a <= 3.4e-111:
		tmp = (b - a) * (b * math.sin((math.pi * (angle * 0.011111111111111112))))
	else:
		tmp = (b - a) * ((angle * 0.011111111111111112) * (math.pi * (b + a)))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (a <= 3.4e-111)
		tmp = Float64(Float64(b - a) * Float64(b * sin(Float64(pi * Float64(angle * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b + a))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 3.4e-111)
		tmp = (b - a) * (b * sin((pi * (angle * 0.011111111111111112))));
	else
		tmp = (b - a) * ((angle * 0.011111111111111112) * (pi * (b + a)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[a, 3.4e-111], N[(N[(b - a), $MachinePrecision] * N[(b * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      2. add-sqr-sqrtN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      9. PI-lowering-PI.f6460.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
    6. Applied egg-rr60.2%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right), b\right)\right) \]
    9. Simplified49.0%

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

    if 3.39999999999999997e-111 < a

    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      2. add-sqr-sqrtN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      9. PI-lowering-PI.f6475.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 54.1% accurate, 3.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 4.6 \cdot 10^{-111}:\\ \;\;\;\;b \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 4.6e-111)
   (* b (* (+ b a) (sin (* 0.011111111111111112 (* angle PI)))))
   (* (- b a) (* (* angle 0.011111111111111112) (* PI (+ b a))))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 4.6e-111) {
		tmp = b * ((b + a) * sin((0.011111111111111112 * (angle * ((double) M_PI)))));
	} else {
		tmp = (b - a) * ((angle * 0.011111111111111112) * (((double) M_PI) * (b + a)));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 4.6e-111) {
		tmp = b * ((b + a) * Math.sin((0.011111111111111112 * (angle * Math.PI))));
	} else {
		tmp = (b - a) * ((angle * 0.011111111111111112) * (Math.PI * (b + a)));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if a <= 4.6e-111:
		tmp = b * ((b + a) * math.sin((0.011111111111111112 * (angle * math.pi))))
	else:
		tmp = (b - a) * ((angle * 0.011111111111111112) * (math.pi * (b + a)))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (a <= 4.6e-111)
		tmp = Float64(b * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(angle * pi)))));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b + a))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 4.6e-111)
		tmp = b * ((b + a) * sin((0.011111111111111112 * (angle * pi))));
	else
		tmp = (b - a) * ((angle * 0.011111111111111112) * (pi * (b + a)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[a, 4.6e-111], N[(b * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{b}, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
    6. Step-by-step derivation
      1. Simplified48.5%

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

      if 4.6e-111 < a

      1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        2. add-sqr-sqrtN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        9. PI-lowering-PI.f6475.7%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 49.7% accurate, 3.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 4.6 \cdot 10^{-111}:\\ \;\;\;\;\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= a 4.6e-111)
       (* (sin (* PI (* angle 0.011111111111111112))) (* b b))
       (* (- b a) (* (* angle 0.011111111111111112) (* PI (+ b a))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (a <= 4.6e-111) {
    		tmp = sin((((double) M_PI) * (angle * 0.011111111111111112))) * (b * b);
    	} else {
    		tmp = (b - a) * ((angle * 0.011111111111111112) * (((double) M_PI) * (b + a)));
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (a <= 4.6e-111) {
    		tmp = Math.sin((Math.PI * (angle * 0.011111111111111112))) * (b * b);
    	} else {
    		tmp = (b - a) * ((angle * 0.011111111111111112) * (Math.PI * (b + a)));
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if a <= 4.6e-111:
    		tmp = math.sin((math.pi * (angle * 0.011111111111111112))) * (b * b)
    	else:
    		tmp = (b - a) * ((angle * 0.011111111111111112) * (math.pi * (b + a)))
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (a <= 4.6e-111)
    		tmp = Float64(sin(Float64(pi * Float64(angle * 0.011111111111111112))) * Float64(b * b));
    	else
    		tmp = Float64(Float64(b - a) * Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b + a))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (a <= 4.6e-111)
    		tmp = sin((pi * (angle * 0.011111111111111112))) * (b * b);
    	else
    		tmp = (b - a) * ((angle * 0.011111111111111112) * (pi * (b + a)));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[a, 4.6e-111], N[(N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \leq 4.6 \cdot 10^{-111}:\\
    \;\;\;\;\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(b \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(b - a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 4.6e-111

      1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        2. add-sqr-sqrtN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        9. PI-lowering-PI.f6460.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      6. Applied egg-rr60.2%

        \[\leadsto \left(b - a\right) \cdot \left(\sin \left(\color{blue}{\left(\left(angle \cdot \sqrt{\pi}\right) \cdot \sqrt{\pi}\right)} \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right) \]
      7. 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)} \]
      8. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right) \]
      9. Simplified46.0%

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

      if 4.6e-111 < a

      1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        2. add-sqr-sqrtN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        9. PI-lowering-PI.f6475.7%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 49.9% accurate, 3.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 3.5 \cdot 10^{-111}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= a 3.5e-111)
       (* (* b b) (sin (* 0.011111111111111112 (* angle PI))))
       (* (- b a) (* (* angle 0.011111111111111112) (* PI (+ b a))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (a <= 3.5e-111) {
    		tmp = (b * b) * sin((0.011111111111111112 * (angle * ((double) M_PI))));
    	} else {
    		tmp = (b - a) * ((angle * 0.011111111111111112) * (((double) M_PI) * (b + a)));
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (a <= 3.5e-111) {
    		tmp = (b * b) * Math.sin((0.011111111111111112 * (angle * Math.PI)));
    	} else {
    		tmp = (b - a) * ((angle * 0.011111111111111112) * (Math.PI * (b + a)));
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if a <= 3.5e-111:
    		tmp = (b * b) * math.sin((0.011111111111111112 * (angle * math.pi)))
    	else:
    		tmp = (b - a) * ((angle * 0.011111111111111112) * (math.pi * (b + a)))
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (a <= 3.5e-111)
    		tmp = Float64(Float64(b * b) * sin(Float64(0.011111111111111112 * Float64(angle * pi))));
    	else
    		tmp = Float64(Float64(b - a) * Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b + a))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (a <= 3.5e-111)
    		tmp = (b * b) * sin((0.011111111111111112 * (angle * pi)));
    	else
    		tmp = (b - a) * ((angle * 0.011111111111111112) * (pi * (b + a)));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[a, 3.5e-111], N[(N[(b * b), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \leq 3.5 \cdot 10^{-111}:\\
    \;\;\;\;\left(b \cdot b\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(b - a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 3.5e-111

      1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.5e-111 < a

      1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        2. add-sqr-sqrtN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        9. PI-lowering-PI.f6475.7%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 48.9% accurate, 18.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.25 \cdot 10^{-65}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right)\right)\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{+138}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= b 1.25e-65)
       (* a (* a (* (* angle PI) -0.011111111111111112)))
       (if (<= b 8.5e+138)
         (* 0.011111111111111112 (* angle (* PI (- (* b b) (* a a)))))
         (* 0.011111111111111112 (* b (* PI (* b angle)))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 1.25e-65) {
    		tmp = a * (a * ((angle * ((double) M_PI)) * -0.011111111111111112));
    	} else if (b <= 8.5e+138) {
    		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b * b) - (a * a))));
    	} else {
    		tmp = 0.011111111111111112 * (b * (((double) M_PI) * (b * angle)));
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 1.25e-65) {
    		tmp = a * (a * ((angle * Math.PI) * -0.011111111111111112));
    	} else if (b <= 8.5e+138) {
    		tmp = 0.011111111111111112 * (angle * (Math.PI * ((b * b) - (a * a))));
    	} else {
    		tmp = 0.011111111111111112 * (b * (Math.PI * (b * angle)));
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if b <= 1.25e-65:
    		tmp = a * (a * ((angle * math.pi) * -0.011111111111111112))
    	elif b <= 8.5e+138:
    		tmp = 0.011111111111111112 * (angle * (math.pi * ((b * b) - (a * a))))
    	else:
    		tmp = 0.011111111111111112 * (b * (math.pi * (b * angle)))
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (b <= 1.25e-65)
    		tmp = Float64(a * Float64(a * Float64(Float64(angle * pi) * -0.011111111111111112)));
    	elseif (b <= 8.5e+138)
    		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b * b) - Float64(a * a)))));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(b * Float64(pi * Float64(b * angle))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (b <= 1.25e-65)
    		tmp = a * (a * ((angle * pi) * -0.011111111111111112));
    	elseif (b <= 8.5e+138)
    		tmp = 0.011111111111111112 * (angle * (pi * ((b * b) - (a * a))));
    	else
    		tmp = 0.011111111111111112 * (b * (pi * (b * angle)));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[b, 1.25e-65], N[(a * N[(a * N[(N[(angle * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e+138], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(Pi * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq 1.25 \cdot 10^{-65}:\\
    \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right)\right)\\
    
    \mathbf{elif}\;b \leq 8.5 \cdot 10^{+138}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < 1.24999999999999996e-65

      1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), \frac{-1}{90}\right)\right)\right) \]
        11. PI-lowering-PI.f6438.2%

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{-1}{90}\right)\right)\right) \]
      8. Simplified38.2%

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

      if 1.24999999999999996e-65 < b < 8.5000000000000006e138

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.5000000000000006e138 < b

      1. Initial program 43.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 46.5% accurate, 29.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.15 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot 0.011111111111111112\right) \cdot \left(b \cdot \left(b \cdot angle\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= b 2.15e+64)
       (* a (* a (* (* angle PI) -0.011111111111111112)))
       (* (* PI 0.011111111111111112) (* b (* b angle)))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 2.15e+64) {
    		tmp = a * (a * ((angle * ((double) M_PI)) * -0.011111111111111112));
    	} else {
    		tmp = (((double) M_PI) * 0.011111111111111112) * (b * (b * angle));
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 2.15e+64) {
    		tmp = a * (a * ((angle * Math.PI) * -0.011111111111111112));
    	} else {
    		tmp = (Math.PI * 0.011111111111111112) * (b * (b * angle));
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if b <= 2.15e+64:
    		tmp = a * (a * ((angle * math.pi) * -0.011111111111111112))
    	else:
    		tmp = (math.pi * 0.011111111111111112) * (b * (b * angle))
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (b <= 2.15e+64)
    		tmp = Float64(a * Float64(a * Float64(Float64(angle * pi) * -0.011111111111111112)));
    	else
    		tmp = Float64(Float64(pi * 0.011111111111111112) * Float64(b * Float64(b * angle)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (b <= 2.15e+64)
    		tmp = a * (a * ((angle * pi) * -0.011111111111111112));
    	else
    		tmp = (pi * 0.011111111111111112) * (b * (b * angle));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[b, 2.15e+64], N[(a * N[(a * N[(N[(angle * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * 0.011111111111111112), $MachinePrecision] * N[(b * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq 2.15 \cdot 10^{+64}:\\
    \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\pi \cdot 0.011111111111111112\right) \cdot \left(b \cdot \left(b \cdot angle\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 2.1499999999999999e64

      1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{-1}{90}\right)\right)\right) \]
      8. Simplified39.1%

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

      if 2.1499999999999999e64 < b

      1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. Simplified49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 46.5% accurate, 29.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.86 \cdot 10^{+62}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= b 1.86e+62)
       (* a (* a (* (* angle PI) -0.011111111111111112)))
       (* 0.011111111111111112 (* b (* PI (* b angle))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 1.86e+62) {
    		tmp = a * (a * ((angle * ((double) M_PI)) * -0.011111111111111112));
    	} else {
    		tmp = 0.011111111111111112 * (b * (((double) M_PI) * (b * angle)));
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 1.86e+62) {
    		tmp = a * (a * ((angle * Math.PI) * -0.011111111111111112));
    	} else {
    		tmp = 0.011111111111111112 * (b * (Math.PI * (b * angle)));
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if b <= 1.86e+62:
    		tmp = a * (a * ((angle * math.pi) * -0.011111111111111112))
    	else:
    		tmp = 0.011111111111111112 * (b * (math.pi * (b * angle)))
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (b <= 1.86e+62)
    		tmp = Float64(a * Float64(a * Float64(Float64(angle * pi) * -0.011111111111111112)));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(b * Float64(pi * Float64(b * angle))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (b <= 1.86e+62)
    		tmp = a * (a * ((angle * pi) * -0.011111111111111112));
    	else
    		tmp = 0.011111111111111112 * (b * (pi * (b * angle)));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[b, 1.86e+62], N[(a * N[(a * N[(N[(angle * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(Pi * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq 1.86 \cdot 10^{+62}:\\
    \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 1.85999999999999995e62

      1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{-1}{90}\right)\right)\right) \]
      8. Simplified39.1%

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

      if 1.85999999999999995e62 < b

      1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. Simplified49.9%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 43.4% accurate, 29.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.8 \cdot 10^{+62}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= b 1.8e+62)
       (* -0.011111111111111112 (* PI (* angle (* a a))))
       (* 0.011111111111111112 (* b (* PI (* b angle))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 1.8e+62) {
    		tmp = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
    	} else {
    		tmp = 0.011111111111111112 * (b * (((double) M_PI) * (b * angle)));
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 1.8e+62) {
    		tmp = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
    	} else {
    		tmp = 0.011111111111111112 * (b * (Math.PI * (b * angle)));
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if b <= 1.8e+62:
    		tmp = -0.011111111111111112 * (math.pi * (angle * (a * a)))
    	else:
    		tmp = 0.011111111111111112 * (b * (math.pi * (b * angle)))
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (b <= 1.8e+62)
    		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a))));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(b * Float64(pi * Float64(b * angle))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (b <= 1.8e+62)
    		tmp = -0.011111111111111112 * (pi * (angle * (a * a)));
    	else
    		tmp = 0.011111111111111112 * (b * (pi * (b * angle)));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[b, 1.8e+62], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(Pi * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq 1.8 \cdot 10^{+62}:\\
    \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 1.8e62

      1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\frac{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) - a \cdot \left(a \cdot \left(a \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right)}{\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b - a \cdot a\right)} \cdot \frac{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}{b \cdot \left(b \cdot \left(b \cdot b\right)\right) + \left(a \cdot a\right) \cdot \left(b \cdot b + a \cdot a\right)}\right)} \]
      8. 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)} \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
        7. PI-lowering-PI.f6434.7%

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified34.7%

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

      if 1.8e62 < b

      1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. Simplified49.9%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 43.4% accurate, 29.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 8.8 \cdot 10^{+61}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= b 8.8e+61)
       (* -0.011111111111111112 (* PI (* angle (* a a))))
       (* 0.011111111111111112 (* (* b angle) (* b PI)))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 8.8e+61) {
    		tmp = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
    	} else {
    		tmp = 0.011111111111111112 * ((b * angle) * (b * ((double) M_PI)));
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 8.8e+61) {
    		tmp = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
    	} else {
    		tmp = 0.011111111111111112 * ((b * angle) * (b * Math.PI));
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if b <= 8.8e+61:
    		tmp = -0.011111111111111112 * (math.pi * (angle * (a * a)))
    	else:
    		tmp = 0.011111111111111112 * ((b * angle) * (b * math.pi))
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (b <= 8.8e+61)
    		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a))));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(b * angle) * Float64(b * pi)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (b <= 8.8e+61)
    		tmp = -0.011111111111111112 * (pi * (angle * (a * a)));
    	else
    		tmp = 0.011111111111111112 * ((b * angle) * (b * pi));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[b, 8.8e+61], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b * angle), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq 8.8 \cdot 10^{+61}:\\
    \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 8.8000000000000001e61

      1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\frac{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) - a \cdot \left(a \cdot \left(a \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right)}{\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b - a \cdot a\right)} \cdot \frac{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}{b \cdot \left(b \cdot \left(b \cdot b\right)\right) + \left(a \cdot a\right) \cdot \left(b \cdot b + a \cdot a\right)}\right)} \]
      8. 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)} \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
        7. PI-lowering-PI.f6434.7%

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified34.7%

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

      if 8.8000000000000001e61 < b

      1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. Simplified49.9%

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 40.9% accurate, 29.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.7 \cdot 10^{+62}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= b 1.7e+62)
       (* -0.011111111111111112 (* PI (* angle (* a a))))
       (* 0.011111111111111112 (* PI (* angle (* b b))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 1.7e+62) {
    		tmp = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
    	} else {
    		tmp = 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (b <= 1.7e+62) {
    		tmp = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
    	} else {
    		tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if b <= 1.7e+62:
    		tmp = -0.011111111111111112 * (math.pi * (angle * (a * a)))
    	else:
    		tmp = 0.011111111111111112 * (math.pi * (angle * (b * b)))
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (b <= 1.7e+62)
    		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a))));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (b <= 1.7e+62)
    		tmp = -0.011111111111111112 * (pi * (angle * (a * a)));
    	else
    		tmp = 0.011111111111111112 * (pi * (angle * (b * b)));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[b, 1.7e+62], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq 1.7 \cdot 10^{+62}:\\
    \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 1.70000000000000007e62

      1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\frac{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) - a \cdot \left(a \cdot \left(a \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right)}{\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b - a \cdot a\right)} \cdot \frac{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}{b \cdot \left(b \cdot \left(b \cdot b\right)\right) + \left(a \cdot a\right) \cdot \left(b \cdot b + a \cdot a\right)}\right)} \]
      8. 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)} \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI}\left(\right)\right)\right) \]
        7. PI-lowering-PI.f6434.7%

          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified34.7%

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

      if 1.70000000000000007e62 < b

      1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. Simplified49.9%

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

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

    Alternative 15: 63.2% accurate, 32.2× speedup?

    \[\begin{array}{l} \\ \left(b - a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right) \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (* (- b a) (* (* angle 0.011111111111111112) (* PI (+ b a)))))
    double code(double a, double b, double angle) {
    	return (b - a) * ((angle * 0.011111111111111112) * (((double) M_PI) * (b + a)));
    }
    
    public static double code(double a, double b, double angle) {
    	return (b - a) * ((angle * 0.011111111111111112) * (Math.PI * (b + a)));
    }
    
    def code(a, b, angle):
    	return (b - a) * ((angle * 0.011111111111111112) * (math.pi * (b + a)))
    
    function code(a, b, angle)
    	return Float64(Float64(b - a) * Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b + a))))
    end
    
    function tmp = code(a, b, angle)
    	tmp = (b - a) * ((angle * 0.011111111111111112) * (pi * (b + a)));
    end
    
    code[a_, b_, angle_] := N[(N[(b - a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left(b - a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      2. add-sqr-sqrtN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 34.8% accurate, 46.6× speedup?

    \[\begin{array}{l} \\ -0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right) \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (* -0.011111111111111112 (* PI (* angle (* a a)))))
    double code(double a, double b, double angle) {
    	return -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
    }
    
    public static double code(double a, double b, double angle) {
    	return -0.011111111111111112 * (Math.PI * (angle * (a * a)));
    }
    
    def code(a, b, angle):
    	return -0.011111111111111112 * (math.pi * (angle * (a * a)))
    
    function code(a, b, angle)
    	return Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a))))
    end
    
    function tmp = code(a, b, angle)
    	tmp = -0.011111111111111112 * (pi * (angle * (a * a)));
    end
    
    code[a_, b_, angle_] := N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    -0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\frac{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) - a \cdot \left(a \cdot \left(a \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right)}{\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b - a \cdot a\right)} \cdot \frac{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}{b \cdot \left(b \cdot \left(b \cdot b\right)\right) + \left(a \cdot a\right) \cdot \left(b \cdot b + a \cdot a\right)}\right)} \]
    8. 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)} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), angle\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    10. Simplified29.8%

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

      \[\leadsto -0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right) \]
    12. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2024155 
    (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)))))