ab-angle->ABCF C

Percentage Accurate: 79.7% → 79.6%
Time: 15.4s
Alternatives: 16
Speedup: 1.3×

Specification

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin 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 16 alternatives:

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

Initial Program: 79.7% accurate, 1.0× speedup?

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

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

Alternative 1: 79.6% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.6% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 79.6% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\frac{{\left(\sqrt[3]{\pi}\right)}^{2}}{180} \cdot \frac{\sqrt[3]{\pi}}{\frac{1}{angle}}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2} \]
  11. Step-by-step derivation
    1. add-cube-cbrt78.0%

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

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

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

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

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

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

Alternative 4: 79.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval77.9%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval77.9%

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

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

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

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

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

Alternative 6: 79.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval78.1%

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

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

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

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

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

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

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

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

Alternative 7: 79.7% accurate, 1.0× speedup?

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

\\
{\left(\mathsf{hypot}\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right), a \cdot \cos \left(angle\_m \cdot \frac{\pi}{180}\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), a \cdot \cos \left(\frac{\pi}{180} \cdot angle\right)\right)\right)}^{2}} \]
  12. Final simplification77.9%

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

Alternative 8: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
{\left(\mathsf{hypot}\left(a \cdot \cos t\_0, b \cdot \sin t\_0\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval77.9%

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

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

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

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

    \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{2}} \]
  8. Final simplification77.9%

    \[\leadsto {\left(\mathsf{hypot}\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)}^{2} \]
  9. Add Preprocessing

Alternative 9: 79.7% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval77.9%

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

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

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

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

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

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

Alternative 10: 79.7% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 63.1% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.15 \cdot 10^{+147}:\\
\;\;\;\;{\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}\\

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


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. metadata-eval74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\left(\left(\pi \cdot 0.005555555555555556\right) \cdot \sqrt{angle}\right) \cdot \sqrt{angle}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2} \]
    11. Taylor expanded in a around inf 55.3%

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

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \]
      2. unpow255.3%

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
      3. unpow255.3%

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

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

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

        \[\leadsto \left(a \cdot a\right) \cdot {\cos \color{blue}{\left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)}}^{2} \]
      7. unpow255.3%

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
      8. swap-sqr55.3%

        \[\leadsto \color{blue}{\left(a \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \left(a \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
      9. unpow255.3%

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

        \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)}^{2} \]
    13. Simplified55.3%

      \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}} \]

    if 1.15e147 < b

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b \cdot b\right)} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \]
      4. swap-sqr79.0%

        \[\leadsto \color{blue}{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      5. unpow279.0%

        \[\leadsto \color{blue}{{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}} \]
      6. *-commutative79.0%

        \[\leadsto {\left(b \cdot \sin \left(0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right)\right)}^{2} \]
    7. Simplified79.0%

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

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

Alternative 12: 57.6% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.4 \cdot 10^{+154}:\\
\;\;\;\;{\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. metadata-eval74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\left(\left(\pi \cdot 0.005555555555555556\right) \cdot \sqrt{angle}\right) \cdot \sqrt{angle}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2} \]
    11. Taylor expanded in a around inf 55.3%

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

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \]
      2. unpow255.3%

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
      3. unpow255.3%

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

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

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

        \[\leadsto \left(a \cdot a\right) \cdot {\cos \color{blue}{\left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)}}^{2} \]
      7. unpow255.3%

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
      8. swap-sqr55.3%

        \[\leadsto \color{blue}{\left(a \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \left(a \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
      9. unpow255.3%

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

        \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)}^{2} \]
    13. Simplified55.3%

      \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}} \]

    if 2.40000000000000015e154 < b

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt40.8%

        \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
      2. sqrt-unprod38.2%

        \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
      3. pow-prod-up38.2%

        \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
      4. metadata-eval38.2%

        \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
    7. Applied egg-rr38.2%

      \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
    8. Step-by-step derivation
      1. add-cbrt-cube43.5%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}}} \]
      2. pow1/343.5%

        \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
      3. add-sqr-sqrt43.5%

        \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
      4. sqrt-pow143.5%

        \[\leadsto {\left({a}^{4} \cdot \color{blue}{{a}^{\left(\frac{4}{2}\right)}}\right)}^{0.3333333333333333} \]
      5. metadata-eval43.5%

        \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
      6. pow-prod-up43.5%

        \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
      7. metadata-eval43.5%

        \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
    9. Applied egg-rr43.5%

      \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 57.6% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.8 \cdot 10^{+154}:\\
\;\;\;\;{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \]
      2. *-commutative55.3%

        \[\leadsto \left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)}^{2} \]
      3. unpow255.3%

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      4. swap-sqr55.3%

        \[\leadsto \color{blue}{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      5. unpow255.3%

        \[\leadsto \color{blue}{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}} \]
      6. *-commutative55.3%

        \[\leadsto {\left(a \cdot \cos \left(0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right)\right)}^{2} \]
    7. Simplified55.3%

      \[\leadsto \color{blue}{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}} \]

    if 1.8e154 < b

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt40.8%

        \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
      2. sqrt-unprod38.2%

        \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
      3. pow-prod-up38.2%

        \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
      4. metadata-eval38.2%

        \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
    7. Applied egg-rr38.2%

      \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
    8. Step-by-step derivation
      1. add-cbrt-cube43.5%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}}} \]
      2. pow1/343.5%

        \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
      3. add-sqr-sqrt43.5%

        \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
      4. sqrt-pow143.5%

        \[\leadsto {\left({a}^{4} \cdot \color{blue}{{a}^{\left(\frac{4}{2}\right)}}\right)}^{0.3333333333333333} \]
      5. metadata-eval43.5%

        \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
      6. pow-prod-up43.5%

        \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
      7. metadata-eval43.5%

        \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
    9. Applied egg-rr43.5%

      \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.6%

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

Alternative 14: 57.9% accurate, 2.0× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 7 \cdot 10^{+155}:\\ \;\;\;\;a \cdot a\\ \mathbf{else}:\\ \;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\ \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (if (<= b 7e+155) (* a a) (pow (pow a 6.0) 0.3333333333333333)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	double tmp;
	if (b <= 7e+155) {
		tmp = a * a;
	} else {
		tmp = pow(pow(a, 6.0), 0.3333333333333333);
	}
	return tmp;
}
angle_m = abs(angle)
real(8) function code(a, b, angle_m)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle_m
    real(8) :: tmp
    if (b <= 7d+155) then
        tmp = a * a
    else
        tmp = (a ** 6.0d0) ** 0.3333333333333333d0
    end if
    code = tmp
end function
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	double tmp;
	if (b <= 7e+155) {
		tmp = a * a;
	} else {
		tmp = Math.pow(Math.pow(a, 6.0), 0.3333333333333333);
	}
	return tmp;
}
angle_m = math.fabs(angle)
def code(a, b, angle_m):
	tmp = 0
	if b <= 7e+155:
		tmp = a * a
	else:
		tmp = math.pow(math.pow(a, 6.0), 0.3333333333333333)
	return tmp
angle_m = abs(angle)
function code(a, b, angle_m)
	tmp = 0.0
	if (b <= 7e+155)
		tmp = Float64(a * a);
	else
		tmp = (a ^ 6.0) ^ 0.3333333333333333;
	end
	return tmp
end
angle_m = abs(angle);
function tmp_2 = code(a, b, angle_m)
	tmp = 0.0;
	if (b <= 7e+155)
		tmp = a * a;
	else
		tmp = (a ^ 6.0) ^ 0.3333333333333333;
	end
	tmp_2 = tmp;
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := If[LessEqual[b, 7e+155], N[(a * a), $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|

\\
\begin{array}{l}
\mathbf{if}\;b \leq 7 \cdot 10^{+155}:\\
\;\;\;\;a \cdot a\\

\mathbf{else}:\\
\;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    6. Step-by-step derivation
      1. unpow255.1%

        \[\leadsto \color{blue}{a \cdot a} \]
    7. Applied egg-rr55.1%

      \[\leadsto \color{blue}{a \cdot a} \]

    if 6.99999999999999969e155 < b

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt40.8%

        \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
      2. sqrt-unprod38.2%

        \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
      3. pow-prod-up38.2%

        \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
      4. metadata-eval38.2%

        \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
    7. Applied egg-rr38.2%

      \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
    8. Step-by-step derivation
      1. add-cbrt-cube43.5%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}}} \]
      2. pow1/343.5%

        \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
      3. add-sqr-sqrt43.5%

        \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
      4. sqrt-pow143.5%

        \[\leadsto {\left({a}^{4} \cdot \color{blue}{{a}^{\left(\frac{4}{2}\right)}}\right)}^{0.3333333333333333} \]
      5. metadata-eval43.5%

        \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
      6. pow-prod-up43.5%

        \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
      7. metadata-eval43.5%

        \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
    9. Applied egg-rr43.5%

      \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 57.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.4 \cdot 10^{+157}:\\
\;\;\;\;a \cdot a\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{a}^{6}}\\


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    6. Step-by-step derivation
      1. unpow255.1%

        \[\leadsto \color{blue}{a \cdot a} \]
    7. Applied egg-rr55.1%

      \[\leadsto \color{blue}{a \cdot a} \]

    if 3.39999999999999979e157 < b

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt40.8%

        \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
      2. sqrt-unprod38.2%

        \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
      3. pow-prod-up38.2%

        \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
      4. metadata-eval38.2%

        \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
    7. Applied egg-rr38.2%

      \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
    8. Step-by-step derivation
      1. add-cbrt-cube43.5%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}}} \]
      2. pow1/343.5%

        \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
      3. add-sqr-sqrt43.5%

        \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
      4. sqrt-pow143.5%

        \[\leadsto {\left({a}^{4} \cdot \color{blue}{{a}^{\left(\frac{4}{2}\right)}}\right)}^{0.3333333333333333} \]
      5. metadata-eval43.5%

        \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
      6. pow-prod-up43.5%

        \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
      7. metadata-eval43.5%

        \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
    9. Applied egg-rr43.5%

      \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
    10. Step-by-step derivation
      1. unpow1/343.5%

        \[\leadsto \color{blue}{\sqrt[3]{{a}^{6}}} \]
    11. Simplified43.5%

      \[\leadsto \color{blue}{\sqrt[3]{{a}^{6}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 57.6% accurate, 139.0× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ a \cdot a \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m) :precision binary64 (* a a))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	return a * a;
}
angle_m = abs(angle)
real(8) function code(a, b, angle_m)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle_m
    code = a * a
end function
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	return a * a;
}
angle_m = math.fabs(angle)
def code(a, b, angle_m):
	return a * a
angle_m = abs(angle)
function code(a, b, angle_m)
	return Float64(a * a)
end
angle_m = abs(angle);
function tmp = code(a, b, angle_m)
	tmp = a * a;
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := N[(a * a), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|

\\
a \cdot a
\end{array}
Derivation
  1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{a}^{2}} \]
  6. Step-by-step derivation
    1. unpow253.1%

      \[\leadsto \color{blue}{a \cdot a} \]
  7. Applied egg-rr53.1%

    \[\leadsto \color{blue}{a \cdot a} \]
  8. Add Preprocessing

Reproduce

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