ab-angle->ABCF C

Percentage Accurate: 79.7% → 79.6%
Time: 17.2s
Alternatives: 9
Speedup: N/A×

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

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

Initial Program: 79.7% accurate, 1.0× speedup?

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

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

Alternative 1: 79.6% accurate, 0.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, \left(e^{\mathsf{log1p}\left(\sin \left(\mathsf{fma}\left(angle\_m, 0.005555555555555556 \cdot \pi, 1\right)\right)\right)} + -1\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)
     (*
      (+
       (exp (log1p (sin (fma angle_m (* 0.005555555555555556 PI) 1.0))))
       -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), ((exp(log1p(sin(fma(angle_m, (0.005555555555555556 * ((double) M_PI)), 1.0)))) + -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(Float64(exp(log1p(sin(fma(angle_m, Float64(0.005555555555555556 * pi), 1.0)))) + -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[(N[Exp[N[Log[1 + N[Sin[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + -1.0), $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, \left(e^{\mathsf{log1p}\left(\sin \left(\mathsf{fma}\left(angle\_m, 0.005555555555555556 \cdot \pi, 1\right)\right)\right)} + -1\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 82.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. Simplified83.0%

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

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

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

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

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

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

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

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

        \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\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. metadata-eval67.5%

        \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\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. Applied egg-rr67.5%

      \[\leadsto {\left(a \cdot \color{blue}{\left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-define67.4%

        \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-undefine67.4%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(e^{\color{blue}{\log \left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-log67.5%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \color{blue}{\left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}, \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*67.4%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. *-commutative67.4%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{\left(angle \cdot \pi\right)} \cdot 0.005555555555555556\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*67.4%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. log1p-undefine67.4%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(e^{\color{blue}{\log \left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\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. rem-exp-log82.9%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \color{blue}{\left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*82.9%

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

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

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(1 + \color{blue}{angle \cdot \left(\pi \cdot 0.005555555555555556\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. Simplified82.9%

      \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\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. Taylor expanded in angle around inf 82.9%

      \[\leadsto {\left(a \cdot \mathsf{fma}\left(\color{blue}{\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}, \cos 1, \sin \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\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. Step-by-step derivation
      1. expm1-log1p-u82.9%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \cos 1, \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\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. expm1-undefine82.9%

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

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

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

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

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

    Alternative 2: 79.6% accurate, 0.5× 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} + {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right), \cos 1, \sin 1 \cdot \sin \left(1 + angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)}^{2} \end{array} \]
    angle_m = (fabs.f64 angle)
    (FPCore (a b angle_m)
     :precision binary64
     (+
      (pow (* b (sin (* PI (* 0.005555555555555556 angle_m)))) 2.0)
      (pow
       (*
        a
        (fma
         (cos (+ 1.0 (* 0.005555555555555556 (* angle_m PI))))
         (cos 1.0)
         (* (sin 1.0) (sin (+ 1.0 (* angle_m (* 0.005555555555555556 PI)))))))
       2.0)))
    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) + pow((a * fma(cos((1.0 + (0.005555555555555556 * (angle_m * ((double) M_PI))))), cos(1.0), (sin(1.0) * sin((1.0 + (angle_m * (0.005555555555555556 * ((double) M_PI)))))))), 2.0);
    }
    
    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 * fma(cos(Float64(1.0 + Float64(0.005555555555555556 * Float64(angle_m * pi)))), cos(1.0), Float64(sin(1.0) * sin(Float64(1.0 + Float64(angle_m * Float64(0.005555555555555556 * pi))))))) ^ 2.0))
    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[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[1.0], $MachinePrecision] * N[Sin[N[(1.0 + N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $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} + {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + 0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right), \cos 1, \sin 1 \cdot \sin \left(1 + angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)}^{2}
    \end{array}
    
    Derivation
    1. Initial program 82.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. Simplified83.0%

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

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

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

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

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

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

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

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

          \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\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. metadata-eval67.5%

          \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\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. Applied egg-rr67.5%

        \[\leadsto {\left(a \cdot \color{blue}{\left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-define67.4%

          \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-undefine67.4%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(e^{\color{blue}{\log \left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-log67.5%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \color{blue}{\left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}, \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*67.4%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. *-commutative67.4%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{\left(angle \cdot \pi\right)} \cdot 0.005555555555555556\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*67.4%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. log1p-undefine67.4%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(e^{\color{blue}{\log \left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\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. rem-exp-log82.9%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \color{blue}{\left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*82.9%

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

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

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(1 + \color{blue}{angle \cdot \left(\pi \cdot 0.005555555555555556\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. Simplified82.9%

        \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\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. Taylor expanded in angle around inf 82.9%

        \[\leadsto {\left(a \cdot \mathsf{fma}\left(\color{blue}{\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}, \cos 1, \sin \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\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. Final simplification82.9%

        \[\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 + angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)}^{2} \]
      9. Add Preprocessing

      Alternative 3: 79.6% 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 82.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. Simplified83.0%

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

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

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

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

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

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

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

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

            \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\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. metadata-eval67.5%

            \[\leadsto {\left(a \cdot \left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\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. Applied egg-rr67.5%

          \[\leadsto {\left(a \cdot \color{blue}{\left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos 1 + \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-define67.4%

            \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-undefine67.4%

            \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(e^{\color{blue}{\log \left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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-log67.5%

            \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \color{blue}{\left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}, \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*67.4%

            \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. *-commutative67.4%

            \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{\left(angle \cdot \pi\right)} \cdot 0.005555555555555556\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*67.4%

            \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + \color{blue}{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right), \cos 1, \sin \left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\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. log1p-undefine67.4%

            \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(e^{\color{blue}{\log \left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\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. rem-exp-log82.9%

            \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \color{blue}{\left(1 + \pi \cdot \left(angle \cdot 0.005555555555555556\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. associate-*r*82.9%

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

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

            \[\leadsto {\left(a \cdot \mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(1 + \color{blue}{angle \cdot \left(\pi \cdot 0.005555555555555556\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. Simplified82.9%

          \[\leadsto {\left(a \cdot \color{blue}{\mathsf{fma}\left(\cos \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \cos 1, \sin \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\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. Taylor expanded in angle around inf 82.9%

          \[\leadsto {\left(a \cdot \mathsf{fma}\left(\color{blue}{\cos \left(1 + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}, \cos 1, \sin \left(1 + angle \cdot \left(\pi \cdot 0.005555555555555556\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. Taylor expanded in angle around inf 83.0%

          \[\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(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} \]
        9. Final simplification83.0%

          \[\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} \]
        10. Add Preprocessing

        Alternative 4: 79.7% accurate, 1.0× speedup?

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

            \[\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. Applied egg-rr83.0%

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

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

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

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

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

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

            Alternative 6: 53.4% accurate, 2.0× speedup?

            \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;a \leq 2.5 \cdot 10^{-99}:\\ \;\;\;\;{\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;a \cdot a\\ \end{array} \end{array} \]
            angle_m = (fabs.f64 angle)
            (FPCore (a b angle_m)
             :precision binary64
             (if (<= a 2.5e-99)
               (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) {
            	double tmp;
            	if (a <= 2.5e-99) {
            		tmp = pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0);
            	} else {
            		tmp = a * a;
            	}
            	return tmp;
            }
            
            angle_m = Math.abs(angle);
            public static double code(double a, double b, double angle_m) {
            	double tmp;
            	if (a <= 2.5e-99) {
            		tmp = Math.pow((b * Math.sin((Math.PI * (0.005555555555555556 * angle_m)))), 2.0);
            	} else {
            		tmp = a * a;
            	}
            	return tmp;
            }
            
            angle_m = math.fabs(angle)
            def code(a, b, angle_m):
            	tmp = 0
            	if a <= 2.5e-99:
            		tmp = math.pow((b * math.sin((math.pi * (0.005555555555555556 * angle_m)))), 2.0)
            	else:
            		tmp = a * a
            	return tmp
            
            angle_m = abs(angle)
            function code(a, b, angle_m)
            	tmp = 0.0
            	if (a <= 2.5e-99)
            		tmp = Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0;
            	else
            		tmp = Float64(a * a);
            	end
            	return tmp
            end
            
            angle_m = abs(angle);
            function tmp_2 = code(a, b, angle_m)
            	tmp = 0.0;
            	if (a <= 2.5e-99)
            		tmp = (b * sin((pi * (0.005555555555555556 * angle_m)))) ^ 2.0;
            	else
            		tmp = a * a;
            	end
            	tmp_2 = tmp;
            end
            
            angle_m = N[Abs[angle], $MachinePrecision]
            code[a_, b_, angle$95$m_] := If[LessEqual[a, 2.5e-99], 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]]
            
            \begin{array}{l}
            angle_m = \left|angle\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;a \leq 2.5 \cdot 10^{-99}:\\
            \;\;\;\;{\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}\\
            
            \mathbf{else}:\\
            \;\;\;\;a \cdot a\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if a < 2.49999999999999985e-99

              1. Initial program 85.6%

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

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

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

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

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

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

                  \[\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. Taylor expanded in a around 0 46.3%

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

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

                if 2.49999999999999985e-99 < a

                1. Initial program 78.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. Simplified78.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 70.5%

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

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

                    \[\leadsto \color{blue}{a \cdot a} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification58.9%

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

                Alternative 7: 53.4% accurate, 2.0× speedup?

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

                  1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.60000000000000005e-99 < a

                    1. Initial program 78.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. Simplified78.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 70.5%

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

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

                        \[\leadsto \color{blue}{a \cdot a} \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification58.9%

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

                    Alternative 8: 58.1% accurate, 2.0× speedup?

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

                      1. Initial program 81.1%

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

                          \[\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 2.30000000000000002e163 < b

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

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

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

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

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

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

                              \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
                          5. Applied egg-rr41.9%

                            \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
                          6. Step-by-step derivation
                            1. add-cbrt-cube45.7%

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

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

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

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

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

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

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

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

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

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

                        Alternative 9: 57.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 82.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. Simplified83.0%

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

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

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

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

                          Reproduce

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