ab-angle->ABCF A

Percentage Accurate: 80.0% → 79.9%
Time: 59.8s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 80.0% 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.9% accurate, 0.6× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt{e}\right)}^{\left(2 \cdot \log \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}\right)\right)}^{2} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (+
  (pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0)
  (pow
   (*
    b
    (cos (pow (sqrt E) (* 2.0 (log (* angle_m (* PI 0.005555555555555556)))))))
   2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(pow(sqrt(((double) M_E)), (2.0 * log((angle_m * (((double) M_PI) * 0.005555555555555556))))))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	return Math.pow((a * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(Math.pow(Math.sqrt(Math.E), (2.0 * Math.log((angle_m * (Math.PI * 0.005555555555555556))))))), 2.0);
}
angle_m = math.fabs(angle)
def code(a, b, angle_m):
	return math.pow((a * math.sin(((angle_m / 180.0) * math.pi))), 2.0) + math.pow((b * math.cos(math.pow(math.sqrt(math.e), (2.0 * math.log((angle_m * (math.pi * 0.005555555555555556))))))), 2.0)
angle_m = abs(angle)
function code(a, b, angle_m)
	return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (Float64(b * cos((sqrt(exp(1)) ^ Float64(2.0 * log(Float64(angle_m * Float64(pi * 0.005555555555555556))))))) ^ 2.0))
end
angle_m = abs(angle);
function tmp = code(a, b, angle_m)
	tmp = ((a * sin(((angle_m / 180.0) * pi))) ^ 2.0) + ((b * cos((sqrt(2.71828182845904523536) ^ (2.0 * log((angle_m * (pi * 0.005555555555555556))))))) ^ 2.0);
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[Power[N[Sqrt[E], $MachinePrecision], N[(2.0 * N[Log[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $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}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt{e}\right)}^{\left(2 \cdot \log \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. *-commutative81.9%

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

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

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

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

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

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

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

      \[\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} \]
    5. rem-exp-log37.5%

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(e^{\color{blue}{1 \cdot \log \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}}\right)\right)}^{2} \]
    7. exp-prod37.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\color{blue}{\left(\sqrt{e} \cdot \sqrt{e}\right)}}^{\log \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)\right)}^{2} \]
    2. unpow-prod-down37.6%

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

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left({\left(\sqrt{e}\right)}^{\log \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)} \cdot {\left(\sqrt{e}\right)}^{\log \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)}\right)}^{2} \]
  11. Step-by-step derivation
    1. pow-sqr37.7%

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

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

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

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

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

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

Alternative 2: 80.0% accurate, 0.7× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{{\left(\sqrt{\pi}\right)}^{2}}{\frac{180}{angle\_m}}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. *-commutative81.9%

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

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

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

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

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

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

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

Alternative 3: 80.0% accurate, 1.0× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. *-commutative81.9%

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

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

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

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

Alternative 4: 80.0% accurate, 1.0× speedup?

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

\\
{\left(b \cdot \cos \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. *-commutative81.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 80.0% 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 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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. Add Preprocessing

Alternative 6: 80.0% accurate, 1.0× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(a \cdot \sin \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\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 (* 0.005555555555555556 (* angle_m PI)))) 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((0.005555555555555556 * (angle_m * ((double) M_PI))))), 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 * Math.cos((0.005555555555555556 * (angle_m * Math.PI)))), 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 * math.cos((0.005555555555555556 * (angle_m * math.pi)))), 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) + (Float64(b * cos(Float64(0.005555555555555556 * Float64(angle_m * pi)))) ^ 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 * cos((0.005555555555555556 * (angle_m * pi)))) ^ 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[N[(b * N[Cos[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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} + {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 inf 81.9%

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

Alternative 7: 80.0% accurate, 1.0× speedup?

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

\\
{\left(b \cdot \cos \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 inf 81.7%

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

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

Alternative 8: 79.9% 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 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 81.3%

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

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

Alternative 9: 79.8% accurate, 1.3× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2} + {b}^{2} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (+ (pow (* a (sin (* 0.005555555555555556 (* angle_m PI)))) 2.0) (pow b 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	return pow((a * sin((0.005555555555555556 * (angle_m * ((double) M_PI))))), 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((0.005555555555555556 * (angle_m * Math.PI)))), 2.0) + Math.pow(b, 2.0);
}
angle_m = math.fabs(angle)
def code(a, b, angle_m):
	return math.pow((a * math.sin((0.005555555555555556 * (angle_m * math.pi)))), 2.0) + math.pow(b, 2.0)
angle_m = abs(angle)
function code(a, b, angle_m)
	return Float64((Float64(a * sin(Float64(0.005555555555555556 * Float64(angle_m * pi)))) ^ 2.0) + (b ^ 2.0))
end
angle_m = abs(angle);
function tmp = code(a, b, angle_m)
	tmp = ((a * sin((0.005555555555555556 * (angle_m * pi)))) ^ 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[(0.005555555555555556 * N[(angle$95$m * Pi), $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(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2} + {b}^{2}
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 81.3%

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

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

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

Alternative 10: 73.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\frac{180}{angle\_m \cdot \pi}}{a}\\
\mathbf{if}\;angle\_m \leq 1.75 \cdot 10^{-181}:\\
\;\;\;\;{b}^{2} + \frac{1}{t\_0 \cdot t\_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 1.74999999999999998e-181

    1. Initial program 86.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/86.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)}^{2} \]
      2. associate-/l*86.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-neg86.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-out86.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-neg86.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-neg86.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-out86.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-neg86.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/86.7%

        \[\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*86.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot \left(\left(\color{blue}{\frac{\pi}{{\left(\sqrt{180}\right)}^{2}}} \cdot angle\right) \cdot a\right)\right) + {\left(b \cdot 1\right)}^{2} \]
      8. associate-/r/80.8%

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

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

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

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

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

        \[\leadsto \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot \color{blue}{\frac{1 \cdot a}{\frac{\frac{180}{angle}}{\pi}}}\right) + {\left(b \cdot 1\right)}^{2} \]
      14. *-un-lft-identity80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{3 \cdot 0.3333333333333333}}{\frac{\frac{180}{angle \cdot \pi}}{a}} \cdot \frac{a}{\frac{180}{angle \cdot \pi}} + {\left(b \cdot 1\right)}^{2} \]
      13. clear-num81.9%

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

        \[\leadsto \frac{3 \cdot 0.3333333333333333}{\frac{\frac{180}{angle \cdot \pi}}{a}} \cdot \frac{\color{blue}{3 \cdot 0.3333333333333333}}{\frac{\frac{180}{angle \cdot \pi}}{a}} + {\left(b \cdot 1\right)}^{2} \]
      15. frac-times81.9%

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

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

    if 1.74999999999999998e-181 < angle

    1. Initial program 72.7%

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

        \[\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*72.7%

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

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

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

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

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

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

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

        \[\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*72.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. Simplified72.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 73.1%

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

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

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

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

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

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

      \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot a\right)} - 1\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
    8. Taylor expanded in angle around 0 67.6%

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

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

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

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

Alternative 11: 75.1% accurate, 3.5× speedup?

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

\\
{b}^{2} + \left(0.005555555555555556 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\pi \cdot \left(a \cdot angle\_m\right)\right)
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 75.0% accurate, 3.5× speedup?

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

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

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 73.6% accurate, 3.5× speedup?

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

\\
{b}^{2} + \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 73.6% accurate, 3.5× speedup?

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

\\
{b}^{2} + \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot \left(\pi \cdot \left(a \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 73.6% accurate, 3.5× speedup?

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

\\
{b}^{2} + \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot \left(0.005555555555555556 \cdot \left(a \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 81.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. associate-*l/81.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*81.9%

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

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

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

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

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

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

      \[\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.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*82.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. Simplified82.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 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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