ab-angle->ABCF C

Percentage Accurate: 79.7% → 79.7%
Time: 16.6s
Alternatives: 12
Speedup: 1.0×

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

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

Initial Program: 79.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.7% accurate, 0.4× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right), \cos 1, \sin \left(\mathsf{fma}\left(\pi, 0.005555555555555556 \cdot angle\_m, 1\right)\right) \cdot \sin 1\right)\right)}^{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
    (fma
     (cos (+ 1.0 (* 0.005555555555555556 (* angle_m PI))))
     (cos 1.0)
     (* (sin (fma PI (* 0.005555555555555556 angle_m) 1.0)) (sin 1.0))))
   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 * fma(cos((1.0 + (0.005555555555555556 * (angle_m * ((double) M_PI))))), cos(1.0), (sin(fma(((double) M_PI), (0.005555555555555556 * angle_m), 1.0)) * sin(1.0)))), 2.0) + pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0);
}
angle_m = abs(angle)
function code(a, b, angle_m)
	return Float64((Float64(a * fma(cos(Float64(1.0 + Float64(0.005555555555555556 * Float64(angle_m * pi)))), cos(1.0), Float64(sin(fma(pi, Float64(0.005555555555555556 * angle_m), 1.0)) * sin(1.0)))) ^ 2.0) + (Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0))
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[(N[Cos[N[(1.0 + N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[1.0], $MachinePrecision] + N[(N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] * N[Sin[1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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|

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

      \[\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}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. metadata-eval80.2%

        \[\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(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      2. div-inv80.2%

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

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

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

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

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

        \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      8. associate-*r*66.0%

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

        \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\color{blue}{0.005555555555555556 \cdot \left(\pi \cdot angle\right)}\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
    4. Applied egg-rr66.0%

      \[\leadsto {\left(a \cdot \color{blue}{\left(\cos \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
    5. Step-by-step derivation
      1. fma-define66.0%

        \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      2. log1p-undefine66.0%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(e^{\color{blue}{\log \left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      3. rem-exp-log66.0%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \color{blue}{\left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}, \cos 1, \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      4. *-commutative66.0%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      5. log1p-undefine66.0%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \sin \left(e^{\color{blue}{\log \left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      6. rem-exp-log80.2%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \sin \color{blue}{\left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      7. *-commutative80.2%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \sin \left(1 + 0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
    6. Simplified80.2%

      \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \sin \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin 1\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
    7. Step-by-step derivation
      1. *-un-lft-identity80.2%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \color{blue}{\left(1 \cdot \sin \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      2. +-commutative80.2%

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

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

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

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \left(1 \cdot \sin \left(\color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)} + 1\right)\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      6. fma-define80.3%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \left(1 \cdot \sin \color{blue}{\left(\mathsf{fma}\left(\pi, angle \cdot 0.005555555555555556, 1\right)\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      7. *-commutative80.3%

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

      \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \color{blue}{\left(1 \cdot \sin \left(\mathsf{fma}\left(\pi, 0.005555555555555556 \cdot angle, 1\right)\right)\right)} \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
    9. Step-by-step derivation
      1. *-lft-identity80.3%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \color{blue}{\sin \left(\mathsf{fma}\left(\pi, 0.005555555555555556 \cdot angle, 1\right)\right)} \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
    10. Simplified80.3%

      \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \color{blue}{\sin \left(\mathsf{fma}\left(\pi, 0.005555555555555556 \cdot angle, 1\right)\right)} \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
    11. Final simplification80.3%

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

    Alternative 2: 79.7% accurate, 0.5× speedup?

    \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := 1 + 0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\\ {\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2} + {\left(a \cdot \mathsf{fma}\left(\cos t\_0, \cos 1, \sin 1 \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 (+ 1.0 (* 0.005555555555555556 (* angle_m PI)))))
       (+
        (pow (* b (sin (* PI (* 0.005555555555555556 angle_m)))) 2.0)
        (pow (* a (fma (cos t_0) (cos 1.0) (* (sin 1.0) (sin t_0)))) 2.0))))
    angle_m = fabs(angle);
    double code(double a, double b, double angle_m) {
    	double t_0 = 1.0 + (0.005555555555555556 * (angle_m * ((double) M_PI)));
    	return pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0) + pow((a * fma(cos(t_0), cos(1.0), (sin(1.0) * sin(t_0)))), 2.0);
    }
    
    angle_m = abs(angle)
    function code(a, b, angle_m)
    	t_0 = Float64(1.0 + Float64(0.005555555555555556 * Float64(angle_m * pi)))
    	return Float64((Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0) + (Float64(a * fma(cos(t_0), cos(1.0), Float64(sin(1.0) * sin(t_0)))) ^ 2.0))
    end
    
    angle_m = N[Abs[angle], $MachinePrecision]
    code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(1.0 + N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[(N[Cos[t$95$0], $MachinePrecision] * N[Cos[1.0], $MachinePrecision] + N[(N[Sin[1.0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    angle_m = \left|angle\right|
    
    \\
    \begin{array}{l}
    t_0 := 1 + 0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\\
    {\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2} + {\left(a \cdot \mathsf{fma}\left(\cos t\_0, \cos 1, \sin 1 \cdot \sin t\_0\right)\right)}^{2}
    \end{array}
    \end{array}
    
    Derivation
    1. Initial program 80.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. Simplified80.2%

        \[\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}} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. metadata-eval80.2%

          \[\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(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        2. div-inv80.2%

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

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

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

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

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

          \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        8. associate-*r*66.0%

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

          \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\color{blue}{0.005555555555555556 \cdot \left(\pi \cdot angle\right)}\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      4. Applied egg-rr66.0%

        \[\leadsto {\left(a \cdot \color{blue}{\left(\cos \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      5. Step-by-step derivation
        1. fma-define66.0%

          \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        2. log1p-undefine66.0%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(e^{\color{blue}{\log \left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        3. rem-exp-log66.0%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \color{blue}{\left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}, \cos 1, \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        4. *-commutative66.0%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        5. log1p-undefine66.0%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \sin \left(e^{\color{blue}{\log \left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        6. rem-exp-log80.2%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \sin \color{blue}{\left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        7. *-commutative80.2%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \sin \left(1 + 0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right) \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      6. Simplified80.2%

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

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

      Alternative 3: 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(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2} \end{array} \]
      angle_m = (fabs.f64 angle)
      (FPCore (a b angle_m)
       :precision binary64
       (+
        (pow (* a (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(Float64(angle_m * 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[(N[(angle$95$m * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle_m = \left|angle\right|
      
      \\
      {\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2}
      \end{array}
      
      Derivation
      1. Initial program 80.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. Simplified80.2%

          \[\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}} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. metadata-eval80.2%

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

            \[\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/80.3%

            \[\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} \]
        4. Applied egg-rr80.3%

          \[\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} \]
        5. Final simplification80.3%

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

        Alternative 4: 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(\frac{\pi}{\frac{180}{angle\_m}}\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 (/ PI (/ 180.0 angle_m)))) 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((((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((a * Math.cos((Math.PI * (0.005555555555555556 * angle_m)))), 2.0) + Math.pow((b * Math.sin((Math.PI / (180.0 / angle_m)))), 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((math.pi / (180.0 / angle_m)))), 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(pi / Float64(180.0 / angle_m)))) ^ 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((pi / (180.0 / angle_m)))) ^ 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[(Pi / N[(180.0 / angle$95$m), $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(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2}
        \end{array}
        
        Derivation
        1. Initial program 80.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. Simplified80.2%

            \[\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}} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. metadata-eval80.2%

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

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

              \[\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{1}{\frac{180}{angle}}}\right)\right)}^{2} \]
            4. un-div-inv80.2%

              \[\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} \]
          4. Applied egg-rr80.2%

            \[\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} \]
          5. Final simplification80.2%

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

          Alternative 5: 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(b \cdot \sin t\_0\right)}^{2} + {\left(a \cdot \cos t\_0\right)}^{2} \end{array} \end{array} \]
          angle_m = (fabs.f64 angle)
          (FPCore (a b angle_m)
           :precision binary64
           (let* ((t_0 (* PI (* 0.005555555555555556 angle_m))))
             (+ (pow (* b (sin t_0)) 2.0) (pow (* a (cos 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((b * sin(t_0)), 2.0) + pow((a * cos(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((b * Math.sin(t_0)), 2.0) + Math.pow((a * Math.cos(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((b * math.sin(t_0)), 2.0) + math.pow((a * math.cos(t_0)), 2.0)
          
          angle_m = abs(angle)
          function code(a, b, angle_m)
          	t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m))
          	return Float64((Float64(b * sin(t_0)) ^ 2.0) + (Float64(a * cos(t_0)) ^ 2.0))
          end
          
          angle_m = abs(angle);
          function tmp = code(a, b, angle_m)
          	t_0 = pi * (0.005555555555555556 * angle_m);
          	tmp = ((b * sin(t_0)) ^ 2.0) + ((a * cos(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[(N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          angle_m = \left|angle\right|
          
          \\
          \begin{array}{l}
          t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
          {\left(b \cdot \sin t\_0\right)}^{2} + {\left(a \cdot \cos t\_0\right)}^{2}
          \end{array}
          \end{array}
          
          Derivation
          1. Initial program 80.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. Simplified80.2%

              \[\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}} \]
            2. Add Preprocessing
            3. Final simplification80.2%

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

            Alternative 6: 63.1% accurate, 2.0× speedup?

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

              1. Initial program 77.5%

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

                  \[\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}} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. metadata-eval77.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(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                  2. div-inv77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} \]
                  5. swap-sqr65.0%

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

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

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

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

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

                if 5.60000000000000013e144 < b

                1. Initial program 99.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. Simplified99.8%

                    \[\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}} \]
                  2. Add Preprocessing
                  3. Taylor expanded in a around 0 71.4%

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

                      \[\leadsto {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)}^{2} \]
                    2. unpow271.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. unpow271.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-sqr78.2%

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

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

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

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

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

                Alternative 7: 57.3% accurate, 2.0× speedup?

                \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 5.5 \cdot 10^{+153}:\\ \;\;\;\;{\left(a \cdot \cos \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{a}^{6}}\\ \end{array} \end{array} \]
                angle_m = (fabs.f64 angle)
                (FPCore (a b angle_m)
                 :precision binary64
                 (if (<= b 5.5e+153)
                   (pow (* a (cos (* angle_m (* 0.005555555555555556 PI)))) 2.0)
                   (cbrt (pow a 6.0))))
                angle_m = fabs(angle);
                double code(double a, double b, double angle_m) {
                	double tmp;
                	if (b <= 5.5e+153) {
                		tmp = pow((a * cos((angle_m * (0.005555555555555556 * ((double) M_PI))))), 2.0);
                	} 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 <= 5.5e+153) {
                		tmp = Math.pow((a * Math.cos((angle_m * (0.005555555555555556 * Math.PI)))), 2.0);
                	} 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 <= 5.5e+153)
                		tmp = Float64(a * cos(Float64(angle_m * Float64(0.005555555555555556 * pi)))) ^ 2.0;
                	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, 5.5e+153], N[Power[N[(a * N[Cos[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $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 5.5 \cdot 10^{+153}:\\
                \;\;\;\;{\left(a \cdot \cos \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)}^{2}\\
                
                \mathbf{else}:\\
                \;\;\;\;\sqrt[3]{{a}^{6}}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if b < 5.5000000000000003e153

                  1. Initial program 77.7%

                    \[{\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. Simplified77.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}} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. metadata-eval77.7%

                        \[\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(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                      2. div-inv77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} \]
                      5. swap-sqr64.9%

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

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

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

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

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

                    if 5.5000000000000003e153 < b

                    1. Initial program 99.9%

                      \[{\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. Simplified99.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}} \]
                      2. Add Preprocessing
                      3. Taylor expanded in angle around 0 43.1%

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

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

                        \[\leadsto \color{blue}{a \cdot a} \]
                      6. Step-by-step derivation
                        1. pow243.1%

                          \[\leadsto \color{blue}{{a}^{2}} \]
                        2. add-cbrt-cube49.5%

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

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

                          \[\leadsto {\left(\left(\color{blue}{\left(a \cdot a\right)} \cdot {a}^{2}\right) \cdot {a}^{2}\right)}^{0.3333333333333333} \]
                        5. pow249.5%

                          \[\leadsto {\left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot {a}^{2}\right)}^{0.3333333333333333} \]
                        6. pow249.5%

                          \[\leadsto {\left(\left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(a \cdot a\right)}\right)}^{0.3333333333333333} \]
                        7. pow349.5%

                          \[\leadsto {\color{blue}{\left({\left(a \cdot a\right)}^{3}\right)}}^{0.3333333333333333} \]
                        8. pow249.5%

                          \[\leadsto {\left({\color{blue}{\left({a}^{2}\right)}}^{3}\right)}^{0.3333333333333333} \]
                        9. pow-pow49.5%

                          \[\leadsto {\color{blue}{\left({a}^{\left(2 \cdot 3\right)}\right)}}^{0.3333333333333333} \]
                        10. metadata-eval49.5%

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

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

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

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

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

                    Alternative 8: 57.3% accurate, 2.0× speedup?

                    \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 5.8 \cdot 10^{+153}:\\ \;\;\;\;{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{a}^{6}}\\ \end{array} \end{array} \]
                    angle_m = (fabs.f64 angle)
                    (FPCore (a b angle_m)
                     :precision binary64
                     (if (<= b 5.8e+153)
                       (pow (* a (cos (* 0.005555555555555556 (* angle_m PI)))) 2.0)
                       (cbrt (pow a 6.0))))
                    angle_m = fabs(angle);
                    double code(double a, double b, double angle_m) {
                    	double tmp;
                    	if (b <= 5.8e+153) {
                    		tmp = pow((a * cos((0.005555555555555556 * (angle_m * ((double) M_PI))))), 2.0);
                    	} 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 <= 5.8e+153) {
                    		tmp = Math.pow((a * Math.cos((0.005555555555555556 * (angle_m * Math.PI)))), 2.0);
                    	} 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 <= 5.8e+153)
                    		tmp = Float64(a * cos(Float64(0.005555555555555556 * Float64(angle_m * pi)))) ^ 2.0;
                    	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, 5.8e+153], N[Power[N[(a * N[Cos[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $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 5.8 \cdot 10^{+153}:\\
                    \;\;\;\;{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\sqrt[3]{{a}^{6}}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if b < 5.80000000000000004e153

                      1. Initial program 77.7%

                        \[{\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. Simplified77.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}} \]
                        2. Add Preprocessing
                        3. Taylor expanded in a around inf 64.9%

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

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

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

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

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

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

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

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

                        if 5.80000000000000004e153 < b

                        1. Initial program 99.9%

                          \[{\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. Simplified99.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}} \]
                          2. Add Preprocessing
                          3. Taylor expanded in angle around 0 43.1%

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

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

                            \[\leadsto \color{blue}{a \cdot a} \]
                          6. Step-by-step derivation
                            1. pow243.1%

                              \[\leadsto \color{blue}{{a}^{2}} \]
                            2. add-cbrt-cube49.5%

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

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

                              \[\leadsto {\left(\left(\color{blue}{\left(a \cdot a\right)} \cdot {a}^{2}\right) \cdot {a}^{2}\right)}^{0.3333333333333333} \]
                            5. pow249.5%

                              \[\leadsto {\left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot {a}^{2}\right)}^{0.3333333333333333} \]
                            6. pow249.5%

                              \[\leadsto {\left(\left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(a \cdot a\right)}\right)}^{0.3333333333333333} \]
                            7. pow349.5%

                              \[\leadsto {\color{blue}{\left({\left(a \cdot a\right)}^{3}\right)}}^{0.3333333333333333} \]
                            8. pow249.5%

                              \[\leadsto {\left({\color{blue}{\left({a}^{2}\right)}}^{3}\right)}^{0.3333333333333333} \]
                            9. pow-pow49.5%

                              \[\leadsto {\color{blue}{\left({a}^{\left(2 \cdot 3\right)}\right)}}^{0.3333333333333333} \]
                            10. metadata-eval49.5%

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

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

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

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

                        Alternative 9: 79.6% accurate, 2.0× speedup?

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

                            \[\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}} \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. metadata-eval80.2%

                              \[\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(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                            2. div-inv80.2%

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

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

                              \[\leadsto {\color{blue}{\log \left(1 + \mathsf{expm1}\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)}}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                            5. pow161.8%

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

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

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

                              \[\leadsto {\log \left(1 + \mathsf{expm1}\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                            9. associate-*r*61.8%

                              \[\leadsto {\log \left(1 + \mathsf{expm1}\left(a \cdot \cos \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                            10. *-commutative61.8%

                              \[\leadsto {\log \left(1 + \mathsf{expm1}\left(a \cdot \cos \color{blue}{\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                          4. Applied egg-rr61.8%

                            \[\leadsto {\color{blue}{\log \left(1 + \mathsf{expm1}\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)}}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                          5. Taylor expanded in angle around 0 61.8%

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

                              \[\leadsto {\color{blue}{\left(\mathsf{log1p}\left(\mathsf{expm1}\left(a\right)\right)\right)}}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
                            2. log1p-expm1-u80.2%

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

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

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

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

                          Alternative 10: 57.3% accurate, 2.0× speedup?

                          \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{+158}:\\ \;\;\;\;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 5.1e+158) (* 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 <= 5.1e+158) {
                          		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 <= 5.1d+158) 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 <= 5.1e+158) {
                          		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 <= 5.1e+158:
                          		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 <= 5.1e+158)
                          		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 <= 5.1e+158)
                          		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, 5.1e+158], 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 5.1 \cdot 10^{+158}:\\
                          \;\;\;\;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 < 5.09999999999999987e158

                            1. Initial program 77.7%

                              \[{\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. Simplified77.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}} \]
                              2. Add Preprocessing
                              3. Taylor expanded in angle around 0 64.8%

                                \[\leadsto \color{blue}{{a}^{2}} \]
                              4. Step-by-step derivation
                                1. unpow264.8%

                                  \[\leadsto \color{blue}{a \cdot a} \]
                              5. Applied egg-rr64.8%

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

                              if 5.09999999999999987e158 < b

                              1. Initial program 99.9%

                                \[{\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. Simplified99.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}} \]
                                2. Add Preprocessing
                                3. Taylor expanded in angle around 0 43.1%

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

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

                                  \[\leadsto \color{blue}{a \cdot a} \]
                                6. Step-by-step derivation
                                  1. pow243.1%

                                    \[\leadsto \color{blue}{{a}^{2}} \]
                                  2. add-cbrt-cube49.5%

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

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

                                    \[\leadsto {\left(\left(\color{blue}{\left(a \cdot a\right)} \cdot {a}^{2}\right) \cdot {a}^{2}\right)}^{0.3333333333333333} \]
                                  5. pow249.5%

                                    \[\leadsto {\left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot {a}^{2}\right)}^{0.3333333333333333} \]
                                  6. pow249.5%

                                    \[\leadsto {\left(\left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(a \cdot a\right)}\right)}^{0.3333333333333333} \]
                                  7. pow349.5%

                                    \[\leadsto {\color{blue}{\left({\left(a \cdot a\right)}^{3}\right)}}^{0.3333333333333333} \]
                                  8. pow249.5%

                                    \[\leadsto {\left({\color{blue}{\left({a}^{2}\right)}}^{3}\right)}^{0.3333333333333333} \]
                                  9. pow-pow49.5%

                                    \[\leadsto {\color{blue}{\left({a}^{\left(2 \cdot 3\right)}\right)}}^{0.3333333333333333} \]
                                  10. metadata-eval49.5%

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

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

                              Alternative 11: 57.3% accurate, 2.0× speedup?

                              \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 6 \cdot 10^{+153}:\\ \;\;\;\;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 6e+153) (* a a) (cbrt (pow a 6.0))))
                              angle_m = fabs(angle);
                              double code(double a, double b, double angle_m) {
                              	double tmp;
                              	if (b <= 6e+153) {
                              		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 <= 6e+153) {
                              		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 <= 6e+153)
                              		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, 6e+153], 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 6 \cdot 10^{+153}:\\
                              \;\;\;\;a \cdot a\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\sqrt[3]{{a}^{6}}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if b < 6.00000000000000037e153

                                1. Initial program 77.7%

                                  \[{\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. Simplified77.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}} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in angle around 0 64.8%

                                    \[\leadsto \color{blue}{{a}^{2}} \]
                                  4. Step-by-step derivation
                                    1. unpow264.8%

                                      \[\leadsto \color{blue}{a \cdot a} \]
                                  5. Applied egg-rr64.8%

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

                                  if 6.00000000000000037e153 < b

                                  1. Initial program 99.9%

                                    \[{\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. Simplified99.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}} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in angle around 0 43.1%

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

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

                                      \[\leadsto \color{blue}{a \cdot a} \]
                                    6. Step-by-step derivation
                                      1. pow243.1%

                                        \[\leadsto \color{blue}{{a}^{2}} \]
                                      2. add-cbrt-cube49.5%

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

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

                                        \[\leadsto {\left(\left(\color{blue}{\left(a \cdot a\right)} \cdot {a}^{2}\right) \cdot {a}^{2}\right)}^{0.3333333333333333} \]
                                      5. pow249.5%

                                        \[\leadsto {\left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot {a}^{2}\right)}^{0.3333333333333333} \]
                                      6. pow249.5%

                                        \[\leadsto {\left(\left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(a \cdot a\right)}\right)}^{0.3333333333333333} \]
                                      7. pow349.5%

                                        \[\leadsto {\color{blue}{\left({\left(a \cdot a\right)}^{3}\right)}}^{0.3333333333333333} \]
                                      8. pow249.5%

                                        \[\leadsto {\left({\color{blue}{\left({a}^{2}\right)}}^{3}\right)}^{0.3333333333333333} \]
                                      9. pow-pow49.5%

                                        \[\leadsto {\color{blue}{\left({a}^{\left(2 \cdot 3\right)}\right)}}^{0.3333333333333333} \]
                                      10. metadata-eval49.5%

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

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

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

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

                                  Alternative 12: 56.7% 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 80.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. Simplified80.2%

                                      \[\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}} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in angle around 0 62.4%

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

                                        \[\leadsto \color{blue}{a \cdot a} \]
                                    5. Applied egg-rr62.4%

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

                                    Reproduce

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