ab-angle->ABCF A

Percentage Accurate: 79.9% → 79.7%
Time: 19.4s
Alternatives: 10
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 10 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.9% 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.7% accurate, 0.4× speedup?

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

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

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

      \[\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} \]
  4. Applied egg-rr78.9%

    \[\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} \]
  5. Step-by-step derivation
    1. associate-*l/79.0%

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)}\right)}^{2} \]
  7. Step-by-step derivation
    1. add-sqr-sqrt66.8%

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\color{blue}{\sqrt{{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}^{2}}} \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
  9. Final simplification79.1%

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

Alternative 2: 79.7% accurate, 0.4× speedup?

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

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

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

      \[\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} \]
  4. Applied egg-rr78.9%

    \[\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} \]
  5. Step-by-step derivation
    1. associate-*l/79.0%

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)}\right)}^{2} \]
  7. Step-by-step derivation
    1. add-sqr-sqrt66.8%

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\color{blue}{\sqrt{{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}^{2}}} \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
  9. Step-by-step derivation
    1. add-sqr-sqrt79.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\color{blue}{\left(\sqrt{\sqrt{{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}^{2}}} \cdot \sqrt{\sqrt{{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}^{2}}}\right)} \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
    2. sqrt-prod79.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\color{blue}{\sqrt{\sqrt{{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}^{2}} \cdot \sqrt{{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}^{2}}}} \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
    3. rem-sqrt-square79.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\color{blue}{\left|\sqrt{{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}^{2}}\right|} \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
    4. sqrt-pow179.1%

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\left|{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}^{\color{blue}{1}}\right| \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
    6. pow179.1%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\left|\color{blue}{\cos \left(\mathsf{fma}\left(angle \cdot \pi, 0.005555555555555556, 1\right)\right)}\right| \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
    7. fma-undefine79.1%

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\left|\cos \color{blue}{\left(\mathsf{fma}\left(angle, \frac{\pi}{180}, 1\right)\right)}\right| \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
    12. div-inv79.1%

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\left|\cos \left(\mathsf{fma}\left(angle, \pi \cdot \color{blue}{0.005555555555555556}, 1\right)\right)\right| \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
  10. Applied egg-rr79.1%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\color{blue}{\left|\cos \left(\mathsf{fma}\left(angle, \pi \cdot 0.005555555555555556, 1\right)\right)\right|} \cdot \cos 1 + \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \sin 1\right)\right)}^{2} \]
  11. Final simplification79.1%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\sin \left(1 + \left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \sin 1 + \cos 1 \cdot \left|\cos \left(\mathsf{fma}\left(angle, \pi \cdot 0.005555555555555556, 1\right)\right)\right|\right)\right)}^{2} \]
  12. Add Preprocessing

Alternative 3: 79.9% accurate, 0.5× speedup?

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

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

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

      \[\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} \]
  4. Applied egg-rr78.9%

    \[\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} \]
  5. Step-by-step derivation
    1. associate-*l/79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right) + 1\right) \cdot \cos 1 + \color{blue}{\sin \left(\mathsf{fma}\left(angle, 0.005555555555555556 \cdot \pi, 1\right)\right)} \cdot \sin 1\right)\right)}^{2} \]
  10. Final simplification79.1%

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

Alternative 4: 79.9% accurate, 0.6× speedup?

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

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

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

      \[\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} \]
  4. Applied egg-rr78.9%

    \[\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} \]
  5. Step-by-step derivation
    1. associate-*l/79.0%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.9% accurate, 0.7× speedup?

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

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

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

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

      \[\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/52.4%

      \[\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/52.4%

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

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

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

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

      \[\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} \]
    2. associate-*r*62.9%

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

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

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

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

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

Alternative 6: 79.9% accurate, 1.0× speedup?

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

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

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

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

      \[\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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
    3. associate-/l*79.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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
    4. unpow279.0%

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

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

Alternative 7: 79.8% accurate, 1.3× speedup?

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

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

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

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

      \[\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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
    3. associate-/l*79.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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
    4. unpow279.0%

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

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

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

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

Alternative 8: 62.7% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 75.5%

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + \color{blue}{{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}} \]
    3. Simplified75.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 59.3%

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

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

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

    if 7.50000000000000026e156 < a

    1. Initial program 99.4%

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

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

        \[\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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
      3. associate-/l*99.5%

        \[\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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
      4. unpow299.5%

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

      \[\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. Step-by-step derivation
      1. associate-*r/99.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      6. swap-sqr81.3%

        \[\leadsto \color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      7. unpow281.3%

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

      \[\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 9: 62.6% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 75.5%

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

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

        \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + \color{blue}{{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}} \]
    3. Simplified75.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 59.3%

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

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

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

    if 1.30000000000000005e157 < a

    1. Initial program 99.4%

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

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

        \[\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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
      3. associate-/l*99.5%

        \[\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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
      4. unpow299.5%

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

      \[\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 inf 56.5%

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

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

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

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

        \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)} \]
      5. swap-sqr81.4%

        \[\leadsto \color{blue}{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)} \]
      6. unpow281.4%

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

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

        \[\leadsto {\left(a \cdot \sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} \]
    7. Simplified81.4%

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

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

Alternative 10: 56.2% accurate, 139.0× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ b \cdot b \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m) :precision binary64 (* b b))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	return b * b;
}
angle_m = abs(angle)
real(8) function code(a, b, angle_m)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle_m
    code = b * b
end function
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	return b * b;
}
angle_m = math.fabs(angle)
def code(a, b, angle_m):
	return b * b
angle_m = abs(angle)
function code(a, b, angle_m)
	return Float64(b * b)
end
angle_m = abs(angle);
function tmp = code(a, b, angle_m)
	tmp = b * b;
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := N[(b * b), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|

\\
b \cdot b
\end{array}
Derivation
  1. Initial program 78.9%

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

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

      \[\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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
    3. associate-/l*79.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) \cdot \left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right) \]
    4. unpow279.0%

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

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

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

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

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

Reproduce

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