ab-angle->ABCF A

Percentage Accurate: 80.4% → 80.4%
Time: 31.3s
Alternatives: 11
Speedup: 1.0×

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 11 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: 80.4% 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: 80.4% accurate, 0.5× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(a \cdot \sin \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2} + {\log \left(e^{\cos \left({\left(\sqrt{\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)}\right)}^{2}\right)}\right)}^{2} \cdot {b}^{2} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (+
  (pow (* a (sin (* angle_m (/ PI 180.0)))) 2.0)
  (*
   (pow
    (log (exp (cos (pow (sqrt (* PI (* angle_m 0.005555555555555556))) 2.0))))
    2.0)
   (pow b 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	return pow((a * sin((angle_m * (((double) M_PI) / 180.0)))), 2.0) + (pow(log(exp(cos(pow(sqrt((((double) M_PI) * (angle_m * 0.005555555555555556))), 2.0)))), 2.0) * pow(b, 2.0));
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	return Math.pow((a * Math.sin((angle_m * (Math.PI / 180.0)))), 2.0) + (Math.pow(Math.log(Math.exp(Math.cos(Math.pow(Math.sqrt((Math.PI * (angle_m * 0.005555555555555556))), 2.0)))), 2.0) * Math.pow(b, 2.0));
}
angle_m = math.fabs(angle)
def code(a, b, angle_m):
	return math.pow((a * math.sin((angle_m * (math.pi / 180.0)))), 2.0) + (math.pow(math.log(math.exp(math.cos(math.pow(math.sqrt((math.pi * (angle_m * 0.005555555555555556))), 2.0)))), 2.0) * math.pow(b, 2.0))
angle_m = abs(angle)
function code(a, b, angle_m)
	return Float64((Float64(a * sin(Float64(angle_m * Float64(pi / 180.0)))) ^ 2.0) + Float64((log(exp(cos((sqrt(Float64(pi * Float64(angle_m * 0.005555555555555556))) ^ 2.0)))) ^ 2.0) * (b ^ 2.0)))
end
angle_m = abs(angle);
function tmp = code(a, b, angle_m)
	tmp = ((a * sin((angle_m * (pi / 180.0)))) ^ 2.0) + ((log(exp(cos((sqrt((pi * (angle_m * 0.005555555555555556))) ^ 2.0)))) ^ 2.0) * (b ^ 2.0));
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(angle$95$m * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(N[Power[N[Log[N[Exp[N[Cos[N[Power[N[Sqrt[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|

\\
{\left(a \cdot \sin \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2} + {\log \left(e^{\cos \left({\left(\sqrt{\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)}\right)}^{2}\right)}\right)}^{2} \cdot {b}^{2}
\end{array}
Derivation
  1. Initial program 81.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. unpow281.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
    12. *-commutative81.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. Simplified81.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. Step-by-step derivation
    1. *-commutative81.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\log \left(e^{\cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)}}\right)}^{2} \cdot {b}^{2} \]
    2. add-sqr-sqrt40.5%

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\log \left(e^{\cos \color{blue}{\left(\sqrt{\mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)} \cdot \sqrt{\mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}\right)}}\right)}^{2} \cdot {b}^{2} \]
    3. pow240.5%

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\log \left(e^{\cos \color{blue}{\left({\left(\sqrt{\mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}\right)}^{2}\right)}}\right)}^{2} \cdot {b}^{2} \]
    4. expm1-log1p-u40.5%

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\log \left(e^{\cos \color{blue}{\left({\left(\sqrt{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{2}\right)}}\right)}^{2} \cdot {b}^{2} \]
  11. Final simplification40.5%

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

Alternative 2: 80.4% accurate, 0.7× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(a \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt{angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}\right)\right)}^{2} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (+
  (pow (* a (sin (* PI (/ angle_m 180.0)))) 2.0)
  (pow
   (* b (cos (pow (sqrt (* angle_m (* PI 0.005555555555555556))) 2.0)))
   2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	return pow((a * sin((((double) M_PI) * (angle_m / 180.0)))), 2.0) + pow((b * cos(pow(sqrt((angle_m * (((double) M_PI) * 0.005555555555555556))), 2.0))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	return Math.pow((a * Math.sin((Math.PI * (angle_m / 180.0)))), 2.0) + Math.pow((b * Math.cos(Math.pow(Math.sqrt((angle_m * (Math.PI * 0.005555555555555556))), 2.0))), 2.0);
}
angle_m = math.fabs(angle)
def code(a, b, angle_m):
	return math.pow((a * math.sin((math.pi * (angle_m / 180.0)))), 2.0) + math.pow((b * math.cos(math.pow(math.sqrt((angle_m * (math.pi * 0.005555555555555556))), 2.0))), 2.0)
angle_m = abs(angle)
function code(a, b, angle_m)
	return Float64((Float64(a * sin(Float64(pi * Float64(angle_m / 180.0)))) ^ 2.0) + (Float64(b * cos((sqrt(Float64(angle_m * Float64(pi * 0.005555555555555556))) ^ 2.0))) ^ 2.0))
end
angle_m = abs(angle);
function tmp = code(a, b, angle_m)
	tmp = ((a * sin((pi * (angle_m / 180.0)))) ^ 2.0) + ((b * cos((sqrt((angle_m * (pi * 0.005555555555555556))) ^ 2.0))) ^ 2.0);
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[Power[N[Sqrt[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|

\\
{\left(a \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt{angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrt40.5%

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

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

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

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

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

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

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

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

Alternative 3: 80.4% accurate, 0.8× speedup?

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

\\
{\left(a \cdot \sin \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2} + {b}^{2} \cdot {\cos \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. unpow281.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
    12. *-commutative81.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. Simplified81.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. Step-by-step derivation
    1. *-commutative81.7%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 80.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \cos \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\
{\left(a \cdot \sin \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2} + t\_0 \cdot \left(b \cdot \left(b \cdot t\_0\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 81.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. unpow281.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
    12. *-commutative81.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. Simplified81.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. Step-by-step derivation
    1. unpow281.7%

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

      \[\leadsto {\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) \cdot \left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)}\right) \]
    3. associate-*l/80.8%

      \[\leadsto {\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) \cdot \left(b \cdot \cos \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)}\right) \]
    4. associate-*r*80.8%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 80.4% accurate, 1.0× speedup?

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

\\
{\left(b \cdot \cos \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. unpow281.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
    12. *-commutative81.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. Simplified81.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 inf 81.7%

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

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

Alternative 6: 80.4% accurate, 1.0× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := angle\_m \cdot \frac{\pi}{180}\\ {\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (let* ((t_0 (* angle_m (/ PI 180.0))))
   (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	double t_0 = angle_m * (((double) M_PI) / 180.0);
	return pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	double t_0 = angle_m * (Math.PI / 180.0);
	return Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0);
}
angle_m = math.fabs(angle)
def code(a, b, angle_m):
	t_0 = angle_m * (math.pi / 180.0)
	return math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)
angle_m = abs(angle)
function code(a, b, angle_m)
	t_0 = Float64(angle_m * Float64(pi / 180.0))
	return Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0))
end
angle_m = abs(angle);
function tmp = code(a, b, angle_m)
	t_0 = angle_m * (pi / 180.0);
	tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0);
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(angle$95$m * N[(Pi / 180.0), $MachinePrecision]), $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}
angle_m = \left|angle\right|

\\
\begin{array}{l}
t_0 := angle\_m \cdot \frac{\pi}{180}\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 81.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. unpow281.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
    12. *-commutative81.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. Simplified81.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. Final simplification81.7%

    \[\leadsto {\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} \]
  6. Add Preprocessing

Alternative 7: 80.4% accurate, 1.0× speedup?

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

\\
{\left(a \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/81.7%

      \[\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.7%

    \[\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. Final simplification81.7%

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

Alternative 8: 72.6% accurate, 1.3× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;a \leq 5 \cdot 10^{-198}:\\ \;\;\;\;{b}^{2} + \sqrt[3]{{\left(a \cdot \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)}^{6}}\\ \mathbf{else}:\\ \;\;\;\;{b}^{2} + 0.005555555555555556 \cdot \left(\left(0.005555555555555556 \cdot \left(a \cdot \left(angle\_m \cdot \pi\right)\right)\right) \cdot \left(\pi \cdot \left(a \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (if (<= a 5e-198)
   (+
    (pow b 2.0)
    (cbrt (pow (* a (* PI (* angle_m 0.005555555555555556))) 6.0)))
   (+
    (pow b 2.0)
    (*
     0.005555555555555556
     (* (* 0.005555555555555556 (* a (* angle_m PI))) (* PI (* a angle_m)))))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	double tmp;
	if (a <= 5e-198) {
		tmp = pow(b, 2.0) + cbrt(pow((a * (((double) M_PI) * (angle_m * 0.005555555555555556))), 6.0));
	} else {
		tmp = pow(b, 2.0) + (0.005555555555555556 * ((0.005555555555555556 * (a * (angle_m * ((double) M_PI)))) * (((double) M_PI) * (a * angle_m))));
	}
	return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	double tmp;
	if (a <= 5e-198) {
		tmp = Math.pow(b, 2.0) + Math.cbrt(Math.pow((a * (Math.PI * (angle_m * 0.005555555555555556))), 6.0));
	} else {
		tmp = Math.pow(b, 2.0) + (0.005555555555555556 * ((0.005555555555555556 * (a * (angle_m * Math.PI))) * (Math.PI * (a * angle_m))));
	}
	return tmp;
}
angle_m = abs(angle)
function code(a, b, angle_m)
	tmp = 0.0
	if (a <= 5e-198)
		tmp = Float64((b ^ 2.0) + cbrt((Float64(a * Float64(pi * Float64(angle_m * 0.005555555555555556))) ^ 6.0)));
	else
		tmp = Float64((b ^ 2.0) + Float64(0.005555555555555556 * Float64(Float64(0.005555555555555556 * Float64(a * Float64(angle_m * pi))) * Float64(pi * Float64(a * angle_m)))));
	end
	return tmp
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := If[LessEqual[a, 5e-198], N[(N[Power[b, 2.0], $MachinePrecision] + N[Power[N[Power[N[(a * N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 6.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(N[Power[b, 2.0], $MachinePrecision] + N[(0.005555555555555556 * N[(N[(0.005555555555555556 * N[(a * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|

\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{-198}:\\
\;\;\;\;{b}^{2} + \sqrt[3]{{\left(a \cdot \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)}^{6}}\\

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


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

    1. Initial program 80.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. unpow280.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\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. Simplified80.3%

      \[\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 79.9%

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

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

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

        \[\leadsto \color{blue}{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)} + {b}^{2} \]
      4. rem-cbrt-cube76.6%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \cdot \left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) + {b}^{2} \]
      5. rem-cbrt-cube76.6%

        \[\leadsto \sqrt[3]{{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{3}} \cdot \color{blue}{\sqrt[3]{{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{3}}} + {b}^{2} \]
      6. cbrt-unprod73.4%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{3} \cdot {\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{3}}} + {b}^{2} \]
      7. pow-prod-up73.4%

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(a \cdot \color{blue}{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)}^{6}} + {b}^{2} \]
    10. Simplified66.4%

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

    if 4.9999999999999999e-198 < a

    1. Initial program 83.6%

      \[{\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. unpow283.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
      12. *-commutative83.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. Simplified83.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 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.005555555555555556 \cdot \left(\left(angle \cdot \left(\pi \cdot \left(a \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\pi \cdot \left(angle \cdot a\right)\right)\right)} + {b}^{2} \]
    13. Taylor expanded in angle around 0 80.7%

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

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

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

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

Alternative 9: 80.2% accurate, 1.3× speedup?

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

\\
{b}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. unpow281.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
    12. *-commutative81.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. Simplified81.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 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 80.3% accurate, 1.3× speedup?

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

\\
{\left(a \cdot \sin \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2} + {b}^{2}
\end{array}
Derivation
  1. Initial program 81.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. unpow281.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
    12. *-commutative81.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. Simplified81.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 81.5%

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

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

Alternative 11: 75.2% accurate, 3.5× speedup?

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

\\
{b}^{2} + 0.005555555555555556 \cdot \left(\left(0.005555555555555556 \cdot \left(a \cdot \left(angle\_m \cdot \pi\right)\right)\right) \cdot \left(\pi \cdot \left(a \cdot angle\_m\right)\right)\right)
\end{array}
Derivation
  1. Initial program 81.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. unpow281.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)}^{2} \]
    12. *-commutative81.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. Simplified81.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 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{0.005555555555555556 \cdot \left(\left(angle \cdot \left(\pi \cdot \left(a \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\pi \cdot \left(angle \cdot a\right)\right)\right)} + {b}^{2} \]
  13. Taylor expanded in angle around 0 73.7%

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

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

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

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

Reproduce

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