ab-angle->ABCF B

Percentage Accurate: 54.0% → 67.0%
Time: 38.6s
Alternatives: 15
Speedup: 5.5×

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

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

Initial Program: 54.0% accurate, 1.0× speedup?

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

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

Alternative 1: 67.0% accurate, 1.2× speedup?

\[\begin{array}{l} a = |a|\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 3.7 \cdot 10^{+247}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi} \cdot \frac{1}{angle}}\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\sqrt{\pi} \cdot \sqrt{\pi}}{180}\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= a 3.7e+247)
   (*
    (*
     (- b a)
     (sin (* 2.0 (/ 0.005555555555555556 (* (/ 1.0 PI) (/ 1.0 angle))))))
    (+ a b))
   (*
    (- b a)
    (* (+ a b) (* 2.0 (sin (* angle (/ (* (sqrt PI) (sqrt PI)) 180.0))))))))
a = abs(a);
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 3.7e+247) {
		tmp = ((b - a) * sin((2.0 * (0.005555555555555556 / ((1.0 / ((double) M_PI)) * (1.0 / angle)))))) * (a + b);
	} else {
		tmp = (b - a) * ((a + b) * (2.0 * sin((angle * ((sqrt(((double) M_PI)) * sqrt(((double) M_PI))) / 180.0)))));
	}
	return tmp;
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 3.7e+247) {
		tmp = ((b - a) * Math.sin((2.0 * (0.005555555555555556 / ((1.0 / Math.PI) * (1.0 / angle)))))) * (a + b);
	} else {
		tmp = (b - a) * ((a + b) * (2.0 * Math.sin((angle * ((Math.sqrt(Math.PI) * Math.sqrt(Math.PI)) / 180.0)))));
	}
	return tmp;
}
a = abs(a)
def code(a, b, angle):
	tmp = 0
	if a <= 3.7e+247:
		tmp = ((b - a) * math.sin((2.0 * (0.005555555555555556 / ((1.0 / math.pi) * (1.0 / angle)))))) * (a + b)
	else:
		tmp = (b - a) * ((a + b) * (2.0 * math.sin((angle * ((math.sqrt(math.pi) * math.sqrt(math.pi)) / 180.0)))))
	return tmp
a = abs(a)
function code(a, b, angle)
	tmp = 0.0
	if (a <= 3.7e+247)
		tmp = Float64(Float64(Float64(b - a) * sin(Float64(2.0 * Float64(0.005555555555555556 / Float64(Float64(1.0 / pi) * Float64(1.0 / angle)))))) * Float64(a + b));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(a + b) * Float64(2.0 * sin(Float64(angle * Float64(Float64(sqrt(pi) * sqrt(pi)) / 180.0))))));
	end
	return tmp
end
a = abs(a)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 3.7e+247)
		tmp = ((b - a) * sin((2.0 * (0.005555555555555556 / ((1.0 / pi) * (1.0 / angle)))))) * (a + b);
	else
		tmp = (b - a) * ((a + b) * (2.0 * sin((angle * ((sqrt(pi) * sqrt(pi)) / 180.0)))));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[a, 3.7e+247], N[(N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 / N[(N[(1.0 / Pi), $MachinePrecision] * N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[(2.0 * N[Sin[N[(angle * N[(N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.7 \cdot 10^{+247}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi} \cdot \frac{1}{angle}}\right)\right) \cdot \left(a + b\right)\\

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


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

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(b + \left(-\left(-a\right)\right)\right)}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      10. remove-double-neg58.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
      2. /-rgt-identity68.5%

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)} \]
    8. Step-by-step derivation
      1. *-commutative68.5%

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

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \left(b + a\right) \]
      4. associate-/r/65.6%

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

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\frac{\frac{1}{180}}{\frac{1}{angle \cdot \pi}}}\right)\right) \cdot \left(b + a\right) \]
      7. metadata-eval69.0%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{\color{blue}{0.005555555555555556}}{\frac{1}{angle \cdot \pi}}\right)\right) \cdot \left(b + a\right) \]
      8. *-commutative69.0%

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\frac{0.005555555555555556}{\frac{\frac{1}{\pi}}{angle}}}\right)\right) \cdot \left(b + a\right) \]
    10. Step-by-step derivation
      1. div-inv69.8%

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

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

    if 3.6999999999999998e247 < a

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{1}\right) \]
    5. Step-by-step derivation
      1. log1p-expm1-u_binary6447.4%

        \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot 1\right)\right)\right)} \]
    6. Applied rewrite-once47.4%

      \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot 1\right)\right)\right)} \]
    7. Step-by-step derivation
      1. log1p-expm147.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.7 \cdot 10^{+247}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi} \cdot \frac{1}{angle}}\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\sqrt{\pi} \cdot \sqrt{\pi}}{180}\right)\right)\right)\\ \end{array} \]

Alternative 2: 67.2% accurate, 2.8× speedup?

\[\begin{array}{l} a = |a|\\ \\ \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi} \cdot \frac{1}{angle}}\right)\right) \cdot \left(a + b\right) \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (*
  (*
   (- b a)
   (sin (* 2.0 (/ 0.005555555555555556 (* (/ 1.0 PI) (/ 1.0 angle))))))
  (+ a b)))
a = abs(a);
double code(double a, double b, double angle) {
	return ((b - a) * sin((2.0 * (0.005555555555555556 / ((1.0 / ((double) M_PI)) * (1.0 / angle)))))) * (a + b);
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	return ((b - a) * Math.sin((2.0 * (0.005555555555555556 / ((1.0 / Math.PI) * (1.0 / angle)))))) * (a + b);
}
a = abs(a)
def code(a, b, angle):
	return ((b - a) * math.sin((2.0 * (0.005555555555555556 / ((1.0 / math.pi) * (1.0 / angle)))))) * (a + b)
a = abs(a)
function code(a, b, angle)
	return Float64(Float64(Float64(b - a) * sin(Float64(2.0 * Float64(0.005555555555555556 / Float64(Float64(1.0 / pi) * Float64(1.0 / angle)))))) * Float64(a + b))
end
a = abs(a)
function tmp = code(a, b, angle)
	tmp = ((b - a) * sin((2.0 * (0.005555555555555556 / ((1.0 / pi) * (1.0 / angle)))))) * (a + b);
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := N[(N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 / N[(N[(1.0 / Pi), $MachinePrecision] * N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
\\
\left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi} \cdot \frac{1}{angle}}\right)\right) \cdot \left(a + b\right)
\end{array}
Derivation
  1. Initial program 53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
    2. /-rgt-identity68.4%

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)} \]
  8. Step-by-step derivation
    1. *-commutative68.4%

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \left(b + a\right) \]
    4. associate-/r/65.6%

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

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

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

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{\frac{1}{\pi}}{angle}}}\right)\right) \cdot \left(b + a\right) \]
  9. Applied egg-rr69.7%

    \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\frac{0.005555555555555556}{\frac{\frac{1}{\pi}}{angle}}}\right)\right) \cdot \left(b + a\right) \]
  10. Step-by-step derivation
    1. div-inv70.0%

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{1}{\pi} \cdot \frac{1}{angle}}}\right)\right) \cdot \left(b + a\right) \]
  11. Applied egg-rr70.0%

    \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{1}{\pi} \cdot \frac{1}{angle}}}\right)\right) \cdot \left(b + a\right) \]
  12. Final simplification70.0%

    \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi} \cdot \frac{1}{angle}}\right)\right) \cdot \left(a + b\right) \]

Alternative 3: 67.3% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ \\ \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi \cdot angle}}\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (*
  (+ a b)
  (* (- b a) (sin (* 2.0 (/ 0.005555555555555556 (/ 1.0 (* PI angle))))))))
a = abs(a);
double code(double a, double b, double angle) {
	return (a + b) * ((b - a) * sin((2.0 * (0.005555555555555556 / (1.0 / (((double) M_PI) * angle))))));
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	return (a + b) * ((b - a) * Math.sin((2.0 * (0.005555555555555556 / (1.0 / (Math.PI * angle))))));
}
a = abs(a)
def code(a, b, angle):
	return (a + b) * ((b - a) * math.sin((2.0 * (0.005555555555555556 / (1.0 / (math.pi * angle))))))
a = abs(a)
function code(a, b, angle)
	return Float64(Float64(a + b) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(0.005555555555555556 / Float64(1.0 / Float64(pi * angle)))))))
end
a = abs(a)
function tmp = code(a, b, angle)
	tmp = (a + b) * ((b - a) * sin((2.0 * (0.005555555555555556 / (1.0 / (pi * angle))))));
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 / N[(1.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
\\
\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi \cdot angle}}\right)\right)
\end{array}
Derivation
  1. Initial program 53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
    2. /-rgt-identity68.4%

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)} \]
  8. Step-by-step derivation
    1. *-commutative68.4%

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \left(b + a\right) \]
    4. associate-/r/65.6%

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

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

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

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{\frac{1}{\pi}}{angle}}}\right)\right) \cdot \left(b + a\right) \]
  9. Applied egg-rr69.7%

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

    \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{1}{angle \cdot \pi}}}\right)\right) \cdot \left(b + a\right) \]
  11. Final simplification69.2%

    \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{1}{\pi \cdot angle}}\right)\right) \]

Alternative 4: 67.3% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ \\ \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{\frac{1}{\pi}}{angle}}\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (*
  (+ a b)
  (* (- b a) (sin (* 2.0 (/ 0.005555555555555556 (/ (/ 1.0 PI) angle)))))))
a = abs(a);
double code(double a, double b, double angle) {
	return (a + b) * ((b - a) * sin((2.0 * (0.005555555555555556 / ((1.0 / ((double) M_PI)) / angle)))));
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	return (a + b) * ((b - a) * Math.sin((2.0 * (0.005555555555555556 / ((1.0 / Math.PI) / angle)))));
}
a = abs(a)
def code(a, b, angle):
	return (a + b) * ((b - a) * math.sin((2.0 * (0.005555555555555556 / ((1.0 / math.pi) / angle)))))
a = abs(a)
function code(a, b, angle)
	return Float64(Float64(a + b) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(0.005555555555555556 / Float64(Float64(1.0 / pi) / angle))))))
end
a = abs(a)
function tmp = code(a, b, angle)
	tmp = (a + b) * ((b - a) * sin((2.0 * (0.005555555555555556 / ((1.0 / pi) / angle)))));
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 / N[(N[(1.0 / Pi), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
\\
\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{\frac{1}{\pi}}{angle}}\right)\right)
\end{array}
Derivation
  1. Initial program 53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
    2. /-rgt-identity68.4%

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)} \]
  8. Step-by-step derivation
    1. *-commutative68.4%

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \left(b + a\right) \]
    4. associate-/r/65.6%

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

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

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

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{\frac{1}{\pi}}{angle}}}\right)\right) \cdot \left(b + a\right) \]
  9. Applied egg-rr69.7%

    \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\frac{0.005555555555555556}{\frac{\frac{1}{\pi}}{angle}}}\right)\right) \cdot \left(b + a\right) \]
  10. Final simplification69.7%

    \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\frac{\frac{1}{\pi}}{angle}}\right)\right) \]

Alternative 5: 67.4% accurate, 2.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
    2. /-rgt-identity68.4%

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)} \]
  8. Step-by-step derivation
    1. add-log-exp_binary6427.9%

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \log \left(e^{\sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}\right)\right) \cdot \left(b + a\right)} \]
  9. Applied rewrite-once27.9%

    \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\log \left(e^{\sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}\right)}\right) \cdot \left(b + a\right) \]
  10. Step-by-step derivation
    1. rem-log-exp68.4%

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

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\color{blue}{\frac{0.005555555555555556}{1}} \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \left(b + a\right) \]
    5. associate-/r/69.2%

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\frac{0.005555555555555556}{\frac{1}{angle \cdot \pi}}}\right)\right) \cdot \left(b + a\right) \]
    6. associate-/l/69.7%

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{\frac{1}{\pi}}{angle}}}\right)\right) \cdot \left(b + a\right) \]
    7. associate-*r/69.7%

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

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\frac{0.011111111111111112}{\color{blue}{\frac{1}{angle \cdot \pi}}}\right)\right) \cdot \left(b + a\right) \]
    10. associate-/r/68.1%

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

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

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

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

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

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

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

Alternative 6: 51.8% accurate, 2.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.06000000000000006e-176

    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
      2. /-rgt-identity71.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{a \cdot a}\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \]
      4. distribute-rgt-neg-out39.5%

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

        \[\leadsto \left(a \cdot \left(-a\right)\right) \cdot \sin \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)} \]
      6. *-commutative39.5%

        \[\leadsto \left(a \cdot \left(-a\right)\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.011111111111111112\right) \]
      7. associate-*r*39.7%

        \[\leadsto \left(a \cdot \left(-a\right)\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \]
      8. associate-*l*46.7%

        \[\leadsto \color{blue}{a \cdot \left(\left(-a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)} \]
      9. *-commutative46.7%

        \[\leadsto a \cdot \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(-a\right)\right)} \]
      10. associate-*r*46.6%

        \[\leadsto a \cdot \left(\sin \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)} \cdot \left(-a\right)\right) \]
      11. *-commutative46.6%

        \[\leadsto a \cdot \left(\sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right) \cdot \left(-a\right)\right) \]
      12. *-commutative46.6%

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

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

    if 1.06000000000000006e-176 < b

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
      2. /-rgt-identity64.1%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \left(b + a\right) \]
      4. associate-/r/61.2%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{1}{\pi} \cdot \frac{1}{angle}}}\right)\right) \cdot \left(b + a\right) \]
    11. Applied egg-rr66.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.06 \cdot 10^{-176}:\\ \;\;\;\;a \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]

Alternative 7: 65.1% accurate, 2.9× speedup?

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

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


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

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
      2. /-rgt-identity69.3%

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.011111111111111112\right) \]
      4. associate-*r*43.0%

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

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

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

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

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

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

    if 2.25000000000000009e-142 < a

    1. Initial program 42.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. Step-by-step derivation
      1. *-commutative42.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot 1\right)\right)\right)} \]
    6. Applied rewrite-once36.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.25 \cdot 10^{-142}:\\ \;\;\;\;b \cdot \left(b \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\\ \end{array} \]

Alternative 8: 57.0% accurate, 5.4× speedup?

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

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


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

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(b + \left(-\left(-a\right)\right)\right)}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      10. remove-double-neg60.3%

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

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

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

    if 6.9000000000000002e176 < a

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(-1 \cdot {a}^{2}\right) \cdot \left(\pi \cdot angle\right)\right)} \]
      3. mul-1-neg33.6%

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

        \[\leadsto 0.011111111111111112 \cdot \left(\left(-\color{blue}{a \cdot a}\right) \cdot \left(\pi \cdot angle\right)\right) \]
      5. distribute-rgt-neg-out33.6%

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(a \cdot \left(-a\right)\right)} \cdot \left(\pi \cdot angle\right)\right) \]
      6. associate-*l*65.2%

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

        \[\leadsto 0.011111111111111112 \cdot \left(a \cdot \left(\left(-a\right) \cdot \color{blue}{\left(angle \cdot \pi\right)}\right)\right) \]
    7. Simplified65.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 6.9 \cdot 10^{+176}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot \left(-angle\right)\right)\right)\right)\\ \end{array} \]

Alternative 9: 51.4% accurate, 5.5× speedup?

\[\begin{array}{l} a = |a|\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 5.1 \cdot 10^{+29}:\\ \;\;\;\;\pi \cdot \frac{\left(b \cdot b\right) \cdot -0.011111111111111112}{\frac{-1}{angle}}\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot \left(-angle\right)\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= a 5.1e+29)
   (* PI (/ (* (* b b) -0.011111111111111112) (/ -1.0 angle)))
   (* 0.011111111111111112 (* a (* a (* PI (- angle)))))))
a = abs(a);
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 5.1e+29) {
		tmp = ((double) M_PI) * (((b * b) * -0.011111111111111112) / (-1.0 / angle));
	} else {
		tmp = 0.011111111111111112 * (a * (a * (((double) M_PI) * -angle)));
	}
	return tmp;
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 5.1e+29) {
		tmp = Math.PI * (((b * b) * -0.011111111111111112) / (-1.0 / angle));
	} else {
		tmp = 0.011111111111111112 * (a * (a * (Math.PI * -angle)));
	}
	return tmp;
}
a = abs(a)
def code(a, b, angle):
	tmp = 0
	if a <= 5.1e+29:
		tmp = math.pi * (((b * b) * -0.011111111111111112) / (-1.0 / angle))
	else:
		tmp = 0.011111111111111112 * (a * (a * (math.pi * -angle)))
	return tmp
a = abs(a)
function code(a, b, angle)
	tmp = 0.0
	if (a <= 5.1e+29)
		tmp = Float64(pi * Float64(Float64(Float64(b * b) * -0.011111111111111112) / Float64(-1.0 / angle)));
	else
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(a * Float64(pi * Float64(-angle)))));
	end
	return tmp
end
a = abs(a)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 5.1e+29)
		tmp = pi * (((b * b) * -0.011111111111111112) / (-1.0 / angle));
	else
		tmp = 0.011111111111111112 * (a * (a * (pi * -angle)));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[a, 5.1e+29], N[(Pi * N[(N[(N[(b * b), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] / N[(-1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(a * N[(Pi * (-angle)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.1 \cdot 10^{+29}:\\
\;\;\;\;\pi \cdot \frac{\left(b \cdot b\right) \cdot -0.011111111111111112}{\frac{-1}{angle}}\\

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


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

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative41.1%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)}\right) \]
      2. unpow241.1%

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot b\right)} \]
      3. metadata-eval41.1%

        \[\leadsto \left(\color{blue}{\frac{0.011111111111111112}{1}} \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot b\right) \]
      4. associate-/r/41.1%

        \[\leadsto \color{blue}{\frac{0.011111111111111112}{\frac{1}{angle \cdot \pi}}} \cdot \left(b \cdot b\right) \]
      5. metadata-eval41.1%

        \[\leadsto \frac{\color{blue}{2 \cdot 0.005555555555555556}}{\frac{1}{angle \cdot \pi}} \cdot \left(b \cdot b\right) \]
      6. associate-/l/41.1%

        \[\leadsto \frac{2 \cdot 0.005555555555555556}{\color{blue}{\frac{\frac{1}{\pi}}{angle}}} \cdot \left(b \cdot b\right) \]
      7. associate-*r/41.1%

        \[\leadsto \color{blue}{\left(2 \cdot \frac{0.005555555555555556}{\frac{\frac{1}{\pi}}{angle}}\right)} \cdot \left(b \cdot b\right) \]
      8. frac-2neg41.1%

        \[\leadsto \left(2 \cdot \color{blue}{\frac{-0.005555555555555556}{-\frac{\frac{1}{\pi}}{angle}}}\right) \cdot \left(b \cdot b\right) \]
      9. associate-*r/41.1%

        \[\leadsto \color{blue}{\frac{2 \cdot \left(-0.005555555555555556\right)}{-\frac{\frac{1}{\pi}}{angle}}} \cdot \left(b \cdot b\right) \]
      10. associate-*l/41.1%

        \[\leadsto \color{blue}{\frac{\left(2 \cdot \left(-0.005555555555555556\right)\right) \cdot \left(b \cdot b\right)}{-\frac{\frac{1}{\pi}}{angle}}} \]
      11. metadata-eval41.1%

        \[\leadsto \frac{\left(2 \cdot \color{blue}{-0.005555555555555556}\right) \cdot \left(b \cdot b\right)}{-\frac{\frac{1}{\pi}}{angle}} \]
      12. metadata-eval41.1%

        \[\leadsto \frac{\color{blue}{-0.011111111111111112} \cdot \left(b \cdot b\right)}{-\frac{\frac{1}{\pi}}{angle}} \]
      13. associate-/l/41.1%

        \[\leadsto \frac{-0.011111111111111112 \cdot \left(b \cdot b\right)}{-\color{blue}{\frac{1}{angle \cdot \pi}}} \]
      14. distribute-neg-frac41.1%

        \[\leadsto \frac{-0.011111111111111112 \cdot \left(b \cdot b\right)}{\color{blue}{\frac{-1}{angle \cdot \pi}}} \]
      15. metadata-eval41.1%

        \[\leadsto \frac{-0.011111111111111112 \cdot \left(b \cdot b\right)}{\frac{\color{blue}{-1}}{angle \cdot \pi}} \]
      16. associate-/r*41.1%

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

      \[\leadsto \color{blue}{\frac{-0.011111111111111112 \cdot \left(b \cdot b\right)}{\frac{\frac{-1}{angle}}{\pi}}} \]
    10. Step-by-step derivation
      1. associate-/r/41.1%

        \[\leadsto \color{blue}{\frac{-0.011111111111111112 \cdot \left(b \cdot b\right)}{\frac{-1}{angle}} \cdot \pi} \]
      2. *-commutative41.1%

        \[\leadsto \frac{\color{blue}{\left(b \cdot b\right) \cdot -0.011111111111111112}}{\frac{-1}{angle}} \cdot \pi \]
    11. Simplified41.1%

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

    if 5.1000000000000001e29 < a

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(-1 \cdot {a}^{2}\right) \cdot \left(\pi \cdot angle\right)\right)} \]
      3. mul-1-neg30.9%

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

        \[\leadsto 0.011111111111111112 \cdot \left(\left(-\color{blue}{a \cdot a}\right) \cdot \left(\pi \cdot angle\right)\right) \]
      5. distribute-rgt-neg-out30.9%

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(a \cdot \left(-a\right)\right)} \cdot \left(\pi \cdot angle\right)\right) \]
      6. associate-*l*48.1%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(\left(-a\right) \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      7. *-commutative48.1%

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

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

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

Alternative 10: 51.3% accurate, 5.5× speedup?

\[\begin{array}{l} a = |a|\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 1.15 \cdot 10^{+34}:\\ \;\;\;\;\frac{2 \cdot \left(b \cdot b\right)}{\frac{\frac{180}{angle}}{\pi}}\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot \left(-angle\right)\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= a 1.15e+34)
   (/ (* 2.0 (* b b)) (/ (/ 180.0 angle) PI))
   (* 0.011111111111111112 (* a (* a (* PI (- angle)))))))
a = abs(a);
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 1.15e+34) {
		tmp = (2.0 * (b * b)) / ((180.0 / angle) / ((double) M_PI));
	} else {
		tmp = 0.011111111111111112 * (a * (a * (((double) M_PI) * -angle)));
	}
	return tmp;
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 1.15e+34) {
		tmp = (2.0 * (b * b)) / ((180.0 / angle) / Math.PI);
	} else {
		tmp = 0.011111111111111112 * (a * (a * (Math.PI * -angle)));
	}
	return tmp;
}
a = abs(a)
def code(a, b, angle):
	tmp = 0
	if a <= 1.15e+34:
		tmp = (2.0 * (b * b)) / ((180.0 / angle) / math.pi)
	else:
		tmp = 0.011111111111111112 * (a * (a * (math.pi * -angle)))
	return tmp
a = abs(a)
function code(a, b, angle)
	tmp = 0.0
	if (a <= 1.15e+34)
		tmp = Float64(Float64(2.0 * Float64(b * b)) / Float64(Float64(180.0 / angle) / pi));
	else
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(a * Float64(pi * Float64(-angle)))));
	end
	return tmp
end
a = abs(a)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 1.15e+34)
		tmp = (2.0 * (b * b)) / ((180.0 / angle) / pi);
	else
		tmp = 0.011111111111111112 * (a * (a * (pi * -angle)));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[a, 1.15e+34], N[(N[(2.0 * N[(b * b), $MachinePrecision]), $MachinePrecision] / N[(N[(180.0 / angle), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(a * N[(Pi * (-angle)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.15 \cdot 10^{+34}:\\
\;\;\;\;\frac{2 \cdot \left(b \cdot b\right)}{\frac{\frac{180}{angle}}{\pi}}\\

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


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

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative41.1%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)}\right) \]
      2. unpow241.1%

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot b\right)} \]
      3. metadata-eval41.1%

        \[\leadsto \left(\color{blue}{\left(2 \cdot 0.005555555555555556\right)} \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot b\right) \]
      4. associate-*r*41.1%

        \[\leadsto \color{blue}{\left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot \left(b \cdot b\right) \]
      5. metadata-eval41.1%

        \[\leadsto \left(2 \cdot \left(\color{blue}{\frac{0.005555555555555556}{1}} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(b \cdot b\right) \]
      6. associate-/r/41.1%

        \[\leadsto \left(2 \cdot \color{blue}{\frac{0.005555555555555556}{\frac{1}{angle \cdot \pi}}}\right) \cdot \left(b \cdot b\right) \]
      7. associate-/l/41.1%

        \[\leadsto \left(2 \cdot \frac{0.005555555555555556}{\color{blue}{\frac{\frac{1}{\pi}}{angle}}}\right) \cdot \left(b \cdot b\right) \]
      8. clear-num41.1%

        \[\leadsto \left(2 \cdot \color{blue}{\frac{1}{\frac{\frac{\frac{1}{\pi}}{angle}}{0.005555555555555556}}}\right) \cdot \left(b \cdot b\right) \]
      9. un-div-inv41.1%

        \[\leadsto \color{blue}{\frac{2}{\frac{\frac{\frac{1}{\pi}}{angle}}{0.005555555555555556}}} \cdot \left(b \cdot b\right) \]
      10. associate-*l/41.1%

        \[\leadsto \color{blue}{\frac{2 \cdot \left(b \cdot b\right)}{\frac{\frac{\frac{1}{\pi}}{angle}}{0.005555555555555556}}} \]
      11. associate-/l/41.1%

        \[\leadsto \frac{2 \cdot \left(b \cdot b\right)}{\frac{\color{blue}{\frac{1}{angle \cdot \pi}}}{0.005555555555555556}} \]
      12. associate-/l/41.1%

        \[\leadsto \frac{2 \cdot \left(b \cdot b\right)}{\color{blue}{\frac{1}{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}}} \]
      13. associate-/r*41.1%

        \[\leadsto \frac{2 \cdot \left(b \cdot b\right)}{\color{blue}{\frac{\frac{1}{0.005555555555555556}}{angle \cdot \pi}}} \]
      14. metadata-eval41.1%

        \[\leadsto \frac{2 \cdot \left(b \cdot b\right)}{\frac{\color{blue}{180}}{angle \cdot \pi}} \]
      15. associate-/r*41.2%

        \[\leadsto \frac{2 \cdot \left(b \cdot b\right)}{\color{blue}{\frac{\frac{180}{angle}}{\pi}}} \]
    9. Applied egg-rr41.2%

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

    if 1.1499999999999999e34 < a

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(-1 \cdot {a}^{2}\right) \cdot \left(\pi \cdot angle\right)\right)} \]
      3. mul-1-neg30.9%

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

        \[\leadsto 0.011111111111111112 \cdot \left(\left(-\color{blue}{a \cdot a}\right) \cdot \left(\pi \cdot angle\right)\right) \]
      5. distribute-rgt-neg-out30.9%

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(a \cdot \left(-a\right)\right)} \cdot \left(\pi \cdot angle\right)\right) \]
      6. associate-*l*48.1%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(\left(-a\right) \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      7. *-commutative48.1%

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

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

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

Alternative 11: 62.3% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(b - a\right) \cdot \sin \left(\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \pi\right)}{1} \cdot \left(b + a\right)} \]
    2. /-rgt-identity68.4%

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

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

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

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

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

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

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

Alternative 12: 62.3% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{1}\right) \]
  5. Step-by-step derivation
    1. log1p-expm1-u_binary6445.8%

      \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot 1\right)\right)\right)} \]
  6. Applied rewrite-once45.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)} \]
  10. Final simplification61.9%

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

Alternative 13: 51.3% accurate, 5.6× speedup?

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

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


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

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative41.1%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)}\right) \]
      2. unpow241.1%

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

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

    if 7.79999999999999999e31 < a

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(-1 \cdot {a}^{2}\right) \cdot \left(\pi \cdot angle\right)\right)} \]
      3. mul-1-neg30.9%

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

        \[\leadsto 0.011111111111111112 \cdot \left(\left(-\color{blue}{a \cdot a}\right) \cdot \left(\pi \cdot angle\right)\right) \]
      5. distribute-rgt-neg-out30.9%

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(a \cdot \left(-a\right)\right)} \cdot \left(\pi \cdot angle\right)\right) \]
      6. associate-*l*48.1%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(\left(-a\right) \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      7. *-commutative48.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 7.8 \cdot 10^{+31}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot \left(-angle\right)\right)\right)\right)\\ \end{array} \]

Alternative 14: 46.8% accurate, 5.6× speedup?

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

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


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

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative41.1%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)}\right) \]
      2. unpow241.1%

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

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

    if 4.49999999999999995e30 < a

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-0.011111111111111112 \cdot {a}^{2}\right) \cdot \left(\pi \cdot angle\right)} \]
      3. unpow231.0%

        \[\leadsto \left(-0.011111111111111112 \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(\pi \cdot angle\right) \]
      4. *-commutative31.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 4.5 \cdot 10^{+30}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right)\\ \end{array} \]

Alternative 15: 35.9% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
  6. Step-by-step derivation
    1. *-commutative34.3%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)}\right) \]
    2. unpow234.3%

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

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

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right) \]

Reproduce

?
herbie shell --seed 2023297 
(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)))))