ab-angle->ABCF A

Percentage Accurate: 79.5% → 79.5%
Time: 27.3s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

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

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

Initial Program: 79.5% accurate, 1.0× speedup?

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

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

Alternative 1: 79.5% accurate, 0.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}^{2} + {\left(b \cdot \cos \left({\color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)} - 1\right)}}^{2} \cdot \sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)\right)}^{2} \]
  9. Step-by-step derivation
    1. expm1-def66.4%

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

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

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

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

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

Alternative 2: 79.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\\
{\left(a \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}^{2} + {\left(b \cdot \cos \left(t_0 \cdot {t_0}^{2}\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 79.5% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}^{2} + {\left(b \cdot \cos \left({\left({angle}^{0.16666666666666666} \cdot \left(\color{blue}{{angle}^{\left(\frac{0.3333333333333333}{2}\right)}} \cdot \sqrt[3]{\pi \cdot 0.005555555555555556}\right)\right)}^{2} \cdot \sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)\right)}^{2} \]
    9. metadata-eval34.4%

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}^{2} + {\left(b \cdot \cos \left(\color{blue}{1} \cdot \left(angle \cdot \left(\pi \cdot \left(\sqrt[3]{-0.005555555555555556} \cdot {\left(\sqrt[3]{0.005555555555555556}\right)}^{2}\right)\right)\right)\right)\right)}^{2} \]
    4. *-lft-identity80.7%

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

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

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

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

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

Alternative 4: 40.5% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := angle \cdot \frac{\pi}{180}\\
{\left(a \cdot \sin t_0\right)}^{2} + {\left(b \cdot \cos t_0\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.5% accurate, 1.0× speedup?

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

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

    \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutative80.5%

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

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

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

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

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

Alternative 7: 79.5% accurate, 1.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(a \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}^{2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-/l*80.7%

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

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

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

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

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

Alternative 8: 79.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{angle}{\frac{180}{\pi}}\\
{\left(a \cdot \sin t_0\right)}^{2} + {\left(b \cdot \cos t_0\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 80.5%

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

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

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

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

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

Alternative 9: 40.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot \color{blue}{0.005555555555555556}\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    3. add-cube-cbrt80.0%

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

      \[\leadsto {\left(a \cdot \sin \left(\color{blue}{{\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}} \cdot \sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    5. rem-cube-cbrt80.0%

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

      \[\leadsto {\left(a \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)} \cdot \sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)} \cdot \sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}}\right)}^{3}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    7. add-cube-cbrt80.1%

      \[\leadsto {\left(a \cdot \sin \left({\left(\sqrt[3]{\color{blue}{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}}\right)}^{3}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    8. associate-*r*80.1%

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

      \[\leadsto {\left(a \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556}\right)}^{3}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    10. associate-*r*80.1%

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

    \[\leadsto {\left(a \cdot \sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
  8. Step-by-step derivation
    1. rem-cube-cbrt80.2%

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

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

      \[\leadsto {\left(a \cdot \sin \color{blue}{\left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)}\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    4. add-sqr-sqrt34.1%

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

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

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

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

Alternative 10: 67.7% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 2.05 \cdot 10^{-109}:\\ \;\;\;\;{\left(a \cdot 0\right)}^{2} + {\left(b \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{b}^{2} + {\left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)}^{2}\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 2.05e-109)
   (+ (pow (* a 0.0) 2.0) (pow (* b (cos (* PI (/ angle 180.0)))) 2.0))
   (+ (pow b 2.0) (pow (* (* angle PI) (* a 0.005555555555555556)) 2.0))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 2.05e-109) {
		tmp = pow((a * 0.0), 2.0) + pow((b * cos((((double) M_PI) * (angle / 180.0)))), 2.0);
	} else {
		tmp = pow(b, 2.0) + pow(((angle * ((double) M_PI)) * (a * 0.005555555555555556)), 2.0);
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 2.05e-109) {
		tmp = Math.pow((a * 0.0), 2.0) + Math.pow((b * Math.cos((Math.PI * (angle / 180.0)))), 2.0);
	} else {
		tmp = Math.pow(b, 2.0) + Math.pow(((angle * Math.PI) * (a * 0.005555555555555556)), 2.0);
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if a <= 2.05e-109:
		tmp = math.pow((a * 0.0), 2.0) + math.pow((b * math.cos((math.pi * (angle / 180.0)))), 2.0)
	else:
		tmp = math.pow(b, 2.0) + math.pow(((angle * math.pi) * (a * 0.005555555555555556)), 2.0)
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (a <= 2.05e-109)
		tmp = Float64((Float64(a * 0.0) ^ 2.0) + (Float64(b * cos(Float64(pi * Float64(angle / 180.0)))) ^ 2.0));
	else
		tmp = Float64((b ^ 2.0) + (Float64(Float64(angle * pi) * Float64(a * 0.005555555555555556)) ^ 2.0));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 2.05e-109)
		tmp = ((a * 0.0) ^ 2.0) + ((b * cos((pi * (angle / 180.0)))) ^ 2.0);
	else
		tmp = (b ^ 2.0) + (((angle * pi) * (a * 0.005555555555555556)) ^ 2.0);
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[a, 2.05e-109], N[(N[Power[N[(a * 0.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[Power[b, 2.0], $MachinePrecision] + N[Power[N[(N[(angle * Pi), $MachinePrecision] * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.05 \cdot 10^{-109}:\\
\;\;\;\;{\left(a \cdot 0\right)}^{2} + {\left(b \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.0500000000000001e-109

    1. Initial program 81.7%

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

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

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

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

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

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

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

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

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

    if 2.0500000000000001e-109 < a

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.05 \cdot 10^{-109}:\\ \;\;\;\;{\left(a \cdot 0\right)}^{2} + {\left(b \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{b}^{2} + {\left(\left(angle \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)}^{2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 79.4% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
  6. Taylor expanded in angle around inf 80.2%

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

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

Alternative 12: 79.4% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 79.4% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 67.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.4 \cdot 10^{-116}:\\
\;\;\;\;{b}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 4.4000000000000002e-116

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.005555555555555556 \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot a\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. associate-*l*74.6%

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

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

      \[\leadsto \color{blue}{{b}^{2}} \]

    if 4.4000000000000002e-116 < a

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 67.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.35 \cdot 10^{-115}:\\
\;\;\;\;{b}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.35e-115

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.005555555555555556 \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot a\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. associate-*l*74.6%

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

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

      \[\leadsto \color{blue}{{b}^{2}} \]

    if 1.35e-115 < a

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(0.005555555555555556 \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
      2. *-commutative73.4%

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

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

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

Alternative 16: 67.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.4 \cdot 10^{-115}:\\
\;\;\;\;{b}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(\pi \cdot \left(0.005555555555555556 \cdot \left(a \cdot angle\right)\right), b\right)\right)}^{2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.40000000000000021e-115

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.005555555555555556 \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot a\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. associate-*l*74.6%

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

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

      \[\leadsto \color{blue}{{b}^{2}} \]

    if 2.40000000000000021e-115 < a

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.005555555555555556 \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot a\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. associate-*l*73.3%

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

      \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(\pi \cdot \left(angle \cdot a\right)\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt73.3%

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{\left(0.005555555555555556 \cdot \left(\pi \cdot \left(angle \cdot a\right)\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot \left(angle \cdot a\right)\right)\right)} + {\left(b \cdot 1\right)}^{2}}\right)}^{2} \]
      4. *-rgt-identity73.3%

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

        \[\leadsto {\left(\sqrt{\left(0.005555555555555556 \cdot \left(\pi \cdot \left(angle \cdot a\right)\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot \left(angle \cdot a\right)\right)\right) + \color{blue}{b \cdot b}}\right)}^{2} \]
      6. hypot-def73.3%

        \[\leadsto {\color{blue}{\left(\mathsf{hypot}\left(0.005555555555555556 \cdot \left(\pi \cdot \left(angle \cdot a\right)\right), b\right)\right)}}^{2} \]
      7. associate-*r*73.4%

        \[\leadsto {\left(\mathsf{hypot}\left(\color{blue}{\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle \cdot a\right)}, b\right)\right)}^{2} \]
      8. *-commutative73.4%

        \[\leadsto {\left(\mathsf{hypot}\left(\color{blue}{\left(\pi \cdot 0.005555555555555556\right)} \cdot \left(angle \cdot a\right), b\right)\right)}^{2} \]
      9. associate-*l*73.4%

        \[\leadsto {\left(\mathsf{hypot}\left(\color{blue}{\pi \cdot \left(0.005555555555555556 \cdot \left(angle \cdot a\right)\right)}, b\right)\right)}^{2} \]
    10. Applied egg-rr73.4%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(\pi \cdot \left(0.005555555555555556 \cdot \left(angle \cdot a\right)\right), b\right)\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.1%

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

Alternative 17: 67.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.4 \cdot 10^{-115}:\\
\;\;\;\;{b}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(\left(\pi \cdot 0.005555555555555556\right) \cdot \left(a \cdot angle\right), b\right)\right)}^{2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.40000000000000021e-115

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.005555555555555556 \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot a\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. associate-*l*74.6%

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

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

      \[\leadsto \color{blue}{{b}^{2}} \]

    if 2.40000000000000021e-115 < a

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.005555555555555556 \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot a\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. associate-*l*73.3%

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

      \[\leadsto {\color{blue}{\left(0.005555555555555556 \cdot \left(\pi \cdot \left(angle \cdot a\right)\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
    9. Step-by-step derivation
      1. expm1-log1p-u71.5%

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(\pi \cdot \left(0.005555555555555556 \cdot \left(angle \cdot a\right)\right), b\right)\right)}^{2}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def71.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\mathsf{hypot}\left(\pi \cdot \left(0.005555555555555556 \cdot \left(angle \cdot a\right)\right), b\right)\right)}^{2}\right)\right)} \]
      2. expm1-log1p73.4%

        \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(\pi \cdot \left(0.005555555555555556 \cdot \left(angle \cdot a\right)\right), b\right)\right)}^{2}} \]
      3. associate-*r*73.4%

        \[\leadsto {\left(\mathsf{hypot}\left(\color{blue}{\left(\pi \cdot 0.005555555555555556\right) \cdot \left(angle \cdot a\right)}, b\right)\right)}^{2} \]
    12. Simplified73.4%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(\left(\pi \cdot 0.005555555555555556\right) \cdot \left(angle \cdot a\right), b\right)\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.1%

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

Alternative 18: 57.3% accurate, 6.0× speedup?

\[\begin{array}{l} \\ {b}^{2} \end{array} \]
(FPCore (a b angle) :precision binary64 (pow b 2.0))
double code(double a, double b, double angle) {
	return pow(b, 2.0);
}
real(8) function code(a, b, angle)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    code = b ** 2.0d0
end function
public static double code(double a, double b, double angle) {
	return Math.pow(b, 2.0);
}
def code(a, b, angle):
	return math.pow(b, 2.0)
function code(a, b, angle)
	return b ^ 2.0
end
function tmp = code(a, b, angle)
	tmp = b ^ 2.0;
end
code[a_, b_, angle_] := N[Power[b, 2.0], $MachinePrecision]
\begin{array}{l}

\\
{b}^{2}
\end{array}
Derivation
  1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(0.005555555555555556 \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot a\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    3. associate-*l*74.2%

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

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

    \[\leadsto \color{blue}{{b}^{2}} \]
  10. Final simplification61.1%

    \[\leadsto {b}^{2} \]
  11. Add Preprocessing

Reproduce

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