ab-angle->ABCF A

Percentage Accurate: 79.6% → 79.6%
Time: 20.5s
Alternatives: 13
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 13 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.6% 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.6% accurate, 0.5× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt[3]{angle} \cdot \sqrt[3]{0.005555555555555556}\right)}^{2} \cdot \left(\pi \cdot \sqrt[3]{angle \cdot 0.005555555555555556}\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt81.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
    2. pow381.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{angle \cdot 0.005555555555555556}\\ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(\pi \cdot t\_0\right) \cdot {t\_0}^{2}\right)\right)}^{2} \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (cbrt (* angle 0.005555555555555556))))
   (+
    (pow (* a (sin (* (/ angle 180.0) PI))) 2.0)
    (pow (* b (cos (* (* PI t_0) (pow t_0 2.0)))) 2.0))))
double code(double a, double b, double angle) {
	double t_0 = cbrt((angle * 0.005555555555555556));
	return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((((double) M_PI) * 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 * 0.005555555555555556));
	return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((Math.PI * t_0) * Math.pow(t_0, 2.0)))), 2.0);
}
function code(a, b, angle)
	t_0 = cbrt(Float64(angle * 0.005555555555555556))
	return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(pi * t_0) * (t_0 ^ 2.0)))) ^ 2.0))
end
code[a_, b_, angle_] := Block[{t$95$0 = N[Power[N[(angle * 0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(Pi * t$95$0), $MachinePrecision] * 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 0.005555555555555556}\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(\pi \cdot t\_0\right) \cdot {t\_0}^{2}\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt81.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
    2. pow381.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 79.6% accurate, 0.7× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt81.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
    2. pow381.2%

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

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

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

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

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

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

Alternative 4: 64.8% accurate, 0.7× speedup?

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

\\
{\left(a \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. expm1-log1p-u64.5%

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

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

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

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

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

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

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

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

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

Alternative 5: 79.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
{\left(\mathsf{hypot}\left(a \cdot \sin t\_0, b \cdot \cos t\_0\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt81.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
    2. pow381.2%

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

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

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

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

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

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

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

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

Alternative 6: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\
{\left(\mathsf{hypot}\left(a \cdot \sin t\_0, b \cdot \cos t\_0\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.0%

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

      \[\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} \]
    3. cos-neg81.0%

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\color{blue}{\left(-\frac{angle}{180}\right)} \cdot \pi\right)\right)}^{2} \]
    7. distribute-lft-neg-out81.0%

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

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

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

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

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

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

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

Alternative 7: 79.6% accurate, 1.0× speedup?

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

\\
{\left(\mathsf{hypot}\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), b \cdot \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt81.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
    2. pow381.2%

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

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

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

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

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

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

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

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

Alternative 8: 79.5% accurate, 1.3× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {b}^{2}
\end{array}
Derivation
  1. Initial program 81.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt81.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
    2. pow381.2%

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

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

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

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

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

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

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

Alternative 9: 61.8% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.4 \cdot 10^{+102}:\\
\;\;\;\;{\left(b \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left(a \cdot \sin \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 < 8.40000000000000006e102

    1. Initial program 78.6%

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

        \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
      2. pow378.8%

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

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

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

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

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

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

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

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

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

    if 8.40000000000000006e102 < a

    1. Initial program 96.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt96.3%

        \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
      2. pow396.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
      7. swap-sqr82.9%

        \[\leadsto \color{blue}{\left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot a\right) \cdot \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot a\right)} \]
      8. unpow282.9%

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \color{blue}{\left(\pi \cdot 0.005555555555555556\right)}\right)\right)}^{2} \]
    10. Simplified82.9%

      \[\leadsto \color{blue}{{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 61.8% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_0 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\
\mathbf{if}\;a \leq 8.4 \cdot 10^{+102}:\\
\;\;\;\;{\left(b \cdot \cos t\_0\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left(a \cdot \sin t\_0\right)}^{2}\\


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

    1. Initial program 78.6%

      \[{\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-*l/78.6%

        \[\leadsto {\left(a \cdot \sin \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)}\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
      2. associate-/l*78.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} \]
      3. cos-neg78.6%

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

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

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

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)}\right)}^{2} \]
      10. associate-/l*78.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. Simplified78.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 a around 0 64.8%

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

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

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

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

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

        \[\leadsto \left(\cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \color{blue}{\left(b \cdot b\right)} \]
      6. swap-sqr64.8%

        \[\leadsto \color{blue}{\left(\cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot b\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot b\right)} \]
      7. unpow264.8%

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

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

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

    if 8.40000000000000006e102 < a

    1. Initial program 96.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt96.3%

        \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
      2. pow396.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
      7. swap-sqr82.9%

        \[\leadsto \color{blue}{\left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot a\right) \cdot \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot a\right)} \]
      8. unpow282.9%

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \color{blue}{\left(\pi \cdot 0.005555555555555556\right)}\right)\right)}^{2} \]
    10. Simplified82.9%

      \[\leadsto \color{blue}{{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 61.8% accurate, 2.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;{\left(a \cdot \sin \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 < 2.3999999999999999e98

    1. Initial program 78.6%

      \[{\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-*l/78.6%

        \[\leadsto {\left(a \cdot \sin \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)}\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
      2. associate-/l*78.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} \]
      3. cos-neg78.6%

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

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

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

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)}\right)}^{2} \]
      10. associate-/l*78.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. Simplified78.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 64.3%

      \[\leadsto \color{blue}{{b}^{2}} \]
    6. Step-by-step derivation
      1. unpow264.3%

        \[\leadsto \color{blue}{b \cdot b} \]
    7. Applied egg-rr64.3%

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

    if 2.3999999999999999e98 < a

    1. Initial program 96.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt96.3%

        \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \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} \]
      2. pow396.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
      7. swap-sqr82.9%

        \[\leadsto \color{blue}{\left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot a\right) \cdot \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot a\right)} \]
      8. unpow282.9%

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \color{blue}{\left(\pi \cdot 0.005555555555555556\right)}\right)\right)}^{2} \]
    10. Simplified82.9%

      \[\leadsto \color{blue}{{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 57.2% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 1.1 \cdot 10^{+143}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{b}^{6}}\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= a 1.1e+143) (* b b) (cbrt (pow b 6.0))))
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 1.1e+143) {
		tmp = b * b;
	} else {
		tmp = cbrt(pow(b, 6.0));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 1.1e+143) {
		tmp = b * b;
	} else {
		tmp = Math.cbrt(Math.pow(b, 6.0));
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (a <= 1.1e+143)
		tmp = Float64(b * b);
	else
		tmp = cbrt((b ^ 6.0));
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[a, 1.1e+143], N[(b * b), $MachinePrecision], N[Power[N[Power[b, 6.0], $MachinePrecision], 1/3], $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{b}^{6}}\\


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

    1. Initial program 78.8%

      \[{\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-*l/78.8%

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

        \[\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} \]
      3. cos-neg78.8%

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\color{blue}{\left(-\frac{angle}{180}\right)} \cdot \pi\right)\right)}^{2} \]
      7. distribute-lft-neg-out78.8%

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

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

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

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

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

      \[\leadsto \color{blue}{{b}^{2}} \]
    6. Step-by-step derivation
      1. unpow263.2%

        \[\leadsto \color{blue}{b \cdot b} \]
    7. Applied egg-rr63.2%

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

    if 1.10000000000000007e143 < a

    1. Initial program 97.1%

      \[{\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-*l/97.0%

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

        \[\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} \]
      3. cos-neg97.0%

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\color{blue}{\left(-\frac{angle}{180}\right)} \cdot \pi\right)\right)}^{2} \]
      7. distribute-lft-neg-out97.0%

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

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

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

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

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

      \[\leadsto \color{blue}{{b}^{2}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt40.8%

        \[\leadsto \color{blue}{\sqrt{{b}^{2}} \cdot \sqrt{{b}^{2}}} \]
      2. sqrt-unprod52.8%

        \[\leadsto \color{blue}{\sqrt{{b}^{2} \cdot {b}^{2}}} \]
      3. pow-prod-up52.8%

        \[\leadsto \sqrt{\color{blue}{{b}^{\left(2 + 2\right)}}} \]
      4. metadata-eval52.8%

        \[\leadsto \sqrt{{b}^{\color{blue}{4}}} \]
    7. Applied egg-rr52.8%

      \[\leadsto \color{blue}{\sqrt{{b}^{4}}} \]
    8. Step-by-step derivation
      1. add-cbrt-cube52.8%

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

        \[\leadsto \color{blue}{{\left(\left(\sqrt{{b}^{4}} \cdot \sqrt{{b}^{4}}\right) \cdot \sqrt{{b}^{4}}\right)}^{0.3333333333333333}} \]
      3. add-sqr-sqrt52.5%

        \[\leadsto {\left(\color{blue}{{b}^{4}} \cdot \sqrt{{b}^{4}}\right)}^{0.3333333333333333} \]
      4. sqrt-pow152.5%

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

        \[\leadsto {\left({b}^{4} \cdot {b}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
      6. pow-prod-up52.5%

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

        \[\leadsto {\left({b}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
    9. Applied egg-rr52.5%

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

        \[\leadsto \color{blue}{\sqrt[3]{{b}^{6}}} \]
    11. Simplified52.8%

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

Alternative 13: 56.7% accurate, 139.0× speedup?

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

\\
b \cdot b
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.0%

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

      \[\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} \]
    3. cos-neg81.0%

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\color{blue}{\left(-\frac{angle}{180}\right)} \cdot \pi\right)\right)}^{2} \]
    7. distribute-lft-neg-out81.0%

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

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

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

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

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

    \[\leadsto \color{blue}{{b}^{2}} \]
  6. Step-by-step derivation
    1. unpow260.5%

      \[\leadsto \color{blue}{b \cdot b} \]
  7. Applied egg-rr60.5%

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

Reproduce

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