ab-angle->ABCF A

Percentage Accurate: 79.5% → 79.5%
Time: 5.6s
Alternatives: 12
Speedup: 0.3×

Specification

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

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

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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 79.5% accurate, 0.3× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \frac{\left(\pi \cdot angle\_m\right) \cdot 2}{360}\\ t_1 := {\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\\ {\left(a \cdot \sin \left(\frac{0.005555555555555556}{\frac{1}{angle\_m}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin t\_0, \cos t\_1, \cos t\_0 \cdot \sin t\_1\right)\right)}^{2} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (let* ((t_0 (/ (* (* PI angle_m) 2.0) 360.0))
        (t_1 (* (pow (cbrt PI) 2.0) (* (cbrt PI) 0.5))))
   (+
    (pow (* a (sin (* (/ 0.005555555555555556 (/ 1.0 angle_m)) PI))) 2.0)
    (pow (* b (fma (sin t_0) (cos t_1) (* (cos t_0) (sin t_1)))) 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	double t_0 = ((((double) M_PI) * angle_m) * 2.0) / 360.0;
	double t_1 = pow(cbrt(((double) M_PI)), 2.0) * (cbrt(((double) M_PI)) * 0.5);
	return pow((a * sin(((0.005555555555555556 / (1.0 / angle_m)) * ((double) M_PI)))), 2.0) + pow((b * fma(sin(t_0), cos(t_1), (cos(t_0) * sin(t_1)))), 2.0);
}
angle_m = abs(angle)
function code(a, b, angle_m)
	t_0 = Float64(Float64(Float64(pi * angle_m) * 2.0) / 360.0)
	t_1 = Float64((cbrt(pi) ^ 2.0) * Float64(cbrt(pi) * 0.5))
	return Float64((Float64(a * sin(Float64(Float64(0.005555555555555556 / Float64(1.0 / angle_m)) * pi))) ^ 2.0) + (Float64(b * fma(sin(t_0), cos(t_1), Float64(cos(t_0) * sin(t_1)))) ^ 2.0))
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * 2.0), $MachinePrecision] / 360.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(N[(0.005555555555555556 / N[(1.0 / angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision] + N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
angle_m = \left|angle\right|

\\
\begin{array}{l}
t_0 := \frac{\left(\pi \cdot angle\_m\right) \cdot 2}{360}\\
t_1 := {\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\\
{\left(a \cdot \sin \left(\frac{0.005555555555555556}{\frac{1}{angle\_m}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin t\_0, \cos t\_1, \cos t\_0 \cdot \sin t\_1\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 79.5%

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\cos \left(\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
    2. sin-+PI/2-revN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(\frac{angle}{180} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)}^{2} \]
    3. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle}{180} \cdot \pi} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    4. lift-/.f64N/A

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle \cdot \pi}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    6. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \pi}{180} + \frac{\color{blue}{\pi}}{2}\right)\right)}^{2} \]
    7. common-denominatorN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2 + \pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    8. div-addN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2} + \frac{\pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    9. sin-sumN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\sin \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \cos \left(\frac{\pi \cdot 180}{180 \cdot 2}\right) + \cos \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \sin \left(\frac{\pi \cdot 180}{180 \cdot 2}\right)\right)}\right)}^{2} \]
    10. lower-fma.f64N/A

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\frac{\pi \cdot 180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)}\right)}^{2} \]
  4. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\frac{\pi \cdot 180}{360}\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    2. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\frac{\color{blue}{\pi \cdot 180}}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    3. associate-/l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\pi \cdot \frac{180}{360}\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    4. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    5. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)} \cdot \frac{180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    6. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    7. associate-*l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    8. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    9. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\sqrt[3]{\color{blue}{\pi}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    10. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\color{blue}{{\pi}^{\frac{1}{3}}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    11. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left({\pi}^{\frac{1}{3}} \cdot \sqrt[3]{\color{blue}{\pi}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    12. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left({\pi}^{\frac{1}{3}} \cdot \color{blue}{{\pi}^{\frac{1}{3}}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    13. pow-prod-upN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    14. lower-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    15. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\color{blue}{\frac{2}{3}}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    16. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \color{blue}{\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    17. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\color{blue}{\pi}} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    18. lower-cbrt.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\color{blue}{\sqrt[3]{\pi}} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
  5. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
  6. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\frac{\pi \cdot 180}{360}\right)}\right)\right)}^{2} \]
    2. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\color{blue}{\pi \cdot 180}}{360}\right)\right)\right)}^{2} \]
    3. associate-/l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{180}{360}\right)}\right)\right)}^{2} \]
    4. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{180}{360}\right)\right)\right)}^{2} \]
    5. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)} \cdot \frac{180}{360}\right)\right)\right)}^{2} \]
    6. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)}^{2} \]
    7. associate-*l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}\right)\right)}^{2} \]
    8. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}\right)\right)}^{2} \]
    9. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\sqrt[3]{\color{blue}{\pi}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    10. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\color{blue}{{\pi}^{\frac{1}{3}}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    11. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left({\pi}^{\frac{1}{3}} \cdot \sqrt[3]{\color{blue}{\pi}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    12. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left({\pi}^{\frac{1}{3}} \cdot \color{blue}{{\pi}^{\frac{1}{3}}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    13. pow-prod-upN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    14. lower-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    15. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\color{blue}{\frac{2}{3}}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    16. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \color{blue}{\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)}\right)\right)\right)}^{2} \]
    17. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\color{blue}{\pi}} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    18. lower-cbrt.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\color{blue}{\sqrt[3]{\pi}} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  7. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)}\right)\right)}^{2} \]
  8. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\pi}^{\frac{2}{3}}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    2. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\color{blue}{\left(\frac{2}{3}\right)}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    3. pow-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    4. lift-cbrt.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\color{blue}{\left(\sqrt[3]{\pi}\right)}}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    5. lower-pow.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  9. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  10. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\pi}^{\frac{2}{3}}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    2. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\color{blue}{\left(\frac{2}{3}\right)}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    3. pow-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    4. lift-cbrt.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\color{blue}{\left(\sqrt[3]{\pi}\right)}}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    5. lower-pow.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  11. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  12. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\color{blue}{\frac{angle}{180}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    2. div-flip-revN/A

      \[\leadsto {\left(a \cdot \sin \left(\color{blue}{\frac{1}{\frac{180}{angle}}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    3. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{1}{\color{blue}{\frac{180}{angle}}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    4. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{1}{\color{blue}{\frac{180}{angle}}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    5. mult-flipN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{1}{\color{blue}{180 \cdot \frac{1}{angle}}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    6. associate-/r*N/A

      \[\leadsto {\left(a \cdot \sin \left(\color{blue}{\frac{\frac{1}{180}}{\frac{1}{angle}}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    7. lower-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\color{blue}{\frac{\frac{1}{180}}{\frac{1}{angle}}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    8. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{\color{blue}{\frac{1}{180}}}{\frac{1}{angle}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    9. lower-/.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{0.005555555555555556}{\color{blue}{\frac{1}{angle}}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  13. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\color{blue}{\frac{0.005555555555555556}{\frac{1}{angle}}} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  14. Add Preprocessing

Alternative 2: 79.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\left(\pi \cdot angle\_m\right) \cdot 2}{360}\\
t_1 := {\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin t\_0, \cos t\_1, \cos t\_0 \cdot \sin t\_1\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 79.5%

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\cos \left(\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
    2. sin-+PI/2-revN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(\frac{angle}{180} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)}^{2} \]
    3. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle}{180} \cdot \pi} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    4. lift-/.f64N/A

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle \cdot \pi}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    6. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \pi}{180} + \frac{\color{blue}{\pi}}{2}\right)\right)}^{2} \]
    7. common-denominatorN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2 + \pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    8. div-addN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2} + \frac{\pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    9. sin-sumN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\sin \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \cos \left(\frac{\pi \cdot 180}{180 \cdot 2}\right) + \cos \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \sin \left(\frac{\pi \cdot 180}{180 \cdot 2}\right)\right)}\right)}^{2} \]
    10. lower-fma.f64N/A

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\frac{\pi \cdot 180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)}\right)}^{2} \]
  4. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\frac{\pi \cdot 180}{360}\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    2. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\frac{\color{blue}{\pi \cdot 180}}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    3. associate-/l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\pi \cdot \frac{180}{360}\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    4. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    5. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)} \cdot \frac{180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    6. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    7. associate-*l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    8. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    9. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\sqrt[3]{\color{blue}{\pi}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    10. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\color{blue}{{\pi}^{\frac{1}{3}}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    11. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left({\pi}^{\frac{1}{3}} \cdot \sqrt[3]{\color{blue}{\pi}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    12. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left({\pi}^{\frac{1}{3}} \cdot \color{blue}{{\pi}^{\frac{1}{3}}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    13. pow-prod-upN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    14. lower-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    15. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\color{blue}{\frac{2}{3}}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    16. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \color{blue}{\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    17. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\color{blue}{\pi}} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    18. lower-cbrt.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\color{blue}{\sqrt[3]{\pi}} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
  5. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
  6. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\frac{\pi \cdot 180}{360}\right)}\right)\right)}^{2} \]
    2. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\color{blue}{\pi \cdot 180}}{360}\right)\right)\right)}^{2} \]
    3. associate-/l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{180}{360}\right)}\right)\right)}^{2} \]
    4. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{180}{360}\right)\right)\right)}^{2} \]
    5. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)} \cdot \frac{180}{360}\right)\right)\right)}^{2} \]
    6. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)}^{2} \]
    7. associate-*l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}\right)\right)}^{2} \]
    8. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}\right)\right)}^{2} \]
    9. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\sqrt[3]{\color{blue}{\pi}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    10. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\color{blue}{{\pi}^{\frac{1}{3}}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    11. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left({\pi}^{\frac{1}{3}} \cdot \sqrt[3]{\color{blue}{\pi}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    12. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left({\pi}^{\frac{1}{3}} \cdot \color{blue}{{\pi}^{\frac{1}{3}}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    13. pow-prod-upN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    14. lower-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    15. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\color{blue}{\frac{2}{3}}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    16. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \color{blue}{\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)}\right)\right)\right)}^{2} \]
    17. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\color{blue}{\pi}} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    18. lower-cbrt.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\color{blue}{\sqrt[3]{\pi}} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  7. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)}\right)\right)}^{2} \]
  8. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\pi}^{\frac{2}{3}}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    2. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\color{blue}{\left(\frac{2}{3}\right)}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    3. pow-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    4. lift-cbrt.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\color{blue}{\left(\sqrt[3]{\pi}\right)}}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    5. lower-pow.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  9. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  10. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\pi}^{\frac{2}{3}}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    2. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\color{blue}{\left(\frac{2}{3}\right)}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    3. pow-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    4. lift-cbrt.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\color{blue}{\left(\sqrt[3]{\pi}\right)}}^{2} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    5. lower-pow.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  11. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  12. Add Preprocessing

Alternative 3: 79.5% accurate, 0.4× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \frac{\left(\pi \cdot angle\_m\right) \cdot 2}{360}\\ t_1 := {\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\\ {\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin t\_0, \cos t\_1, \cos t\_0 \cdot \sin t\_1\right)\right)}^{2} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (let* ((t_0 (/ (* (* PI angle_m) 2.0) 360.0))
        (t_1 (* (pow PI 0.6666666666666666) (* (cbrt PI) 0.5))))
   (+
    (pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0)
    (pow (* b (fma (sin t_0) (cos t_1) (* (cos t_0) (sin t_1)))) 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	double t_0 = ((((double) M_PI) * angle_m) * 2.0) / 360.0;
	double t_1 = pow(((double) M_PI), 0.6666666666666666) * (cbrt(((double) M_PI)) * 0.5);
	return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow((b * fma(sin(t_0), cos(t_1), (cos(t_0) * sin(t_1)))), 2.0);
}
angle_m = abs(angle)
function code(a, b, angle_m)
	t_0 = Float64(Float64(Float64(pi * angle_m) * 2.0) / 360.0)
	t_1 = Float64((pi ^ 0.6666666666666666) * Float64(cbrt(pi) * 0.5))
	return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (Float64(b * fma(sin(t_0), cos(t_1), Float64(cos(t_0) * sin(t_1)))) ^ 2.0))
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * 2.0), $MachinePrecision] / 360.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[Pi, 0.6666666666666666], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision] + N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
angle_m = \left|angle\right|

\\
\begin{array}{l}
t_0 := \frac{\left(\pi \cdot angle\_m\right) \cdot 2}{360}\\
t_1 := {\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin t\_0, \cos t\_1, \cos t\_0 \cdot \sin t\_1\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 79.5%

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\cos \left(\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
    2. sin-+PI/2-revN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(\frac{angle}{180} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)}^{2} \]
    3. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle}{180} \cdot \pi} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    4. lift-/.f64N/A

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle \cdot \pi}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    6. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \pi}{180} + \frac{\color{blue}{\pi}}{2}\right)\right)}^{2} \]
    7. common-denominatorN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2 + \pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    8. div-addN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2} + \frac{\pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    9. sin-sumN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\sin \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \cos \left(\frac{\pi \cdot 180}{180 \cdot 2}\right) + \cos \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \sin \left(\frac{\pi \cdot 180}{180 \cdot 2}\right)\right)}\right)}^{2} \]
    10. lower-fma.f64N/A

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\frac{\pi \cdot 180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)}\right)}^{2} \]
  4. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\frac{\pi \cdot 180}{360}\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    2. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\frac{\color{blue}{\pi \cdot 180}}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    3. associate-/l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\pi \cdot \frac{180}{360}\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    4. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    5. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)} \cdot \frac{180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    6. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    7. associate-*l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    8. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    9. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\sqrt[3]{\color{blue}{\pi}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    10. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left(\color{blue}{{\pi}^{\frac{1}{3}}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    11. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left({\pi}^{\frac{1}{3}} \cdot \sqrt[3]{\color{blue}{\pi}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    12. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\left({\pi}^{\frac{1}{3}} \cdot \color{blue}{{\pi}^{\frac{1}{3}}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    13. pow-prod-upN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    14. lower-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    15. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\color{blue}{\frac{2}{3}}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    16. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \color{blue}{\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    17. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\color{blue}{\pi}} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
    18. lower-cbrt.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\color{blue}{\sqrt[3]{\pi}} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
  5. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \color{blue}{\left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)}, \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)}^{2} \]
  6. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\frac{\pi \cdot 180}{360}\right)}\right)\right)}^{2} \]
    2. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\color{blue}{\pi \cdot 180}}{360}\right)\right)\right)}^{2} \]
    3. associate-/l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{180}{360}\right)}\right)\right)}^{2} \]
    4. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{180}{360}\right)\right)\right)}^{2} \]
    5. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)} \cdot \frac{180}{360}\right)\right)\right)}^{2} \]
    6. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)}^{2} \]
    7. associate-*l*N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}\right)\right)}^{2} \]
    8. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)}\right)\right)}^{2} \]
    9. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\sqrt[3]{\color{blue}{\pi}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    10. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left(\color{blue}{{\pi}^{\frac{1}{3}}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    11. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left({\pi}^{\frac{1}{3}} \cdot \sqrt[3]{\color{blue}{\pi}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    12. pow1/3N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\left({\pi}^{\frac{1}{3}} \cdot \color{blue}{{\pi}^{\frac{1}{3}}}\right) \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    13. pow-prod-upN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    14. lower-pow.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\color{blue}{{\pi}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    15. metadata-evalN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\color{blue}{\frac{2}{3}}} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    16. lower-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \color{blue}{\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \frac{1}{2}\right)}\right)\right)\right)}^{2} \]
    17. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\pi} \cdot \frac{1}{2}\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{\frac{2}{3}} \cdot \left(\sqrt[3]{\color{blue}{\pi}} \cdot \frac{1}{2}\right)\right)\right)\right)}^{2} \]
    18. lower-cbrt.f6479.5

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\color{blue}{\sqrt[3]{\pi}} \cdot 0.5\right)\right)\right)\right)}^{2} \]
  7. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \color{blue}{\left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot 0.5\right)\right)}\right)\right)}^{2} \]
  8. Add Preprocessing

Alternative 4: 79.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\left(\pi \cdot angle\_m\right) \cdot 2}{360}\\
t_1 := \frac{\pi \cdot 180}{360}\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \mathsf{fma}\left(\sin t\_0, \cos t\_1, \cos t\_0 \cdot \sin t\_1\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 79.5%

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\cos \left(\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
    2. sin-+PI/2-revN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(\frac{angle}{180} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)}^{2} \]
    3. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle}{180} \cdot \pi} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    4. lift-/.f64N/A

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle \cdot \pi}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    6. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \pi}{180} + \frac{\color{blue}{\pi}}{2}\right)\right)}^{2} \]
    7. common-denominatorN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2 + \pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    8. div-addN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2} + \frac{\pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    9. sin-sumN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\sin \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \cos \left(\frac{\pi \cdot 180}{180 \cdot 2}\right) + \cos \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \sin \left(\frac{\pi \cdot 180}{180 \cdot 2}\right)\right)}\right)}^{2} \]
    10. lower-fma.f64N/A

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\frac{\pi \cdot 180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)}\right)}^{2} \]
  4. Add Preprocessing

Alternative 5: 79.5% accurate, 0.9× speedup?

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\cos \left(\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
    2. sin-+PI/2-revN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(\frac{angle}{180} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)}^{2} \]
    3. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle}{180} \cdot \pi} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    4. lift-/.f64N/A

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle \cdot \pi}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    6. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \pi}{180} + \frac{\color{blue}{\pi}}{2}\right)\right)}^{2} \]
    7. common-denominatorN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2 + \pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    8. div-addN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2} + \frac{\pi \cdot 180}{180 \cdot 2}\right)}\right)}^{2} \]
    9. sin-sumN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\sin \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \cos \left(\frac{\pi \cdot 180}{180 \cdot 2}\right) + \cos \left(\frac{\left(angle \cdot \pi\right) \cdot 2}{180 \cdot 2}\right) \cdot \sin \left(\frac{\pi \cdot 180}{180 \cdot 2}\right)\right)}\right)}^{2} \]
    10. lower-fma.f64N/A

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\mathsf{fma}\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right), \cos \left(\frac{\pi \cdot 180}{360}\right), \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)}\right)}^{2} \]
  4. Step-by-step derivation
    1. lift-fma.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \cos \left(\frac{\pi \cdot 180}{360}\right) + \cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)}\right)}^{2} \]
    2. add-flipN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \cos \left(\frac{\pi \cdot 180}{360}\right) - \left(\mathsf{neg}\left(\cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right)\right)}\right)}^{2} \]
    3. sub-negate-revN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(\cos \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \sin \left(\frac{\pi \cdot 180}{360}\right)\right)\right) - \sin \left(\frac{\left(\pi \cdot angle\right) \cdot 2}{360}\right) \cdot \cos \left(\frac{\pi \cdot 180}{360}\right)\right)\right)\right)}\right)}^{2} \]
    4. lower-neg.f64N/A

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(-\cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot \pi, angle, \mathsf{fma}\left(0.5, \pi, 0.5 \cdot \pi\right)\right)\right)\right)}\right)}^{2} \]
  6. Add Preprocessing

Alternative 6: 79.5% accurate, 1.0× speedup?

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\cos \left(\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
    2. sin-+PI/2-revN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(\frac{angle}{180} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)}^{2} \]
    3. lower-sin.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(\frac{angle}{180} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)}^{2} \]
    4. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\frac{angle}{180} \cdot \pi} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    5. *-commutativeN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\color{blue}{\pi \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)}^{2} \]
    6. lift-PI.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180} + \frac{\color{blue}{\pi}}{2}\right)\right)}^{2} \]
    7. mult-flipN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \frac{1}{2}}\right)\right)}^{2} \]
    8. distribute-lft-outN/A

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\pi \cdot \left(\frac{angle}{180} + \frac{1}{2}\right)\right)}\right)}^{2} \]
    10. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(\color{blue}{\frac{angle}{180}} + \frac{1}{2}\right)\right)\right)}^{2} \]
    11. mult-flipN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(\color{blue}{angle \cdot \frac{1}{180}} + \frac{1}{2}\right)\right)\right)}^{2} \]
    12. *-commutativeN/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(\color{blue}{\frac{1}{180} \cdot angle} + \frac{1}{2}\right)\right)\right)}^{2} \]
    13. lower-fma.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{180}, angle, \frac{1}{2}\right)}\right)\right)}^{2} \]
    14. metadata-evalN/A

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \mathsf{fma}\left(0.005555555555555556, angle, \color{blue}{0.5}\right)\right)\right)}^{2} \]
  3. Applied rewrites79.5%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(\pi \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right)}\right)}^{2} \]
  4. Add Preprocessing

Alternative 7: 79.5% accurate, 1.0× speedup?

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

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

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

      \[\leadsto {\left(a \cdot \sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)}\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
    2. lift-/.f64N/A

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \pi\right) \cdot angle\right)}\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
    7. lower-*.f64N/A

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

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

    \[\leadsto {\left(a \cdot \sin \color{blue}{\left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
  4. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto {\left(a \cdot \sin \left(\left(\frac{1}{180} \cdot \pi\right) \cdot angle\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)}\right)}^{2} \]
    2. lift-/.f64N/A

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(\left(\frac{1}{180} \cdot \pi\right) \cdot angle\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\left(\frac{1}{180} \cdot \pi\right) \cdot angle\right)}\right)}^{2} \]
    7. lower-*.f64N/A

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

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

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

Alternative 8: 79.4% accurate, 1.5× speedup?

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

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

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

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

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

    Alternative 9: 59.0% accurate, 0.6× speedup?

    \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \frac{angle\_m}{180} \cdot \pi\\ t_1 := \left(\left(b \cdot b\right) \cdot b\right) \cdot b\\ \mathbf{if}\;{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2} \leq 5 \cdot 10^{+307}:\\ \;\;\;\;{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{{t\_1}^{0.6666666666666666} \cdot {t\_1}^{0.3333333333333333}}\\ \end{array} \end{array} \]
    angle_m = (fabs.f64 angle)
    (FPCore (a b angle_m)
     :precision binary64
     (let* ((t_0 (* (/ angle_m 180.0) PI)) (t_1 (* (* (* b b) b) b)))
       (if (<= (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0)) 5e+307)
         (* (pow b 2.0) (pow (cos (* 0.005555555555555556 (* angle_m PI))) 2.0))
         (sqrt (* (pow t_1 0.6666666666666666) (pow t_1 0.3333333333333333))))))
    angle_m = fabs(angle);
    double code(double a, double b, double angle_m) {
    	double t_0 = (angle_m / 180.0) * ((double) M_PI);
    	double t_1 = ((b * b) * b) * b;
    	double tmp;
    	if ((pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0)) <= 5e+307) {
    		tmp = pow(b, 2.0) * pow(cos((0.005555555555555556 * (angle_m * ((double) M_PI)))), 2.0);
    	} else {
    		tmp = sqrt((pow(t_1, 0.6666666666666666) * pow(t_1, 0.3333333333333333)));
    	}
    	return tmp;
    }
    
    angle_m = Math.abs(angle);
    public static double code(double a, double b, double angle_m) {
    	double t_0 = (angle_m / 180.0) * Math.PI;
    	double t_1 = ((b * b) * b) * b;
    	double tmp;
    	if ((Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0)) <= 5e+307) {
    		tmp = Math.pow(b, 2.0) * Math.pow(Math.cos((0.005555555555555556 * (angle_m * Math.PI))), 2.0);
    	} else {
    		tmp = Math.sqrt((Math.pow(t_1, 0.6666666666666666) * Math.pow(t_1, 0.3333333333333333)));
    	}
    	return tmp;
    }
    
    angle_m = math.fabs(angle)
    def code(a, b, angle_m):
    	t_0 = (angle_m / 180.0) * math.pi
    	t_1 = ((b * b) * b) * b
    	tmp = 0
    	if (math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)) <= 5e+307:
    		tmp = math.pow(b, 2.0) * math.pow(math.cos((0.005555555555555556 * (angle_m * math.pi))), 2.0)
    	else:
    		tmp = math.sqrt((math.pow(t_1, 0.6666666666666666) * math.pow(t_1, 0.3333333333333333)))
    	return tmp
    
    angle_m = abs(angle)
    function code(a, b, angle_m)
    	t_0 = Float64(Float64(angle_m / 180.0) * pi)
    	t_1 = Float64(Float64(Float64(b * b) * b) * b)
    	tmp = 0.0
    	if (Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0)) <= 5e+307)
    		tmp = Float64((b ^ 2.0) * (cos(Float64(0.005555555555555556 * Float64(angle_m * pi))) ^ 2.0));
    	else
    		tmp = sqrt(Float64((t_1 ^ 0.6666666666666666) * (t_1 ^ 0.3333333333333333)));
    	end
    	return tmp
    end
    
    angle_m = abs(angle);
    function tmp_2 = code(a, b, angle_m)
    	t_0 = (angle_m / 180.0) * pi;
    	t_1 = ((b * b) * b) * b;
    	tmp = 0.0;
    	if ((((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0)) <= 5e+307)
    		tmp = (b ^ 2.0) * (cos((0.005555555555555556 * (angle_m * pi))) ^ 2.0);
    	else
    		tmp = sqrt(((t_1 ^ 0.6666666666666666) * (t_1 ^ 0.3333333333333333)));
    	end
    	tmp_2 = tmp;
    end
    
    angle_m = N[Abs[angle], $MachinePrecision]
    code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(b * b), $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 5e+307], N[(N[Power[b, 2.0], $MachinePrecision] * N[Power[N[Cos[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[Power[t$95$1, 0.6666666666666666], $MachinePrecision] * N[Power[t$95$1, 0.3333333333333333], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
    
    \begin{array}{l}
    angle_m = \left|angle\right|
    
    \\
    \begin{array}{l}
    t_0 := \frac{angle\_m}{180} \cdot \pi\\
    t_1 := \left(\left(b \cdot b\right) \cdot b\right) \cdot b\\
    \mathbf{if}\;{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2} \leq 5 \cdot 10^{+307}:\\
    \;\;\;\;{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)}^{2}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{{t\_1}^{0.6666666666666666} \cdot {t\_1}^{0.3333333333333333}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) < 5e307

      1. Initial program 79.5%

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

        \[\leadsto \color{blue}{{b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto {b}^{2} \cdot \color{blue}{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}} \]
        2. lower-pow.f64N/A

          \[\leadsto {b}^{2} \cdot {\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2} \]
        3. lower-pow.f64N/A

          \[\leadsto {b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\color{blue}{2}} \]
        4. lower-cos.f64N/A

          \[\leadsto {b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \]
        5. lower-*.f64N/A

          \[\leadsto {b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \]
        6. lower-*.f64N/A

          \[\leadsto {b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \]
        7. lower-PI.f6457.2

          \[\leadsto {b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \]
      4. Applied rewrites57.2%

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

      if 5e307 < (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)))

      1. Initial program 79.5%

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

        \[\leadsto \color{blue}{{b}^{2}} \]
      3. Step-by-step derivation
        1. lower-pow.f6457.3

          \[\leadsto {b}^{\color{blue}{2}} \]
      4. Applied rewrites57.3%

        \[\leadsto \color{blue}{{b}^{2}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto {b}^{\color{blue}{2}} \]
        2. unpow2N/A

          \[\leadsto b \cdot \color{blue}{b} \]
        3. lower-*.f6457.3

          \[\leadsto b \cdot \color{blue}{b} \]
      6. Applied rewrites57.3%

        \[\leadsto b \cdot \color{blue}{b} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto b \cdot \color{blue}{b} \]
        2. sqr-abs-revN/A

          \[\leadsto \left|b\right| \cdot \color{blue}{\left|b\right|} \]
        3. rem-sqrt-square-revN/A

          \[\leadsto \sqrt{b \cdot b} \cdot \left|\color{blue}{b}\right| \]
        4. lift-*.f64N/A

          \[\leadsto \sqrt{b \cdot b} \cdot \left|b\right| \]
        5. rem-sqrt-square-revN/A

          \[\leadsto \sqrt{b \cdot b} \cdot \sqrt{b \cdot b} \]
        6. lift-*.f64N/A

          \[\leadsto \sqrt{b \cdot b} \cdot \sqrt{b \cdot b} \]
        7. sqrt-unprodN/A

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
        8. lower-sqrt.f64N/A

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
        9. lower-*.f6449.3

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
      8. Applied rewrites49.3%

        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
      9. Step-by-step derivation
        1. unpow1N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{1}} \]
        2. metadata-evalN/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\left(\frac{2}{3} + \frac{1}{3}\right)}} \]
        3. pow-addN/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        4. lower-unsound-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        5. lower-unsound-pow.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        6. lift-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        7. lift-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        8. associate-*l*N/A

          \[\leadsto \sqrt{{\left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        9. *-commutativeN/A

          \[\leadsto \sqrt{{\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        10. lower-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        11. *-commutativeN/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        12. lower-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        13. lower-unsound-pow.f6448.4

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.6666666666666666} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{0.3333333333333333}} \]
        14. lift-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        15. lift-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        16. associate-*l*N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}^{\frac{1}{3}}} \]
        17. *-commutativeN/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}^{\frac{1}{3}}} \]
        18. lower-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}^{\frac{1}{3}}} \]
        19. *-commutativeN/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{1}{3}}} \]
        20. lower-*.f6448.4

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.6666666666666666} \cdot {\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.3333333333333333}} \]
      10. Applied rewrites48.4%

        \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.6666666666666666} \cdot {\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.3333333333333333}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 10: 59.0% accurate, 0.9× speedup?

    \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \frac{angle\_m}{180} \cdot \pi\\ \mathbf{if}\;{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2} \leq 5 \cdot 10^{+307}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)}\\ \end{array} \end{array} \]
    angle_m = (fabs.f64 angle)
    (FPCore (a b angle_m)
     :precision binary64
     (let* ((t_0 (* (/ angle_m 180.0) PI)))
       (if (<= (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0)) 5e+307)
         (* b b)
         (sqrt (* (* b b) (* b b))))))
    angle_m = fabs(angle);
    double code(double a, double b, double angle_m) {
    	double t_0 = (angle_m / 180.0) * ((double) M_PI);
    	double tmp;
    	if ((pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0)) <= 5e+307) {
    		tmp = b * b;
    	} else {
    		tmp = sqrt(((b * b) * (b * b)));
    	}
    	return tmp;
    }
    
    angle_m = Math.abs(angle);
    public static double code(double a, double b, double angle_m) {
    	double t_0 = (angle_m / 180.0) * Math.PI;
    	double tmp;
    	if ((Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0)) <= 5e+307) {
    		tmp = b * b;
    	} else {
    		tmp = Math.sqrt(((b * b) * (b * b)));
    	}
    	return tmp;
    }
    
    angle_m = math.fabs(angle)
    def code(a, b, angle_m):
    	t_0 = (angle_m / 180.0) * math.pi
    	tmp = 0
    	if (math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)) <= 5e+307:
    		tmp = b * b
    	else:
    		tmp = math.sqrt(((b * b) * (b * b)))
    	return tmp
    
    angle_m = abs(angle)
    function code(a, b, angle_m)
    	t_0 = Float64(Float64(angle_m / 180.0) * pi)
    	tmp = 0.0
    	if (Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0)) <= 5e+307)
    		tmp = Float64(b * b);
    	else
    		tmp = sqrt(Float64(Float64(b * b) * Float64(b * b)));
    	end
    	return tmp
    end
    
    angle_m = abs(angle);
    function tmp_2 = code(a, b, angle_m)
    	t_0 = (angle_m / 180.0) * pi;
    	tmp = 0.0;
    	if ((((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0)) <= 5e+307)
    		tmp = b * b;
    	else
    		tmp = sqrt(((b * b) * (b * b)));
    	end
    	tmp_2 = tmp;
    end
    
    angle_m = N[Abs[angle], $MachinePrecision]
    code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 5e+307], N[(b * b), $MachinePrecision], N[Sqrt[N[(N[(b * b), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
    
    \begin{array}{l}
    angle_m = \left|angle\right|
    
    \\
    \begin{array}{l}
    t_0 := \frac{angle\_m}{180} \cdot \pi\\
    \mathbf{if}\;{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2} \leq 5 \cdot 10^{+307}:\\
    \;\;\;\;b \cdot b\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) < 5e307

      1. Initial program 79.5%

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

        \[\leadsto \color{blue}{{b}^{2}} \]
      3. Step-by-step derivation
        1. lower-pow.f6457.3

          \[\leadsto {b}^{\color{blue}{2}} \]
      4. Applied rewrites57.3%

        \[\leadsto \color{blue}{{b}^{2}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto {b}^{\color{blue}{2}} \]
        2. unpow2N/A

          \[\leadsto b \cdot \color{blue}{b} \]
        3. lower-*.f6457.3

          \[\leadsto b \cdot \color{blue}{b} \]
      6. Applied rewrites57.3%

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

      if 5e307 < (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)))

      1. Initial program 79.5%

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

        \[\leadsto \color{blue}{{b}^{2}} \]
      3. Step-by-step derivation
        1. lower-pow.f6457.3

          \[\leadsto {b}^{\color{blue}{2}} \]
      4. Applied rewrites57.3%

        \[\leadsto \color{blue}{{b}^{2}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto {b}^{\color{blue}{2}} \]
        2. unpow2N/A

          \[\leadsto b \cdot \color{blue}{b} \]
        3. lower-*.f6457.3

          \[\leadsto b \cdot \color{blue}{b} \]
      6. Applied rewrites57.3%

        \[\leadsto b \cdot \color{blue}{b} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto b \cdot \color{blue}{b} \]
        2. sqr-abs-revN/A

          \[\leadsto \left|b\right| \cdot \color{blue}{\left|b\right|} \]
        3. rem-sqrt-square-revN/A

          \[\leadsto \sqrt{b \cdot b} \cdot \left|\color{blue}{b}\right| \]
        4. lift-*.f64N/A

          \[\leadsto \sqrt{b \cdot b} \cdot \left|b\right| \]
        5. rem-sqrt-square-revN/A

          \[\leadsto \sqrt{b \cdot b} \cdot \sqrt{b \cdot b} \]
        6. lift-*.f64N/A

          \[\leadsto \sqrt{b \cdot b} \cdot \sqrt{b \cdot b} \]
        7. sqrt-unprodN/A

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
        8. lower-sqrt.f64N/A

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
        9. lower-*.f6449.3

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
      8. Applied rewrites49.3%

        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 11: 59.0% accurate, 0.7× speedup?

    \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \left(\left(b \cdot b\right) \cdot b\right) \cdot b\\ t_1 := \frac{angle\_m}{180} \cdot \pi\\ \mathbf{if}\;{\left(a \cdot \sin t\_1\right)}^{2} + {\left(b \cdot \cos t\_1\right)}^{2} \leq 5 \cdot 10^{+307}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{{t\_0}^{0.6666666666666666} \cdot {t\_0}^{0.3333333333333333}}\\ \end{array} \end{array} \]
    angle_m = (fabs.f64 angle)
    (FPCore (a b angle_m)
     :precision binary64
     (let* ((t_0 (* (* (* b b) b) b)) (t_1 (* (/ angle_m 180.0) PI)))
       (if (<= (+ (pow (* a (sin t_1)) 2.0) (pow (* b (cos t_1)) 2.0)) 5e+307)
         (* b b)
         (sqrt (* (pow t_0 0.6666666666666666) (pow t_0 0.3333333333333333))))))
    angle_m = fabs(angle);
    double code(double a, double b, double angle_m) {
    	double t_0 = ((b * b) * b) * b;
    	double t_1 = (angle_m / 180.0) * ((double) M_PI);
    	double tmp;
    	if ((pow((a * sin(t_1)), 2.0) + pow((b * cos(t_1)), 2.0)) <= 5e+307) {
    		tmp = b * b;
    	} else {
    		tmp = sqrt((pow(t_0, 0.6666666666666666) * pow(t_0, 0.3333333333333333)));
    	}
    	return tmp;
    }
    
    angle_m = Math.abs(angle);
    public static double code(double a, double b, double angle_m) {
    	double t_0 = ((b * b) * b) * b;
    	double t_1 = (angle_m / 180.0) * Math.PI;
    	double tmp;
    	if ((Math.pow((a * Math.sin(t_1)), 2.0) + Math.pow((b * Math.cos(t_1)), 2.0)) <= 5e+307) {
    		tmp = b * b;
    	} else {
    		tmp = Math.sqrt((Math.pow(t_0, 0.6666666666666666) * Math.pow(t_0, 0.3333333333333333)));
    	}
    	return tmp;
    }
    
    angle_m = math.fabs(angle)
    def code(a, b, angle_m):
    	t_0 = ((b * b) * b) * b
    	t_1 = (angle_m / 180.0) * math.pi
    	tmp = 0
    	if (math.pow((a * math.sin(t_1)), 2.0) + math.pow((b * math.cos(t_1)), 2.0)) <= 5e+307:
    		tmp = b * b
    	else:
    		tmp = math.sqrt((math.pow(t_0, 0.6666666666666666) * math.pow(t_0, 0.3333333333333333)))
    	return tmp
    
    angle_m = abs(angle)
    function code(a, b, angle_m)
    	t_0 = Float64(Float64(Float64(b * b) * b) * b)
    	t_1 = Float64(Float64(angle_m / 180.0) * pi)
    	tmp = 0.0
    	if (Float64((Float64(a * sin(t_1)) ^ 2.0) + (Float64(b * cos(t_1)) ^ 2.0)) <= 5e+307)
    		tmp = Float64(b * b);
    	else
    		tmp = sqrt(Float64((t_0 ^ 0.6666666666666666) * (t_0 ^ 0.3333333333333333)));
    	end
    	return tmp
    end
    
    angle_m = abs(angle);
    function tmp_2 = code(a, b, angle_m)
    	t_0 = ((b * b) * b) * b;
    	t_1 = (angle_m / 180.0) * pi;
    	tmp = 0.0;
    	if ((((a * sin(t_1)) ^ 2.0) + ((b * cos(t_1)) ^ 2.0)) <= 5e+307)
    		tmp = b * b;
    	else
    		tmp = sqrt(((t_0 ^ 0.6666666666666666) * (t_0 ^ 0.3333333333333333)));
    	end
    	tmp_2 = tmp;
    end
    
    angle_m = N[Abs[angle], $MachinePrecision]
    code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(N[(b * b), $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(a * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 5e+307], N[(b * b), $MachinePrecision], N[Sqrt[N[(N[Power[t$95$0, 0.6666666666666666], $MachinePrecision] * N[Power[t$95$0, 0.3333333333333333], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
    
    \begin{array}{l}
    angle_m = \left|angle\right|
    
    \\
    \begin{array}{l}
    t_0 := \left(\left(b \cdot b\right) \cdot b\right) \cdot b\\
    t_1 := \frac{angle\_m}{180} \cdot \pi\\
    \mathbf{if}\;{\left(a \cdot \sin t\_1\right)}^{2} + {\left(b \cdot \cos t\_1\right)}^{2} \leq 5 \cdot 10^{+307}:\\
    \;\;\;\;b \cdot b\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{{t\_0}^{0.6666666666666666} \cdot {t\_0}^{0.3333333333333333}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) < 5e307

      1. Initial program 79.5%

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

        \[\leadsto \color{blue}{{b}^{2}} \]
      3. Step-by-step derivation
        1. lower-pow.f6457.3

          \[\leadsto {b}^{\color{blue}{2}} \]
      4. Applied rewrites57.3%

        \[\leadsto \color{blue}{{b}^{2}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto {b}^{\color{blue}{2}} \]
        2. unpow2N/A

          \[\leadsto b \cdot \color{blue}{b} \]
        3. lower-*.f6457.3

          \[\leadsto b \cdot \color{blue}{b} \]
      6. Applied rewrites57.3%

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

      if 5e307 < (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)))

      1. Initial program 79.5%

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

        \[\leadsto \color{blue}{{b}^{2}} \]
      3. Step-by-step derivation
        1. lower-pow.f6457.3

          \[\leadsto {b}^{\color{blue}{2}} \]
      4. Applied rewrites57.3%

        \[\leadsto \color{blue}{{b}^{2}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto {b}^{\color{blue}{2}} \]
        2. unpow2N/A

          \[\leadsto b \cdot \color{blue}{b} \]
        3. lower-*.f6457.3

          \[\leadsto b \cdot \color{blue}{b} \]
      6. Applied rewrites57.3%

        \[\leadsto b \cdot \color{blue}{b} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto b \cdot \color{blue}{b} \]
        2. sqr-abs-revN/A

          \[\leadsto \left|b\right| \cdot \color{blue}{\left|b\right|} \]
        3. rem-sqrt-square-revN/A

          \[\leadsto \sqrt{b \cdot b} \cdot \left|\color{blue}{b}\right| \]
        4. lift-*.f64N/A

          \[\leadsto \sqrt{b \cdot b} \cdot \left|b\right| \]
        5. rem-sqrt-square-revN/A

          \[\leadsto \sqrt{b \cdot b} \cdot \sqrt{b \cdot b} \]
        6. lift-*.f64N/A

          \[\leadsto \sqrt{b \cdot b} \cdot \sqrt{b \cdot b} \]
        7. sqrt-unprodN/A

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
        8. lower-sqrt.f64N/A

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
        9. lower-*.f6449.3

          \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
      8. Applied rewrites49.3%

        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
      9. Step-by-step derivation
        1. unpow1N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{1}} \]
        2. metadata-evalN/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\left(\frac{2}{3} + \frac{1}{3}\right)}} \]
        3. pow-addN/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        4. lower-unsound-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        5. lower-unsound-pow.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        6. lift-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        7. lift-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        8. associate-*l*N/A

          \[\leadsto \sqrt{{\left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        9. *-commutativeN/A

          \[\leadsto \sqrt{{\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        10. lower-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        11. *-commutativeN/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        12. lower-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        13. lower-unsound-pow.f6448.4

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.6666666666666666} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{0.3333333333333333}} \]
        14. lift-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        15. lift-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}^{\frac{1}{3}}} \]
        16. associate-*l*N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}^{\frac{1}{3}}} \]
        17. *-commutativeN/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}^{\frac{1}{3}}} \]
        18. lower-*.f64N/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}^{\frac{1}{3}}} \]
        19. *-commutativeN/A

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{2}{3}} \cdot {\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{\frac{1}{3}}} \]
        20. lower-*.f6448.4

          \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.6666666666666666} \cdot {\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.3333333333333333}} \]
      10. Applied rewrites48.4%

        \[\leadsto \sqrt{{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.6666666666666666} \cdot {\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}^{0.3333333333333333}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 12: 57.3% accurate, 29.7× speedup?

    \[\begin{array}{l} angle_m = \left|angle\right| \\ b \cdot b \end{array} \]
    angle_m = (fabs.f64 angle)
    (FPCore (a b angle_m) :precision binary64 (* b b))
    angle_m = fabs(angle);
    double code(double a, double b, double angle_m) {
    	return b * b;
    }
    
    angle_m =     private
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(a, b, angle_m)
    use fmin_fmax_functions
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: angle_m
        code = b * b
    end function
    
    angle_m = Math.abs(angle);
    public static double code(double a, double b, double angle_m) {
    	return b * b;
    }
    
    angle_m = math.fabs(angle)
    def code(a, b, angle_m):
    	return b * b
    
    angle_m = abs(angle)
    function code(a, b, angle_m)
    	return Float64(b * b)
    end
    
    angle_m = abs(angle);
    function tmp = code(a, b, angle_m)
    	tmp = b * b;
    end
    
    angle_m = N[Abs[angle], $MachinePrecision]
    code[a_, b_, angle$95$m_] := N[(b * b), $MachinePrecision]
    
    \begin{array}{l}
    angle_m = \left|angle\right|
    
    \\
    b \cdot b
    \end{array}
    
    Derivation
    1. Initial program 79.5%

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

      \[\leadsto \color{blue}{{b}^{2}} \]
    3. Step-by-step derivation
      1. lower-pow.f6457.3

        \[\leadsto {b}^{\color{blue}{2}} \]
    4. Applied rewrites57.3%

      \[\leadsto \color{blue}{{b}^{2}} \]
    5. Step-by-step derivation
      1. lift-pow.f64N/A

        \[\leadsto {b}^{\color{blue}{2}} \]
      2. unpow2N/A

        \[\leadsto b \cdot \color{blue}{b} \]
      3. lower-*.f6457.3

        \[\leadsto b \cdot \color{blue}{b} \]
    6. Applied rewrites57.3%

      \[\leadsto b \cdot \color{blue}{b} \]
    7. Add Preprocessing

    Reproduce

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