ab-angle->ABCF A

Percentage Accurate: 79.8% → 79.7%
Time: 29.8s
Alternatives: 12
Speedup: 1.3×

Specification

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

\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\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 12 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: 79.8% accurate, 1.0× speedup?

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

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

Alternative 1: 79.7% accurate, 0.8× speedup?

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

\\
{\left(a \cdot \sin \left(angle \cdot \frac{\sqrt[3]{{\pi}^{3}}}{180}\right)\right)}^{2} + {b}^{2}
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
  6. Step-by-step derivation
    1. add-cbrt-cube81.4%

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\sqrt[3]{{\pi}^{3}}}{180}\right)\right)}^{2} + {b}^{2} \]
  9. Add Preprocessing

Alternative 2: 79.8% accurate, 1.3× speedup?

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

\\
{b}^{2} + {\left(a \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
  6. Final simplification81.4%

    \[\leadsto {b}^{2} + {\left(a \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  7. Add Preprocessing

Alternative 3: 79.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ {b}^{2} + {\left(a \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+ (pow b 2.0) (pow (* a (sin (* PI (* angle 0.005555555555555556)))) 2.0)))
double code(double a, double b, double angle) {
	return pow(b, 2.0) + pow((a * sin((((double) M_PI) * (angle * 0.005555555555555556)))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow(b, 2.0) + Math.pow((a * Math.sin((Math.PI * (angle * 0.005555555555555556)))), 2.0);
}
def code(a, b, angle):
	return math.pow(b, 2.0) + math.pow((a * math.sin((math.pi * (angle * 0.005555555555555556)))), 2.0)
function code(a, b, angle)
	return Float64((b ^ 2.0) + (Float64(a * sin(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 2.0))
end
function tmp = code(a, b, angle)
	tmp = (b ^ 2.0) + ((a * sin((pi * (angle * 0.005555555555555556)))) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[b, 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{b}^{2} + {\left(a \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
  6. Step-by-step derivation
    1. add-cbrt-cube81.4%

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

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

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\color{blue}{\sqrt[3]{{\pi}^{3}}}}{180}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
  8. Taylor expanded in angle around inf 81.3%

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

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

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

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

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

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

    \[\leadsto {b}^{2} + {\left(a \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
  12. Add Preprocessing

Alternative 4: 79.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ {b}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+ (pow b 2.0) (pow (* a (sin (* 0.005555555555555556 (* angle PI)))) 2.0)))
double code(double a, double b, double angle) {
	return pow(b, 2.0) + pow((a * sin((0.005555555555555556 * (angle * ((double) M_PI))))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow(b, 2.0) + Math.pow((a * Math.sin((0.005555555555555556 * (angle * Math.PI)))), 2.0);
}
def code(a, b, angle):
	return math.pow(b, 2.0) + math.pow((a * math.sin((0.005555555555555556 * (angle * math.pi)))), 2.0)
function code(a, b, angle)
	return Float64((b ^ 2.0) + (Float64(a * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) ^ 2.0))
end
function tmp = code(a, b, angle)
	tmp = (b ^ 2.0) + ((a * sin((0.005555555555555556 * (angle * pi)))) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[b, 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{b}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {b}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} \]
  8. Add Preprocessing

Alternative 5: 74.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 1.25 \cdot 10^{-141}:\\ \;\;\;\;{b}^{2} + {\left(\left(1 + 0.005555555555555556 \cdot \left(angle \cdot \left(a \cdot \pi\right)\right)\right) + -1\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot \left(angle \cdot \pi\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right) + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 1.25e-141)
   (+
    (pow b 2.0)
    (pow (+ (+ 1.0 (* 0.005555555555555556 (* angle (* a PI)))) -1.0) 2.0))
   (+
    (*
     (* a (* angle PI))
     (* 0.005555555555555556 (* angle (* a (* PI 0.005555555555555556)))))
    (pow (* b (cos (* angle (/ PI 180.0)))) 2.0))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 1.25e-141) {
		tmp = pow(b, 2.0) + pow(((1.0 + (0.005555555555555556 * (angle * (a * ((double) M_PI))))) + -1.0), 2.0);
	} else {
		tmp = ((a * (angle * ((double) M_PI))) * (0.005555555555555556 * (angle * (a * (((double) M_PI) * 0.005555555555555556))))) + pow((b * cos((angle * (((double) M_PI) / 180.0)))), 2.0);
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 1.25e-141) {
		tmp = Math.pow(b, 2.0) + Math.pow(((1.0 + (0.005555555555555556 * (angle * (a * Math.PI)))) + -1.0), 2.0);
	} else {
		tmp = ((a * (angle * Math.PI)) * (0.005555555555555556 * (angle * (a * (Math.PI * 0.005555555555555556))))) + Math.pow((b * Math.cos((angle * (Math.PI / 180.0)))), 2.0);
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if a <= 1.25e-141:
		tmp = math.pow(b, 2.0) + math.pow(((1.0 + (0.005555555555555556 * (angle * (a * math.pi)))) + -1.0), 2.0)
	else:
		tmp = ((a * (angle * math.pi)) * (0.005555555555555556 * (angle * (a * (math.pi * 0.005555555555555556))))) + math.pow((b * math.cos((angle * (math.pi / 180.0)))), 2.0)
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (a <= 1.25e-141)
		tmp = Float64((b ^ 2.0) + (Float64(Float64(1.0 + Float64(0.005555555555555556 * Float64(angle * Float64(a * pi)))) + -1.0) ^ 2.0));
	else
		tmp = Float64(Float64(Float64(a * Float64(angle * pi)) * Float64(0.005555555555555556 * Float64(angle * Float64(a * Float64(pi * 0.005555555555555556))))) + (Float64(b * cos(Float64(angle * Float64(pi / 180.0)))) ^ 2.0));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 1.25e-141)
		tmp = (b ^ 2.0) + (((1.0 + (0.005555555555555556 * (angle * (a * pi)))) + -1.0) ^ 2.0);
	else
		tmp = ((a * (angle * pi)) * (0.005555555555555556 * (angle * (a * (pi * 0.005555555555555556))))) + ((b * cos((angle * (pi / 180.0)))) ^ 2.0);
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[a, 1.25e-141], N[(N[Power[b, 2.0], $MachinePrecision] + N[Power[N[(N[(1.0 + N[(0.005555555555555556 * N[(angle * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.005555555555555556 * N[(angle * N[(a * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[(b * N[Cos[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.25 \cdot 10^{-141}:\\
\;\;\;\;{b}^{2} + {\left(\left(1 + 0.005555555555555556 \cdot \left(angle \cdot \left(a \cdot \pi\right)\right)\right) + -1\right)}^{2}\\

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


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

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)} - 1\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. *-commutative64.6%

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

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\sin \left(angle \cdot \color{blue}{\left(\pi \cdot \frac{1}{180}\right)}\right) \cdot a\right)} - 1\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      5. metadata-eval64.6%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\sin \left(angle \cdot \left(\pi \cdot \color{blue}{0.005555555555555556}\right)\right) \cdot a\right)} - 1\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    7. Applied egg-rr64.6%

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

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

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

        \[\leadsto {\left(\left(1 + 0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot a\right)\right)}\right) - 1\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    10. Simplified72.9%

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

    if 1.25e-141 < a

    1. Initial program 84.0%

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{\cos \left(-\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
      4. distribute-lft-neg-out83.9%

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\color{blue}{\left(-\frac{angle}{180}\right)} \cdot \pi\right)\right)}^{2} \]
      7. distribute-lft-neg-out83.9%

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

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

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

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

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

      \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}}^{2} + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} \]
    6. Step-by-step derivation
      1. *-commutative80.8%

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

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

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

        \[\leadsto {\left(\color{blue}{\left(angle \cdot a\right)} \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}^{2} + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} \]
    7. Simplified80.8%

      \[\leadsto {\color{blue}{\left(\left(angle \cdot a\right) \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}}^{2} + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} \]
    8. Step-by-step derivation
      1. unpow280.8%

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

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

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

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

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

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

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

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

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

Alternative 6: 74.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;a \leq 1.5 \cdot 10^{-141}:\\ \;\;\;\;{b}^{2} + {\left(\left(1 + 0.005555555555555556 \cdot \left(angle \cdot \left(a \cdot \pi\right)\right)\right) + -1\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + \left(t\_0 \cdot t\_0\right) \cdot 3.08641975308642 \cdot 10^{-5}\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* a (* angle PI))))
   (if (<= a 1.5e-141)
     (+
      (pow b 2.0)
      (pow (+ (+ 1.0 (* 0.005555555555555556 (* angle (* a PI)))) -1.0) 2.0))
     (+
      (pow (* b (cos (* angle (/ PI 180.0)))) 2.0)
      (* (* t_0 t_0) 3.08641975308642e-5)))))
double code(double a, double b, double angle) {
	double t_0 = a * (angle * ((double) M_PI));
	double tmp;
	if (a <= 1.5e-141) {
		tmp = pow(b, 2.0) + pow(((1.0 + (0.005555555555555556 * (angle * (a * ((double) M_PI))))) + -1.0), 2.0);
	} else {
		tmp = pow((b * cos((angle * (((double) M_PI) / 180.0)))), 2.0) + ((t_0 * t_0) * 3.08641975308642e-5);
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = a * (angle * Math.PI);
	double tmp;
	if (a <= 1.5e-141) {
		tmp = Math.pow(b, 2.0) + Math.pow(((1.0 + (0.005555555555555556 * (angle * (a * Math.PI)))) + -1.0), 2.0);
	} else {
		tmp = Math.pow((b * Math.cos((angle * (Math.PI / 180.0)))), 2.0) + ((t_0 * t_0) * 3.08641975308642e-5);
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = a * (angle * math.pi)
	tmp = 0
	if a <= 1.5e-141:
		tmp = math.pow(b, 2.0) + math.pow(((1.0 + (0.005555555555555556 * (angle * (a * math.pi)))) + -1.0), 2.0)
	else:
		tmp = math.pow((b * math.cos((angle * (math.pi / 180.0)))), 2.0) + ((t_0 * t_0) * 3.08641975308642e-5)
	return tmp
function code(a, b, angle)
	t_0 = Float64(a * Float64(angle * pi))
	tmp = 0.0
	if (a <= 1.5e-141)
		tmp = Float64((b ^ 2.0) + (Float64(Float64(1.0 + Float64(0.005555555555555556 * Float64(angle * Float64(a * pi)))) + -1.0) ^ 2.0));
	else
		tmp = Float64((Float64(b * cos(Float64(angle * Float64(pi / 180.0)))) ^ 2.0) + Float64(Float64(t_0 * t_0) * 3.08641975308642e-5));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = a * (angle * pi);
	tmp = 0.0;
	if (a <= 1.5e-141)
		tmp = (b ^ 2.0) + (((1.0 + (0.005555555555555556 * (angle * (a * pi)))) + -1.0) ^ 2.0);
	else
		tmp = ((b * cos((angle * (pi / 180.0)))) ^ 2.0) + ((t_0 * t_0) * 3.08641975308642e-5);
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(a * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.5e-141], N[(N[Power[b, 2.0], $MachinePrecision] + N[Power[N[(N[(1.0 + N[(0.005555555555555556 * N[(angle * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(b * N[Cos[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;a \leq 1.5 \cdot 10^{-141}:\\
\;\;\;\;{b}^{2} + {\left(\left(1 + 0.005555555555555556 \cdot \left(angle \cdot \left(a \cdot \pi\right)\right)\right) + -1\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + \left(t\_0 \cdot t\_0\right) \cdot 3.08641975308642 \cdot 10^{-5}\\


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

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)} - 1\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. *-commutative64.6%

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

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\sin \left(angle \cdot \color{blue}{\left(\pi \cdot \frac{1}{180}\right)}\right) \cdot a\right)} - 1\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      5. metadata-eval64.6%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\sin \left(angle \cdot \left(\pi \cdot \color{blue}{0.005555555555555556}\right)\right) \cdot a\right)} - 1\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    7. Applied egg-rr64.6%

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

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

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

        \[\leadsto {\left(\left(1 + 0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot a\right)\right)}\right) - 1\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    10. Simplified72.9%

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

    if 1.49999999999999992e-141 < a

    1. Initial program 84.0%

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{\cos \left(-\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
      4. distribute-lft-neg-out83.9%

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\color{blue}{\left(-\frac{angle}{180}\right)} \cdot \pi\right)\right)}^{2} \]
      7. distribute-lft-neg-out83.9%

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

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

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

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

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

      \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}}^{2} + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} \]
    6. Step-by-step derivation
      1. *-commutative80.8%

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

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

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

        \[\leadsto {\left(\color{blue}{\left(angle \cdot a\right)} \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}^{2} + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} \]
    7. Simplified80.8%

      \[\leadsto {\color{blue}{\left(\left(angle \cdot a\right) \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}}^{2} + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} \]
    8. Step-by-step derivation
      1. unpow280.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(a \cdot \left(\pi \cdot angle\right)\right) \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right) \cdot 3.08641975308642 \cdot 10^{-5}} + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.7%

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

Alternative 7: 74.2% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := angle \cdot \left(a \cdot \pi\right)\\ \mathbf{if}\;a \leq 2.5 \cdot 10^{-101}:\\ \;\;\;\;{b}^{2} + {\left(\left(1 + 0.005555555555555556 \cdot t\_0\right) + -1\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{b}^{2} + t\_0 \cdot \left(0.005555555555555556 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* angle (* a PI))))
   (if (<= a 2.5e-101)
     (+ (pow b 2.0) (pow (+ (+ 1.0 (* 0.005555555555555556 t_0)) -1.0) 2.0))
     (+
      (pow b 2.0)
      (*
       t_0
       (*
        0.005555555555555556
        (* (* angle PI) (* a 0.005555555555555556))))))))
double code(double a, double b, double angle) {
	double t_0 = angle * (a * ((double) M_PI));
	double tmp;
	if (a <= 2.5e-101) {
		tmp = pow(b, 2.0) + pow(((1.0 + (0.005555555555555556 * t_0)) + -1.0), 2.0);
	} else {
		tmp = pow(b, 2.0) + (t_0 * (0.005555555555555556 * ((angle * ((double) M_PI)) * (a * 0.005555555555555556))));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = angle * (a * Math.PI);
	double tmp;
	if (a <= 2.5e-101) {
		tmp = Math.pow(b, 2.0) + Math.pow(((1.0 + (0.005555555555555556 * t_0)) + -1.0), 2.0);
	} else {
		tmp = Math.pow(b, 2.0) + (t_0 * (0.005555555555555556 * ((angle * Math.PI) * (a * 0.005555555555555556))));
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = angle * (a * math.pi)
	tmp = 0
	if a <= 2.5e-101:
		tmp = math.pow(b, 2.0) + math.pow(((1.0 + (0.005555555555555556 * t_0)) + -1.0), 2.0)
	else:
		tmp = math.pow(b, 2.0) + (t_0 * (0.005555555555555556 * ((angle * math.pi) * (a * 0.005555555555555556))))
	return tmp
function code(a, b, angle)
	t_0 = Float64(angle * Float64(a * pi))
	tmp = 0.0
	if (a <= 2.5e-101)
		tmp = Float64((b ^ 2.0) + (Float64(Float64(1.0 + Float64(0.005555555555555556 * t_0)) + -1.0) ^ 2.0));
	else
		tmp = Float64((b ^ 2.0) + Float64(t_0 * Float64(0.005555555555555556 * Float64(Float64(angle * pi) * Float64(a * 0.005555555555555556)))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = angle * (a * pi);
	tmp = 0.0;
	if (a <= 2.5e-101)
		tmp = (b ^ 2.0) + (((1.0 + (0.005555555555555556 * t_0)) + -1.0) ^ 2.0);
	else
		tmp = (b ^ 2.0) + (t_0 * (0.005555555555555556 * ((angle * pi) * (a * 0.005555555555555556))));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(a * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2.5e-101], N[(N[Power[b, 2.0], $MachinePrecision] + N[Power[N[(N[(1.0 + N[(0.005555555555555556 * t$95$0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[Power[b, 2.0], $MachinePrecision] + N[(t$95$0 * N[(0.005555555555555556 * N[(N[(angle * Pi), $MachinePrecision] * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;{b}^{2} + t\_0 \cdot \left(0.005555555555555556 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)\\


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

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)} - 1\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. *-commutative64.9%

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

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\sin \left(angle \cdot \color{blue}{\left(\pi \cdot \frac{1}{180}\right)}\right) \cdot a\right)} - 1\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      5. metadata-eval64.9%

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

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

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

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

        \[\leadsto {\left(\left(1 + 0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot a\right)\right)}\right) - 1\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    10. Simplified72.9%

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

    if 2.5e-101 < a

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 73.2% accurate, 3.5× speedup?

\[\begin{array}{l} \\ {b}^{2} + \left(angle \cdot \pi\right) \cdot \left(\left(a \cdot 0.005555555555555556\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow b 2.0)
  (*
   (* angle PI)
   (*
    (* a 0.005555555555555556)
    (* (* angle PI) (* a 0.005555555555555556))))))
double code(double a, double b, double angle) {
	return pow(b, 2.0) + ((angle * ((double) M_PI)) * ((a * 0.005555555555555556) * ((angle * ((double) M_PI)) * (a * 0.005555555555555556))));
}
public static double code(double a, double b, double angle) {
	return Math.pow(b, 2.0) + ((angle * Math.PI) * ((a * 0.005555555555555556) * ((angle * Math.PI) * (a * 0.005555555555555556))));
}
def code(a, b, angle):
	return math.pow(b, 2.0) + ((angle * math.pi) * ((a * 0.005555555555555556) * ((angle * math.pi) * (a * 0.005555555555555556))))
function code(a, b, angle)
	return Float64((b ^ 2.0) + Float64(Float64(angle * pi) * Float64(Float64(a * 0.005555555555555556) * Float64(Float64(angle * pi) * Float64(a * 0.005555555555555556)))))
end
function tmp = code(a, b, angle)
	tmp = (b ^ 2.0) + ((angle * pi) * ((a * 0.005555555555555556) * ((angle * pi) * (a * 0.005555555555555556))));
end
code[a_, b_, angle_] := N[(N[Power[b, 2.0], $MachinePrecision] + N[(N[(angle * Pi), $MachinePrecision] * N[(N[(a * 0.005555555555555556), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{b}^{2} + \left(angle \cdot \pi\right) \cdot \left(\left(a \cdot 0.005555555555555556\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
  7. Step-by-step derivation
    1. unpow276.3%

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right)} \cdot \left(0.005555555555555556 \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) + {\left(b \cdot 1\right)}^{2} \]
  8. Applied egg-rr76.6%

    \[\leadsto \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right) \cdot \left(0.005555555555555556 \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)} + {\left(b \cdot 1\right)}^{2} \]
  9. Final simplification76.6%

    \[\leadsto {b}^{2} + \left(angle \cdot \pi\right) \cdot \left(\left(a \cdot 0.005555555555555556\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right) \]
  10. Add Preprocessing

Alternative 9: 74.9% accurate, 3.5× speedup?

\[\begin{array}{l} \\ {b}^{2} + \left(angle \cdot \left(a \cdot \pi\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow b 2.0)
  (*
   (* angle (* a PI))
   (* 0.005555555555555556 (* (* angle PI) (* a 0.005555555555555556))))))
double code(double a, double b, double angle) {
	return pow(b, 2.0) + ((angle * (a * ((double) M_PI))) * (0.005555555555555556 * ((angle * ((double) M_PI)) * (a * 0.005555555555555556))));
}
public static double code(double a, double b, double angle) {
	return Math.pow(b, 2.0) + ((angle * (a * Math.PI)) * (0.005555555555555556 * ((angle * Math.PI) * (a * 0.005555555555555556))));
}
def code(a, b, angle):
	return math.pow(b, 2.0) + ((angle * (a * math.pi)) * (0.005555555555555556 * ((angle * math.pi) * (a * 0.005555555555555556))))
function code(a, b, angle)
	return Float64((b ^ 2.0) + Float64(Float64(angle * Float64(a * pi)) * Float64(0.005555555555555556 * Float64(Float64(angle * pi) * Float64(a * 0.005555555555555556)))))
end
function tmp = code(a, b, angle)
	tmp = (b ^ 2.0) + ((angle * (a * pi)) * (0.005555555555555556 * ((angle * pi) * (a * 0.005555555555555556))));
end
code[a_, b_, angle_] := N[(N[Power[b, 2.0], $MachinePrecision] + N[(N[(angle * N[(a * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.005555555555555556 * N[(N[(angle * Pi), $MachinePrecision] * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{b}^{2} + \left(angle \cdot \left(a \cdot \pi\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
  7. Step-by-step derivation
    1. unpow276.3%

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

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

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

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

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

      \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right) \cdot 0.005555555555555556\right) \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot a\right)\right)} + {\left(b \cdot 1\right)}^{2} \]
  8. Applied egg-rr76.3%

    \[\leadsto \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right) \cdot 0.005555555555555556\right) \cdot \left(angle \cdot \left(\pi \cdot a\right)\right)} + {\left(b \cdot 1\right)}^{2} \]
  9. Final simplification76.3%

    \[\leadsto {b}^{2} + \left(angle \cdot \left(a \cdot \pi\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right) \]
  10. Add Preprocessing

Alternative 10: 74.9% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
t_0 := \left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\\
{b}^{2} + t\_0 \cdot t\_0
\end{array}
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
  7. Step-by-step derivation
    1. unpow276.3%

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

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

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

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

      \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right)} + {\left(b \cdot 1\right)}^{2} \]
  8. Applied egg-rr76.3%

    \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right)} + {\left(b \cdot 1\right)}^{2} \]
  9. Final simplification76.3%

    \[\leadsto {b}^{2} + \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right) \]
  10. Add Preprocessing

Alternative 11: 74.0% accurate, 3.5× speedup?

\[\begin{array}{l} \\ {b}^{2} + \left(a \cdot 0.005555555555555556\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(a \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow b 2.0)
  (*
   (* a 0.005555555555555556)
   (* (* angle PI) (* PI (* a (* angle 0.005555555555555556)))))))
double code(double a, double b, double angle) {
	return pow(b, 2.0) + ((a * 0.005555555555555556) * ((angle * ((double) M_PI)) * (((double) M_PI) * (a * (angle * 0.005555555555555556)))));
}
public static double code(double a, double b, double angle) {
	return Math.pow(b, 2.0) + ((a * 0.005555555555555556) * ((angle * Math.PI) * (Math.PI * (a * (angle * 0.005555555555555556)))));
}
def code(a, b, angle):
	return math.pow(b, 2.0) + ((a * 0.005555555555555556) * ((angle * math.pi) * (math.pi * (a * (angle * 0.005555555555555556)))))
function code(a, b, angle)
	return Float64((b ^ 2.0) + Float64(Float64(a * 0.005555555555555556) * Float64(Float64(angle * pi) * Float64(pi * Float64(a * Float64(angle * 0.005555555555555556))))))
end
function tmp = code(a, b, angle)
	tmp = (b ^ 2.0) + ((a * 0.005555555555555556) * ((angle * pi) * (pi * (a * (angle * 0.005555555555555556)))));
end
code[a_, b_, angle_] := N[(N[Power[b, 2.0], $MachinePrecision] + N[(N[(a * 0.005555555555555556), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * N[(Pi * N[(a * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{b}^{2} + \left(a \cdot 0.005555555555555556\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(a \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
  7. Step-by-step derivation
    1. unpow276.3%

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

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

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

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right)}\right) + {\left(b \cdot 1\right)}^{2} \]
  8. Applied egg-rr75.5%

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

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

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

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

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

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot {\left(\left(\pi \cdot \color{blue}{\frac{angle}{180}}\right) \cdot a\right)}^{1}\right) + {\left(b \cdot 1\right)}^{2} \]
    7. associate-*l*75.5%

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

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot {\left(\pi \cdot \left(\left(angle \cdot \color{blue}{0.005555555555555556}\right) \cdot a\right)\right)}^{1}\right) + {\left(b \cdot 1\right)}^{2} \]
  10. Applied egg-rr75.6%

    \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot a\right)\right)}^{1}}\right) + {\left(b \cdot 1\right)}^{2} \]
  11. Step-by-step derivation
    1. unpow175.6%

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \color{blue}{\left(a \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)\right) + {\left(b \cdot 1\right)}^{2} \]
  12. Simplified75.6%

    \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\pi \cdot \left(a \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}\right) + {\left(b \cdot 1\right)}^{2} \]
  13. Final simplification75.6%

    \[\leadsto {b}^{2} + \left(a \cdot 0.005555555555555556\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(a \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \]
  14. Add Preprocessing

Alternative 12: 74.0% accurate, 3.5× speedup?

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

\\
{b}^{2} + \left(a \cdot 0.005555555555555556\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(angle \cdot \frac{a \cdot \pi}{180}\right)\right)
\end{array}
Derivation
  1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
  7. Step-by-step derivation
    1. unpow276.3%

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

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

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

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot a\right)\right)}\right) + {\left(b \cdot 1\right)}^{2} \]
  8. Applied egg-rr75.5%

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot a\right)}\right) + {\left(b \cdot 1\right)}^{2} \]
    2. add-cube-cbrt75.5%

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\left(\left(angle \cdot \color{blue}{\left(\left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right) \cdot \sqrt[3]{\pi}\right)}\right) \cdot 0.005555555555555556\right) \cdot a\right)\right) + {\left(b \cdot 1\right)}^{2} \]
    3. unpow275.5%

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\left(\left(angle \cdot \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \sqrt[3]{\pi}\right)\right) \cdot 0.005555555555555556\right) \cdot a\right)\right) + {\left(b \cdot 1\right)}^{2} \]
    4. metadata-eval75.5%

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{\frac{angle \cdot \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right)}{180}} \cdot a\right)\right) + {\left(b \cdot 1\right)}^{2} \]
    6. clear-num75.5%

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{\frac{1}{\frac{180}{angle \cdot \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right)}}} \cdot a\right)\right) + {\left(b \cdot 1\right)}^{2} \]
    7. associate-*l/75.5%

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\frac{1 \cdot a}{\frac{180}{angle \cdot \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right)}}}\right) + {\left(b \cdot 1\right)}^{2} \]
    8. *-un-lft-identity75.5%

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \frac{\color{blue}{a}}{\frac{180}{angle \cdot \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right)}}\right) + {\left(b \cdot 1\right)}^{2} \]
    9. unpow275.5%

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \frac{a}{\frac{180}{angle \cdot \left(\color{blue}{\left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)} \cdot \sqrt[3]{\pi}\right)}}\right) + {\left(b \cdot 1\right)}^{2} \]
    10. add-cube-cbrt75.5%

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

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

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

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \frac{\color{blue}{\left(angle \cdot \pi\right) \cdot a}}{180}\right) + {\left(b \cdot 1\right)}^{2} \]
    4. associate-*l*75.5%

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

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

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

      \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(angle \cdot \frac{\color{blue}{\pi \cdot a}}{180}\right)\right) + {\left(b \cdot 1\right)}^{2} \]
  12. Simplified75.6%

    \[\leadsto \left(0.005555555555555556 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(angle \cdot \frac{\pi \cdot a}{180}\right)}\right) + {\left(b \cdot 1\right)}^{2} \]
  13. Final simplification75.6%

    \[\leadsto {b}^{2} + \left(a \cdot 0.005555555555555556\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(angle \cdot \frac{a \cdot \pi}{180}\right)\right) \]
  14. Add Preprocessing

Reproduce

?
herbie shell --seed 2024111 
(FPCore (a b angle)
  :name "ab-angle->ABCF A"
  :precision binary64
  (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)))