ab-angle->ABCF C

Percentage Accurate: 79.5% → 79.4%
Time: 18.8s
Alternatives: 15
Speedup: 1.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

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

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

Alternative 1: 79.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ {\left(a \cdot \cos \left(\sqrt{\pi} \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt{{\left(\left(\pi \cdot \pi\right) \cdot \sqrt{\pi}\right)}^{0.3333333333333333} \cdot \sqrt[3]{\sqrt{\pi}}}\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow
   (*
    a
    (cos
     (*
      (sqrt PI)
      (*
       (* angle 0.005555555555555556)
       (sqrt
        (*
         (pow (* (* PI PI) (sqrt PI)) 0.3333333333333333)
         (cbrt (sqrt PI))))))))
   2.0)
  (pow (* b (sin (* 0.005555555555555556 (* angle PI)))) 2.0)))
double code(double a, double b, double angle) {
	return pow((a * cos((sqrt(((double) M_PI)) * ((angle * 0.005555555555555556) * sqrt((pow(((((double) M_PI) * ((double) M_PI)) * sqrt(((double) M_PI))), 0.3333333333333333) * cbrt(sqrt(((double) M_PI))))))))), 2.0) + pow((b * sin((0.005555555555555556 * (angle * ((double) M_PI))))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow((a * Math.cos((Math.sqrt(Math.PI) * ((angle * 0.005555555555555556) * Math.sqrt((Math.pow(((Math.PI * Math.PI) * Math.sqrt(Math.PI)), 0.3333333333333333) * Math.cbrt(Math.sqrt(Math.PI)))))))), 2.0) + Math.pow((b * Math.sin((0.005555555555555556 * (angle * Math.PI)))), 2.0);
}
function code(a, b, angle)
	return Float64((Float64(a * cos(Float64(sqrt(pi) * Float64(Float64(angle * 0.005555555555555556) * sqrt(Float64((Float64(Float64(pi * pi) * sqrt(pi)) ^ 0.3333333333333333) * cbrt(sqrt(pi)))))))) ^ 2.0) + (Float64(b * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) ^ 2.0))
end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Cos[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[Sqrt[N[(N[Power[N[(N[(Pi * Pi), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \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{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \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{angle}{180}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. associate-*l*N/A

      \[\leadsto {\left(a \cdot \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{angle}{180}\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\frac{angle}{180}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    14. div-invN/A

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt[3]{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    18. lower-cbrt.f6477.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \color{blue}{\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 \left(angle \cdot \frac{1}{180}\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
  6. Applied egg-rr77.4%

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right)}^{2} \]
    4. lift-sin.f6477.4

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot angle}}{180}\right)\right)}^{2} \]
    9. div-invN/A

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}\right)}^{2} \]
    12. lower-*.f6477.5

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right)}^{2} \]
    15. lower-*.f6477.5

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

    \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt{\pi}\right) \cdot \sqrt{\pi}\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} \]
  9. Step-by-step derivation
    1. add-cbrt-cubeN/A

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{{\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2} \]
    4. rem-square-sqrtN/A

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{{\color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}^{\frac{1}{3}}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2} \]
    8. unpow-prod-downN/A

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{{\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2} \]
    16. lower-cbrt.f6477.5

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

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

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

Alternative 2: 79.4% accurate, 1.0× speedup?

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

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

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \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{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \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{angle}{180}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. associate-*l*N/A

      \[\leadsto {\left(a \cdot \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{angle}{180}\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\frac{angle}{180}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    14. div-invN/A

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt[3]{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    18. lower-cbrt.f6477.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \color{blue}{\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 \left(angle \cdot \frac{1}{180}\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
  6. Applied egg-rr77.4%

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right)}^{2} \]
    4. lift-sin.f6477.4

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot angle}}{180}\right)\right)}^{2} \]
    9. div-invN/A

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}\right)}^{2} \]
    12. lower-*.f6477.5

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right)}^{2} \]
    15. lower-*.f6477.5

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

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

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

Alternative 3: 79.4% accurate, 1.0× speedup?

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)}\right)}^{2} \]
    4. lower-*.f6477.4

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

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

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

Alternative 4: 79.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.5% accurate, 1.2× speedup?

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

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

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. rem-exp-logN/A

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

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

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

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

      \[\leadsto {\left(e^{\log a} \cdot \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    6. pow-prod-downN/A

      \[\leadsto \color{blue}{{\left(e^{\log a}\right)}^{2} \cdot {\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}^{2}} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    7. rem-exp-logN/A

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

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

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

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

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

Alternative 7: 52.7% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 3.7 \cdot 10^{-135}:\\ \;\;\;\;\left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+82}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot a, \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 3.7e-135)
   (* (* b b) (pow (sin (* 0.005555555555555556 (* angle PI))) 2.0))
   (if (<= a 2.1e+82)
     (fma
      (* a a)
      (cos (* (* angle 0.005555555555555556) PI))
      (* b (* b (* angle (* angle (* PI (* PI 3.08641975308642e-5)))))))
     (* (* a a) (fma 0.5 (cos (* angle (* PI 0.011111111111111112))) 0.5)))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 3.7e-135) {
		tmp = (b * b) * pow(sin((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0);
	} else if (a <= 2.1e+82) {
		tmp = fma((a * a), cos(((angle * 0.005555555555555556) * ((double) M_PI))), (b * (b * (angle * (angle * (((double) M_PI) * (((double) M_PI) * 3.08641975308642e-5)))))));
	} else {
		tmp = (a * a) * fma(0.5, cos((angle * (((double) M_PI) * 0.011111111111111112))), 0.5);
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (a <= 3.7e-135)
		tmp = Float64(Float64(b * b) * (sin(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0));
	elseif (a <= 2.1e+82)
		tmp = fma(Float64(a * a), cos(Float64(Float64(angle * 0.005555555555555556) * pi)), Float64(b * Float64(b * Float64(angle * Float64(angle * Float64(pi * Float64(pi * 3.08641975308642e-5)))))));
	else
		tmp = Float64(Float64(a * a) * fma(0.5, cos(Float64(angle * Float64(pi * 0.011111111111111112))), 0.5));
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[a, 3.7e-135], N[(N[(b * b), $MachinePrecision] * N[Power[N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e+82], N[(N[(a * a), $MachinePrecision] * N[Cos[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] + N[(b * N[(b * N[(angle * N[(angle * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(0.5 * N[Cos[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.7 \cdot 10^{-135}:\\
\;\;\;\;\left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot a, \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 3.6999999999999997e-135

    1. Initial program 75.4%

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

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

        \[\leadsto \color{blue}{{b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}} \]
      2. unpow2N/A

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)}^{2} \]
      6. associate-*r*N/A

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

        \[\leadsto \left(b \cdot b\right) \cdot {\color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}}^{2} \]
      8. associate-*r*N/A

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)}^{2} \]
      12. lower-PI.f6442.5

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

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

    if 3.6999999999999997e-135 < a < 2.1e82

    1. Initial program 75.3%

      \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. Add Preprocessing
    3. Applied egg-rr64.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot a\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lift-PI.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \left(a \cdot a\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)}\right)\right)\right)\right) \]
      4. cos-2N/A

        \[\leadsto \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \left(a \cdot a\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) - \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)}\right)\right)\right) \]
      5. sqr-cos-aN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \left(a \cdot a\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \left(\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)\right)} - \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)\right)\right)\right) \]
      10. sqr-sin-aN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \left(a \cdot a\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \left(\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)\right) - \left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)}\right)\right)\right)\right)\right) \]
    5. Applied egg-rr64.3%

      \[\leadsto \mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot a\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(0.5 - 0.5 \cdot \color{blue}{\mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), -\mathsf{fma}\left(\cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right), -0.5, 0.5\right)\right)}\right)\right)\right) \]
    6. Taylor expanded in angle around 0

      \[\leadsto \mathsf{fma}\left(\color{blue}{{a}^{2}}, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), \mathsf{neg}\left(\mathsf{fma}\left(\cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right), \frac{-1}{2}, \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot a}, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), \mathsf{neg}\left(\mathsf{fma}\left(\cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right), \frac{-1}{2}, \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      2. lower-*.f6461.8

        \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot a}, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(0.5 - 0.5 \cdot \mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), -\mathsf{fma}\left(\cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right), -0.5, 0.5\right)\right)\right)\right)\right) \]
    8. Simplified61.8%

      \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot a}, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(0.5 - 0.5 \cdot \mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), -\mathsf{fma}\left(\cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right), -0.5, 0.5\right)\right)\right)\right)\right) \]
    9. Taylor expanded in angle around 0

      \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \color{blue}{\left(\frac{-1}{2} \cdot \left({angle}^{2} \cdot \left(\frac{-1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2} - \frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \color{blue}{\frac{-1}{16200}}\right)\right)\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \left({angle}^{2} \cdot \color{blue}{\left(\frac{-1}{16200} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \color{blue}{\left(\left(\frac{-1}{16200} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right)}\right)\right)\right) \]
      5. associate-*r*N/A

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

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{-1}{16200}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \cdot {angle}^{2}\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\left(\color{blue}{\frac{1}{32400}} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \color{blue}{\left({angle}^{2} \cdot \left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\color{blue}{\left(angle \cdot angle\right)} \cdot \left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
      10. associate-*l*N/A

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \color{blue}{\left(angle \cdot \left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{1}{32400}\right)}\right)\right)\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \frac{1}{32400}\right)\right)\right)\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{32400}\right)\right)}\right)\right)\right)\right) \]
      16. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{32400}\right)\right)}\right)\right)\right)\right) \]
      17. lower-PI.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{32400}\right)\right)\right)\right)\right)\right) \]
      18. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{32400}\right)}\right)\right)\right)\right)\right) \]
      19. lower-PI.f6467.8

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\pi} \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)\right) \]
    11. Simplified67.8%

      \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \color{blue}{\left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)}\right)\right) \]

    if 2.1e82 < a

    1. Initial program 85.3%

      \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. Add Preprocessing
    3. Applied egg-rr61.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), e^{\log \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b \cdot b\right)\right)}, a \cdot \left(a \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
    4. Taylor expanded in b around 0

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

        \[\leadsto \color{blue}{{a}^{2} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      2. unpow2N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + \frac{1}{2}\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2}, \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{2}\right)} \]
      6. lower-cos.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \color{blue}{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}, \frac{1}{2}\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}, \frac{1}{2}\right) \]
      8. associate-*l*N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}, \frac{1}{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}, \frac{1}{2}\right) \]
      10. lower-*.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right), \frac{1}{2}\right) \]
      11. lower-PI.f6485.4

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\color{blue}{\pi} \cdot 0.011111111111111112\right)\right), 0.5\right) \]
    6. Simplified85.4%

      \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.7 \cdot 10^{-135}:\\ \;\;\;\;\left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+82}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot a, \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 79.4% accurate, 2.0× speedup?

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

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

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrtN/A

      \[\leadsto {\left(a \cdot \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{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. lift-/.f64N/A

      \[\leadsto {\left(a \cdot \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{angle}{180}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. associate-*l*N/A

      \[\leadsto {\left(a \cdot \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{angle}{180}\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\frac{angle}{180}} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    14. div-invN/A

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt[3]{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    18. lower-cbrt.f6477.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \color{blue}{\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 \left(angle \cdot \frac{1}{180}\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
  6. Applied egg-rr77.4%

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right)}^{2} \]
    4. lift-sin.f6477.4

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

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

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot angle}}{180}\right)\right)}^{2} \]
    9. div-invN/A

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}\right)}^{2} \]
    12. lower-*.f6477.5

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right)}^{2} \]
    15. lower-*.f6477.5

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

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

    \[\leadsto \color{blue}{{a}^{2}} + {\left(b \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2} \]
  10. Step-by-step derivation
    1. unpow2N/A

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

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

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

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

Alternative 9: 54.2% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 7.2 \cdot 10^{-158}:\\ \;\;\;\;angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\right)\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+83}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot a, \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 7.2e-158)
   (* angle (* 3.08641975308642e-5 (* (* angle PI) (* PI (* b b)))))
   (if (<= a 3.8e+83)
     (fma
      (* a a)
      (cos (* (* angle 0.005555555555555556) PI))
      (* b (* b (* angle (* angle (* PI (* PI 3.08641975308642e-5)))))))
     (* (* a a) (fma 0.5 (cos (* angle (* PI 0.011111111111111112))) 0.5)))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 7.2e-158) {
		tmp = angle * (3.08641975308642e-5 * ((angle * ((double) M_PI)) * (((double) M_PI) * (b * b))));
	} else if (a <= 3.8e+83) {
		tmp = fma((a * a), cos(((angle * 0.005555555555555556) * ((double) M_PI))), (b * (b * (angle * (angle * (((double) M_PI) * (((double) M_PI) * 3.08641975308642e-5)))))));
	} else {
		tmp = (a * a) * fma(0.5, cos((angle * (((double) M_PI) * 0.011111111111111112))), 0.5);
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (a <= 7.2e-158)
		tmp = Float64(angle * Float64(3.08641975308642e-5 * Float64(Float64(angle * pi) * Float64(pi * Float64(b * b)))));
	elseif (a <= 3.8e+83)
		tmp = fma(Float64(a * a), cos(Float64(Float64(angle * 0.005555555555555556) * pi)), Float64(b * Float64(b * Float64(angle * Float64(angle * Float64(pi * Float64(pi * 3.08641975308642e-5)))))));
	else
		tmp = Float64(Float64(a * a) * fma(0.5, cos(Float64(angle * Float64(pi * 0.011111111111111112))), 0.5));
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[a, 7.2e-158], N[(angle * N[(3.08641975308642e-5 * N[(N[(angle * Pi), $MachinePrecision] * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e+83], N[(N[(a * a), $MachinePrecision] * N[Cos[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] + N[(b * N[(b * N[(angle * N[(angle * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(0.5 * N[Cos[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.2 \cdot 10^{-158}:\\
\;\;\;\;angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\right)\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot a, \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 7.19999999999999982e-158

    1. Initial program 77.3%

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

      \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {a}^{2}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {a}^{2}\right)} \]
    5. Simplified37.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \mathsf{fma}\left(b \cdot b, 3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left({angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \frac{1}{32400}} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right)} \]
      3. *-commutativeN/A

        \[\leadsto {angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
      4. unpow2N/A

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

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

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

        \[\leadsto angle \cdot \color{blue}{\left(angle \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)} \]
      8. associate-*r*N/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
      9. *-commutativeN/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right)}\right) \]
      12. *-commutativeN/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      17. *-commutativeN/A

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

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right)\right) \]
      20. *-commutativeN/A

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} \cdot \frac{1}{32400}\right)}\right)\right)\right) \]
      22. unpow2N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      23. lower-*.f6444.9

        \[\leadsto angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right) \]
    8. Simplified44.9%

      \[\leadsto \color{blue}{angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      2. lift-PI.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)}\right)\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)} \]
      7. *-commutativeN/A

        \[\leadsto angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right) \]
      9. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)}\right) \]
      10. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)}\right)\right) \]
      11. associate-*r*N/A

        \[\leadsto angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot \frac{1}{32400}\right)}\right) \]
      12. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right)} \]
      13. lower-*.f64N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right)} \]
      14. lower-*.f64N/A

        \[\leadsto angle \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right)} \cdot \frac{1}{32400}\right) \]
      15. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right) \]
      16. *-commutativeN/A

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right) \]
      17. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right) \]
      18. lower-*.f6445.0

        \[\leadsto angle \cdot \left(\left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\pi \cdot \left(b \cdot b\right)\right)}\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \]
    10. Applied egg-rr45.0%

      \[\leadsto angle \cdot \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)} \]

    if 7.19999999999999982e-158 < a < 3.8000000000000002e83

    1. Initial program 70.7%

      \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. Add Preprocessing
    3. Applied egg-rr60.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot a\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lift-PI.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \left(a \cdot a\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)}\right)\right)\right)\right) \]
      4. cos-2N/A

        \[\leadsto \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \left(a \cdot a\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) - \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)}\right)\right)\right) \]
      5. sqr-cos-aN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \left(a \cdot a\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \left(\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)\right)} - \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)\right)\right)\right) \]
      10. sqr-sin-aN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right) \cdot \left(a \cdot a\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \left(\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)\right) - \left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right)}\right)\right)\right)\right)\right) \]
    5. Applied egg-rr60.9%

      \[\leadsto \mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot a\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(0.5 - 0.5 \cdot \color{blue}{\mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), -\mathsf{fma}\left(\cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right), -0.5, 0.5\right)\right)}\right)\right)\right) \]
    6. Taylor expanded in angle around 0

      \[\leadsto \mathsf{fma}\left(\color{blue}{{a}^{2}}, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), \mathsf{neg}\left(\mathsf{fma}\left(\cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right), \frac{-1}{2}, \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot a}, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \mathsf{fma}\left(\cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), \mathsf{neg}\left(\mathsf{fma}\left(\cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right), \frac{-1}{2}, \frac{1}{2}\right)\right)\right)\right)\right)\right) \]
      2. lower-*.f6458.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot a}, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(0.5 - 0.5 \cdot \mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), -\mathsf{fma}\left(\cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right), -0.5, 0.5\right)\right)\right)\right)\right) \]
    8. Simplified58.5%

      \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot a}, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(0.5 - 0.5 \cdot \mathsf{fma}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), -\mathsf{fma}\left(\cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right), -0.5, 0.5\right)\right)\right)\right)\right) \]
    9. Taylor expanded in angle around 0

      \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \color{blue}{\left(\frac{-1}{2} \cdot \left({angle}^{2} \cdot \left(\frac{-1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2} - \frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \color{blue}{\frac{-1}{16200}}\right)\right)\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \left({angle}^{2} \cdot \color{blue}{\left(\frac{-1}{16200} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \color{blue}{\left(\left(\frac{-1}{16200} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right)}\right)\right)\right) \]
      5. associate-*r*N/A

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

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{-1}{16200}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \cdot {angle}^{2}\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\left(\color{blue}{\frac{1}{32400}} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \color{blue}{\left({angle}^{2} \cdot \left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(\color{blue}{\left(angle \cdot angle\right)} \cdot \left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
      10. associate-*l*N/A

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \color{blue}{\left(angle \cdot \left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{1}{32400}\right)}\right)\right)\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \frac{1}{32400}\right)\right)\right)\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{32400}\right)\right)}\right)\right)\right)\right) \]
      16. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{32400}\right)\right)}\right)\right)\right)\right) \]
      17. lower-PI.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{32400}\right)\right)\right)\right)\right)\right) \]
      18. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{32400}\right)}\right)\right)\right)\right)\right) \]
      19. lower-PI.f6462.9

        \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\pi} \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)\right) \]
    11. Simplified62.9%

      \[\leadsto \mathsf{fma}\left(a \cdot a, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), b \cdot \left(b \cdot \color{blue}{\left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)}\right)\right) \]

    if 3.8000000000000002e83 < a

    1. Initial program 85.3%

      \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. Add Preprocessing
    3. Applied egg-rr61.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), e^{\log \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b \cdot b\right)\right)}, a \cdot \left(a \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
    4. Taylor expanded in b around 0

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

        \[\leadsto \color{blue}{{a}^{2} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      2. unpow2N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + \frac{1}{2}\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2}, \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{2}\right)} \]
      6. lower-cos.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \color{blue}{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}, \frac{1}{2}\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}, \frac{1}{2}\right) \]
      8. associate-*l*N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}, \frac{1}{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}, \frac{1}{2}\right) \]
      10. lower-*.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right), \frac{1}{2}\right) \]
      11. lower-PI.f6485.4

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\color{blue}{\pi} \cdot 0.011111111111111112\right)\right), 0.5\right) \]
    6. Simplified85.4%

      \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 7.2 \cdot 10^{-158}:\\ \;\;\;\;angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\right)\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+83}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot a, \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right), b \cdot \left(b \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 56.6% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 7.5 \cdot 10^{+71}:\\ \;\;\;\;\mathsf{fma}\left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \mathsf{fma}\left(b, b \cdot 3.08641975308642 \cdot 10^{-5}, a \cdot \left(a \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right), angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 7.5e+71)
   (fma
    (*
     (* angle PI)
     (* PI (fma b (* b 3.08641975308642e-5) (* a (* a -3.08641975308642e-5)))))
    angle
    (* a a))
   (* (* a a) (fma 0.5 (cos (* angle (* PI 0.011111111111111112))) 0.5))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 7.5e+71) {
		tmp = fma(((angle * ((double) M_PI)) * (((double) M_PI) * fma(b, (b * 3.08641975308642e-5), (a * (a * -3.08641975308642e-5))))), angle, (a * a));
	} else {
		tmp = (a * a) * fma(0.5, cos((angle * (((double) M_PI) * 0.011111111111111112))), 0.5);
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (a <= 7.5e+71)
		tmp = fma(Float64(Float64(angle * pi) * Float64(pi * fma(b, Float64(b * 3.08641975308642e-5), Float64(a * Float64(a * -3.08641975308642e-5))))), angle, Float64(a * a));
	else
		tmp = Float64(Float64(a * a) * fma(0.5, cos(Float64(angle * Float64(pi * 0.011111111111111112))), 0.5));
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[a, 7.5e+71], N[(N[(N[(angle * Pi), $MachinePrecision] * N[(Pi * N[(b * N[(b * 3.08641975308642e-5), $MachinePrecision] + N[(a * N[(a * -3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle + N[(a * a), $MachinePrecision]), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(0.5 * N[Cos[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.5 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \mathsf{fma}\left(b, b \cdot 3.08641975308642 \cdot 10^{-5}, a \cdot \left(a \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right), angle, a \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 7.50000000000000007e71

    1. Initial program 75.6%

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

      \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {a}^{2}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {a}^{2}\right)} \]
    5. Simplified43.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \mathsf{fma}\left(b \cdot b, 3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(angle \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400} + \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right) + a \cdot a \]
      2. lift-PI.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400} + \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right) + a \cdot a \]
      3. lift-PI.f64N/A

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

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400} + \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right) + a \cdot a \]
      5. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400} + \color{blue}{\left(a \cdot a\right)} \cdot \frac{-1}{32400}\right)\right)\right) + a \cdot a \]
      6. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400} + \color{blue}{\left(a \cdot a\right) \cdot \frac{-1}{32400}}\right)\right)\right) + a \cdot a \]
      7. lift-fma.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{fma}\left(b \cdot b, \frac{1}{32400}, \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)}\right)\right) + a \cdot a \]
      8. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(b \cdot b, \frac{1}{32400}, \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)}\right) + a \cdot a \]
      9. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(b \cdot b, \frac{1}{32400}, \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right)} + a \cdot a \]
      10. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(b \cdot b, \frac{1}{32400}, \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right) + \color{blue}{a \cdot a} \]
    7. Applied egg-rr47.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \mathsf{fma}\left(b, b \cdot 3.08641975308642 \cdot 10^{-5}, a \cdot \left(a \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right), angle, a \cdot a\right)} \]

    if 7.50000000000000007e71 < a

    1. Initial program 84.3%

      \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. Add Preprocessing
    3. Applied egg-rr61.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), e^{\log \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b \cdot b\right)\right)}, a \cdot \left(a \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
    4. Taylor expanded in b around 0

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

        \[\leadsto \color{blue}{{a}^{2} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      2. unpow2N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + \frac{1}{2}\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2}, \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{2}\right)} \]
      6. lower-cos.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \color{blue}{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}, \frac{1}{2}\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}, \frac{1}{2}\right) \]
      8. associate-*l*N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}, \frac{1}{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}, \frac{1}{2}\right) \]
      10. lower-*.f64N/A

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(\frac{1}{2}, \cos \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right), \frac{1}{2}\right) \]
      11. lower-PI.f6484.2

        \[\leadsto \left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\color{blue}{\pi} \cdot 0.011111111111111112\right)\right), 0.5\right) \]
    6. Simplified84.2%

      \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 56.6% accurate, 8.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 5 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \mathsf{fma}\left(b, b \cdot 3.08641975308642 \cdot 10^{-5}, a \cdot \left(a \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right), angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot a\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 5e+72)
   (fma
    (*
     (* angle PI)
     (* PI (fma b (* b 3.08641975308642e-5) (* a (* a -3.08641975308642e-5)))))
    angle
    (* a a))
   (* a a)))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 5e+72) {
		tmp = fma(((angle * ((double) M_PI)) * (((double) M_PI) * fma(b, (b * 3.08641975308642e-5), (a * (a * -3.08641975308642e-5))))), angle, (a * a));
	} else {
		tmp = a * a;
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (a <= 5e+72)
		tmp = fma(Float64(Float64(angle * pi) * Float64(pi * fma(b, Float64(b * 3.08641975308642e-5), Float64(a * Float64(a * -3.08641975308642e-5))))), angle, Float64(a * a));
	else
		tmp = Float64(a * a);
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[a, 5e+72], N[(N[(N[(angle * Pi), $MachinePrecision] * N[(Pi * N[(b * N[(b * 3.08641975308642e-5), $MachinePrecision] + N[(a * N[(a * -3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle + N[(a * a), $MachinePrecision]), $MachinePrecision], N[(a * a), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \mathsf{fma}\left(b, b \cdot 3.08641975308642 \cdot 10^{-5}, a \cdot \left(a \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right), angle, a \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 4.99999999999999992e72

    1. Initial program 75.6%

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

      \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {a}^{2}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {a}^{2}\right)} \]
    5. Simplified43.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \mathsf{fma}\left(b \cdot b, 3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(angle \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400} + \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right) + a \cdot a \]
      2. lift-PI.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400} + \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right) + a \cdot a \]
      3. lift-PI.f64N/A

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

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400} + \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right) + a \cdot a \]
      5. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400} + \color{blue}{\left(a \cdot a\right)} \cdot \frac{-1}{32400}\right)\right)\right) + a \cdot a \]
      6. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400} + \color{blue}{\left(a \cdot a\right) \cdot \frac{-1}{32400}}\right)\right)\right) + a \cdot a \]
      7. lift-fma.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{fma}\left(b \cdot b, \frac{1}{32400}, \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)}\right)\right) + a \cdot a \]
      8. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(b \cdot b, \frac{1}{32400}, \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)}\right) + a \cdot a \]
      9. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(b \cdot b, \frac{1}{32400}, \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right)} + a \cdot a \]
      10. lift-*.f64N/A

        \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(b \cdot b, \frac{1}{32400}, \left(a \cdot a\right) \cdot \frac{-1}{32400}\right)\right)\right) + \color{blue}{a \cdot a} \]
    7. Applied egg-rr47.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \mathsf{fma}\left(b, b \cdot 3.08641975308642 \cdot 10^{-5}, a \cdot \left(a \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right), angle, a \cdot a\right)} \]

    if 4.99999999999999992e72 < a

    1. Initial program 84.3%

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    4. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \color{blue}{a \cdot a} \]
      2. lower-*.f6481.8

        \[\leadsto \color{blue}{a \cdot a} \]
    5. Simplified81.8%

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

Alternative 12: 53.3% accurate, 9.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 9.5 \cdot 10^{-160}:\\ \;\;\;\;angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot a\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 9.5e-160)
   (* angle (* 3.08641975308642e-5 (* (* angle PI) (* PI (* b b)))))
   (if (<= a 1.4e+72)
     (fma
      (* angle angle)
      (* PI (* PI (* (* b b) 3.08641975308642e-5)))
      (* a a))
     (* a a))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 9.5e-160) {
		tmp = angle * (3.08641975308642e-5 * ((angle * ((double) M_PI)) * (((double) M_PI) * (b * b))));
	} else if (a <= 1.4e+72) {
		tmp = fma((angle * angle), (((double) M_PI) * (((double) M_PI) * ((b * b) * 3.08641975308642e-5))), (a * a));
	} else {
		tmp = a * a;
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (a <= 9.5e-160)
		tmp = Float64(angle * Float64(3.08641975308642e-5 * Float64(Float64(angle * pi) * Float64(pi * Float64(b * b)))));
	elseif (a <= 1.4e+72)
		tmp = fma(Float64(angle * angle), Float64(pi * Float64(pi * Float64(Float64(b * b) * 3.08641975308642e-5))), Float64(a * a));
	else
		tmp = Float64(a * a);
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[a, 9.5e-160], N[(angle * N[(3.08641975308642e-5 * N[(N[(angle * Pi), $MachinePrecision] * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4e+72], N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * N[(N[(b * b), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * a), $MachinePrecision]), $MachinePrecision], N[(a * a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.5 \cdot 10^{-160}:\\
\;\;\;\;angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\right)\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 9.5000000000000002e-160

    1. Initial program 77.3%

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

      \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {a}^{2}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {a}^{2}\right)} \]
    5. Simplified37.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \mathsf{fma}\left(b \cdot b, 3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left({angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \frac{1}{32400}} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right)} \]
      3. *-commutativeN/A

        \[\leadsto {angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
      4. unpow2N/A

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

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

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

        \[\leadsto angle \cdot \color{blue}{\left(angle \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)} \]
      8. associate-*r*N/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
      9. *-commutativeN/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right)}\right) \]
      12. *-commutativeN/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      17. *-commutativeN/A

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

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right)\right) \]
      20. *-commutativeN/A

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} \cdot \frac{1}{32400}\right)}\right)\right)\right) \]
      22. unpow2N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      23. lower-*.f6444.9

        \[\leadsto angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right) \]
    8. Simplified44.9%

      \[\leadsto \color{blue}{angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      2. lift-PI.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)}\right)\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)} \]
      7. *-commutativeN/A

        \[\leadsto angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right) \]
      9. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)}\right) \]
      10. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)}\right)\right) \]
      11. associate-*r*N/A

        \[\leadsto angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot \frac{1}{32400}\right)}\right) \]
      12. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right)} \]
      13. lower-*.f64N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right)} \]
      14. lower-*.f64N/A

        \[\leadsto angle \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right)} \cdot \frac{1}{32400}\right) \]
      15. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right) \]
      16. *-commutativeN/A

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right) \]
      17. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\right) \cdot \frac{1}{32400}\right) \]
      18. lower-*.f6445.0

        \[\leadsto angle \cdot \left(\left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\pi \cdot \left(b \cdot b\right)\right)}\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \]
    10. Applied egg-rr45.0%

      \[\leadsto angle \cdot \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)} \]

    if 9.5000000000000002e-160 < a < 1.4e72

    1. Initial program 71.2%

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

      \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {a}^{2}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {a}^{2}\right)} \]
    5. Simplified59.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \mathsf{fma}\left(b \cdot b, 3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \mathsf{fma}\left(angle \cdot angle, \color{blue}{\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}, a \cdot a\right) \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \color{blue}{\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}}, a \cdot a\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \color{blue}{{\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)}, a \cdot a\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right), a \cdot a\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \color{blue}{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)}, a \cdot a\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}, a \cdot a\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}, a \cdot a\right) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \color{blue}{\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}, a \cdot a\right) \]
      8. lower-PI.f64N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right), a \cdot a\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}, a \cdot a\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)}, a \cdot a\right) \]
      11. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)}, a \cdot a\right) \]
      12. lower-PI.f64N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right), a \cdot a\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} \cdot \frac{1}{32400}\right)}\right), a \cdot a\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} \cdot \frac{1}{32400}\right)}\right), a \cdot a\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400}\right)\right), a \cdot a\right) \]
      16. lower-*.f6460.2

        \[\leadsto \mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot 3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right) \]
    8. Simplified60.2%

      \[\leadsto \mathsf{fma}\left(angle \cdot angle, \color{blue}{\pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)}, a \cdot a\right) \]

    if 1.4e72 < a

    1. Initial program 84.3%

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    4. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \color{blue}{a \cdot a} \]
      2. lower-*.f6481.8

        \[\leadsto \color{blue}{a \cdot a} \]
    5. Simplified81.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 9.5 \cdot 10^{-160}:\\ \;\;\;\;angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 61.1% accurate, 12.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 9.5 \cdot 10^{+83}:\\ \;\;\;\;a \cdot a\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\pi \cdot \left(angle \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= b 9.5e+83)
   (* a a)
   (* angle (* (* (* b b) 3.08641975308642e-5) (* PI (* angle PI))))))
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 9.5e+83) {
		tmp = a * a;
	} else {
		tmp = angle * (((b * b) * 3.08641975308642e-5) * (((double) M_PI) * (angle * ((double) M_PI))));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 9.5e+83) {
		tmp = a * a;
	} else {
		tmp = angle * (((b * b) * 3.08641975308642e-5) * (Math.PI * (angle * Math.PI)));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if b <= 9.5e+83:
		tmp = a * a
	else:
		tmp = angle * (((b * b) * 3.08641975308642e-5) * (math.pi * (angle * math.pi)))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (b <= 9.5e+83)
		tmp = Float64(a * a);
	else
		tmp = Float64(angle * Float64(Float64(Float64(b * b) * 3.08641975308642e-5) * Float64(pi * Float64(angle * pi))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 9.5e+83)
		tmp = a * a;
	else
		tmp = angle * (((b * b) * 3.08641975308642e-5) * (pi * (angle * pi)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[b, 9.5e+83], N[(a * a), $MachinePrecision], N[(angle * N[(N[(N[(b * b), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision] * N[(Pi * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\pi \cdot \left(angle \cdot \pi\right)\right)\right)\\


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

    1. Initial program 75.6%

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    4. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \color{blue}{a \cdot a} \]
      2. lower-*.f6460.2

        \[\leadsto \color{blue}{a \cdot a} \]
    5. Simplified60.2%

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

    if 9.5000000000000002e83 < b

    1. Initial program 87.0%

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

      \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {a}^{2}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {a}^{2}\right)} \]
    5. Simplified51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \mathsf{fma}\left(b \cdot b, 3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left({angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \frac{1}{32400}} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right)} \]
      3. *-commutativeN/A

        \[\leadsto {angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
      4. unpow2N/A

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

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

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

        \[\leadsto angle \cdot \color{blue}{\left(angle \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)} \]
      8. associate-*r*N/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
      9. *-commutativeN/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right)}\right) \]
      12. *-commutativeN/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      17. *-commutativeN/A

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

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right)\right) \]
      20. *-commutativeN/A

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} \cdot \frac{1}{32400}\right)}\right)\right)\right) \]
      22. unpow2N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      23. lower-*.f6464.1

        \[\leadsto angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right) \]
    8. Simplified64.1%

      \[\leadsto \color{blue}{angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)} \]
    9. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      2. lift-PI.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)}\right)\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right)} \]
      7. *-commutativeN/A

        \[\leadsto angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)\right) \]
      9. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)}\right) \]
      10. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)} \]
      11. lower-*.f64N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right)} \]
      12. lower-*.f6464.2

        \[\leadsto angle \cdot \left(\color{blue}{\left(\left(\pi \cdot angle\right) \cdot \pi\right)} \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{1}{32400}\right)\right) \]
      15. lift-*.f6464.2

        \[\leadsto angle \cdot \left(\left(\color{blue}{\left(angle \cdot \pi\right)} \cdot \pi\right) \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right) \]
    10. Applied egg-rr64.2%

      \[\leadsto angle \cdot \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \pi\right) \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 9.5 \cdot 10^{+83}:\\ \;\;\;\;a \cdot a\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\pi \cdot \left(angle \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 61.1% accurate, 12.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.05 \cdot 10^{+84}:\\ \;\;\;\;a \cdot a\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= b 1.05e+84)
   (* a a)
   (* angle (* angle (* PI (* PI (* (* b b) 3.08641975308642e-5)))))))
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 1.05e+84) {
		tmp = a * a;
	} else {
		tmp = angle * (angle * (((double) M_PI) * (((double) M_PI) * ((b * b) * 3.08641975308642e-5))));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 1.05e+84) {
		tmp = a * a;
	} else {
		tmp = angle * (angle * (Math.PI * (Math.PI * ((b * b) * 3.08641975308642e-5))));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if b <= 1.05e+84:
		tmp = a * a
	else:
		tmp = angle * (angle * (math.pi * (math.pi * ((b * b) * 3.08641975308642e-5))))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (b <= 1.05e+84)
		tmp = Float64(a * a);
	else
		tmp = Float64(angle * Float64(angle * Float64(pi * Float64(pi * Float64(Float64(b * b) * 3.08641975308642e-5)))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 1.05e+84)
		tmp = a * a;
	else
		tmp = angle * (angle * (pi * (pi * ((b * b) * 3.08641975308642e-5))));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[b, 1.05e+84], N[(a * a), $MachinePrecision], N[(angle * N[(angle * N[(Pi * N[(Pi * N[(N[(b * b), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\


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

    1. Initial program 75.6%

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

      \[\leadsto \color{blue}{{a}^{2}} \]
    4. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \color{blue}{a \cdot a} \]
      2. lower-*.f6460.2

        \[\leadsto \color{blue}{a \cdot a} \]
    5. Simplified60.2%

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

    if 1.05000000000000009e84 < b

    1. Initial program 87.0%

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

      \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {a}^{2}} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {a}^{2}\right)} \]
    5. Simplified51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \mathsf{fma}\left(b \cdot b, 3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right), a \cdot a\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left({angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \frac{1}{32400}} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right)} \]
      3. *-commutativeN/A

        \[\leadsto {angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
      4. unpow2N/A

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

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

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

        \[\leadsto angle \cdot \color{blue}{\left(angle \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)} \]
      8. associate-*r*N/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
      9. *-commutativeN/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto angle \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right)}\right) \]
      12. *-commutativeN/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(\frac{1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
      17. *-commutativeN/A

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

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right)\right)\right)\right) \]
      20. *-commutativeN/A

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

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} \cdot \frac{1}{32400}\right)}\right)\right)\right) \]
      22. unpow2N/A

        \[\leadsto angle \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \frac{1}{32400}\right)\right)\right)\right) \]
      23. lower-*.f6464.1

        \[\leadsto angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right) \]
    8. Simplified64.1%

      \[\leadsto \color{blue}{angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 56.4% accurate, 74.7× speedup?

\[\begin{array}{l} \\ a \cdot a \end{array} \]
(FPCore (a b angle) :precision binary64 (* a a))
double code(double a, double b, double angle) {
	return a * a;
}
real(8) function code(a, b, angle)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    code = a * a
end function
public static double code(double a, double b, double angle) {
	return a * a;
}
def code(a, b, angle):
	return a * a
function code(a, b, angle)
	return Float64(a * a)
end
function tmp = code(a, b, angle)
	tmp = a * a;
end
code[a_, b_, angle_] := N[(a * a), $MachinePrecision]
\begin{array}{l}

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

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

    \[\leadsto \color{blue}{{a}^{2}} \]
  4. Step-by-step derivation
    1. unpow2N/A

      \[\leadsto \color{blue}{a \cdot a} \]
    2. lower-*.f6456.6

      \[\leadsto \color{blue}{a \cdot a} \]
  5. Simplified56.6%

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

Reproduce

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