ab-angle->ABCF A

Percentage Accurate: 79.6% → 79.6%
Time: 6.4s
Alternatives: 11
Speedup: N/A×

Specification

?
\[\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} \]
(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}
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}

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

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

Initial Program: 79.6% accurate, 1.0× speedup?

\[\begin{array}{l} 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} \]
(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}
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}

Alternative 1: 79.6% accurate, 0.9× speedup?

\[{\left(a \cdot \sin \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\sqrt[3]{{\pi}^{1.6666666666666667}} \cdot 1.1356352767378999\right)\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow
   (*
    a
    (sin
     (*
      (*
       (* 0.005555555555555556 angle)
       (* (cbrt (pow PI 1.6666666666666667)) 1.1356352767378999))
      (cbrt PI))))
   2.0)
  (pow (* b 1.0) 2.0)))
double code(double a, double b, double angle) {
	return pow((a * sin((((0.005555555555555556 * angle) * (cbrt(pow(((double) M_PI), 1.6666666666666667)) * 1.1356352767378999)) * cbrt(((double) M_PI))))), 2.0) + pow((b * 1.0), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow((a * Math.sin((((0.005555555555555556 * angle) * (Math.cbrt(Math.pow(Math.PI, 1.6666666666666667)) * 1.1356352767378999)) * Math.cbrt(Math.PI)))), 2.0) + Math.pow((b * 1.0), 2.0);
}
function code(a, b, angle)
	return Float64((Float64(a * sin(Float64(Float64(Float64(0.005555555555555556 * angle) * Float64(cbrt((pi ^ 1.6666666666666667)) * 1.1356352767378999)) * cbrt(pi)))) ^ 2.0) + (Float64(b * 1.0) ^ 2.0))
end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[(N[Power[N[Power[Pi, 1.6666666666666667], $MachinePrecision], 1/3], $MachinePrecision] * 1.1356352767378999), $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * 1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
{\left(a \cdot \sin \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\sqrt[3]{{\pi}^{1.6666666666666667}} \cdot 1.1356352767378999\right)\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}
Derivation
  1. Initial program 79.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. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot {\pi}^{\color{blue}{\left(\frac{1}{3} + \frac{1}{3}\right)}}\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      3. pow-addN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \sqrt[3]{\pi \cdot {\pi}^{\color{blue}{\left(\frac{2}{3} + \frac{1}{3}\right)}}}\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      12. pow-prod-upN/A

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

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \sqrt[3]{\color{blue}{\left(\pi \cdot {\pi}^{\frac{2}{3}}\right) \cdot \sqrt[3]{\pi}}}\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      17. cbrt-prodN/A

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

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

      \[\leadsto {\left(a \cdot \sin \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot \color{blue}{\left(\sqrt[3]{{\pi}^{1.6666666666666667}} \cdot {\pi}^{0.1111111111111111}\right)}\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    6. Evaluated real constant79.5%

      \[\leadsto {\left(a \cdot \sin \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\sqrt[3]{{\pi}^{1.6666666666666667}} \cdot \color{blue}{1.1356352767378999}\right)\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    7. Add Preprocessing

    Alternative 2: 79.6% accurate, 1.2× speedup?

    \[{\left(a \cdot \sin \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot {\pi}^{0.6666666666666666}\right) \cdot 1.4645918875615234\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
    (FPCore (a b angle)
     :precision binary64
     (+
      (pow
       (*
        a
        (sin
         (*
          (* (* 0.005555555555555556 angle) (pow PI 0.6666666666666666))
          1.4645918875615234)))
       2.0)
      (pow (* b 1.0) 2.0)))
    double code(double a, double b, double angle) {
    	return pow((a * sin((((0.005555555555555556 * angle) * pow(((double) M_PI), 0.6666666666666666)) * 1.4645918875615234))), 2.0) + pow((b * 1.0), 2.0);
    }
    
    public static double code(double a, double b, double angle) {
    	return Math.pow((a * Math.sin((((0.005555555555555556 * angle) * Math.pow(Math.PI, 0.6666666666666666)) * 1.4645918875615234))), 2.0) + Math.pow((b * 1.0), 2.0);
    }
    
    def code(a, b, angle):
    	return math.pow((a * math.sin((((0.005555555555555556 * angle) * math.pow(math.pi, 0.6666666666666666)) * 1.4645918875615234))), 2.0) + math.pow((b * 1.0), 2.0)
    
    function code(a, b, angle)
    	return Float64((Float64(a * sin(Float64(Float64(Float64(0.005555555555555556 * angle) * (pi ^ 0.6666666666666666)) * 1.4645918875615234))) ^ 2.0) + (Float64(b * 1.0) ^ 2.0))
    end
    
    function tmp = code(a, b, angle)
    	tmp = ((a * sin((((0.005555555555555556 * angle) * (pi ^ 0.6666666666666666)) * 1.4645918875615234))) ^ 2.0) + ((b * 1.0) ^ 2.0);
    end
    
    code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[Pi, 0.6666666666666666], $MachinePrecision]), $MachinePrecision] * 1.4645918875615234), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * 1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
    
    {\left(a \cdot \sin \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot {\pi}^{0.6666666666666666}\right) \cdot 1.4645918875615234\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}
    
    Derivation
    1. Initial program 79.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. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(a \cdot \sin \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot {\pi}^{0.6666666666666666}\right) \cdot \color{blue}{1.4645918875615234}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
      5. Add Preprocessing

      Alternative 3: 79.5% accurate, 1.8× speedup?

      \[{\left(a \cdot \sin \left(0.017453292519943295 \cdot angle\right)\right)}^{2} + \left(\left(1 \cdot b\right) \cdot 1\right) \cdot b \]
      (FPCore (a b angle)
       :precision binary64
       (+
        (pow (* a (sin (* 0.017453292519943295 angle))) 2.0)
        (* (* (* 1.0 b) 1.0) b)))
      double code(double a, double b, double angle) {
      	return pow((a * sin((0.017453292519943295 * angle))), 2.0) + (((1.0 * b) * 1.0) * b);
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(a, b, angle)
      use fmin_fmax_functions
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: angle
          code = ((a * sin((0.017453292519943295d0 * angle))) ** 2.0d0) + (((1.0d0 * b) * 1.0d0) * b)
      end function
      
      public static double code(double a, double b, double angle) {
      	return Math.pow((a * Math.sin((0.017453292519943295 * angle))), 2.0) + (((1.0 * b) * 1.0) * b);
      }
      
      def code(a, b, angle):
      	return math.pow((a * math.sin((0.017453292519943295 * angle))), 2.0) + (((1.0 * b) * 1.0) * b)
      
      function code(a, b, angle)
      	return Float64((Float64(a * sin(Float64(0.017453292519943295 * angle))) ^ 2.0) + Float64(Float64(Float64(1.0 * b) * 1.0) * b))
      end
      
      function tmp = code(a, b, angle)
      	tmp = ((a * sin((0.017453292519943295 * angle))) ^ 2.0) + (((1.0 * b) * 1.0) * b);
      end
      
      code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(0.017453292519943295 * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(N[(1.0 * b), $MachinePrecision] * 1.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
      
      {\left(a \cdot \sin \left(0.017453292519943295 \cdot angle\right)\right)}^{2} + \left(\left(1 \cdot b\right) \cdot 1\right) \cdot b
      
      Derivation
      1. Initial program 79.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. Taylor expanded in angle around 0

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

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

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

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

            \[\leadsto {\left(a \cdot \sin \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
          4. mult-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto {\left(a \cdot \sin \left(\color{blue}{0.017453292519943295} \cdot angle\right)\right)}^{2} + \left(\left(1 \cdot b\right) \cdot 1\right) \cdot b \]
        7. Add Preprocessing

        Alternative 4: 79.5% accurate, 1.7× speedup?

        \[\begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 1.35 \cdot 10^{-6}:\\ \;\;\;\;{\left(a \cdot \left(0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(1 - \cos \left(0.011111111111111112 \cdot \left(\pi \cdot \left|angle\right|\right)\right)\right) \cdot 0.5, a \cdot a, \left(\left(1 \cdot b\right) \cdot b\right) \cdot 1\right)\\ \end{array} \]
        (FPCore (a b angle)
         :precision binary64
         (if (<= (fabs angle) 1.35e-6)
           (+
            (pow (* a (* 0.005555555555555556 (* (fabs angle) PI))) 2.0)
            (pow (* b 1.0) 2.0))
           (fma
            (* (- 1.0 (cos (* 0.011111111111111112 (* PI (fabs angle))))) 0.5)
            (* a a)
            (* (* (* 1.0 b) b) 1.0))))
        double code(double a, double b, double angle) {
        	double tmp;
        	if (fabs(angle) <= 1.35e-6) {
        		tmp = pow((a * (0.005555555555555556 * (fabs(angle) * ((double) M_PI)))), 2.0) + pow((b * 1.0), 2.0);
        	} else {
        		tmp = fma(((1.0 - cos((0.011111111111111112 * (((double) M_PI) * fabs(angle))))) * 0.5), (a * a), (((1.0 * b) * b) * 1.0));
        	}
        	return tmp;
        }
        
        function code(a, b, angle)
        	tmp = 0.0
        	if (abs(angle) <= 1.35e-6)
        		tmp = Float64((Float64(a * Float64(0.005555555555555556 * Float64(abs(angle) * pi))) ^ 2.0) + (Float64(b * 1.0) ^ 2.0));
        	else
        		tmp = fma(Float64(Float64(1.0 - cos(Float64(0.011111111111111112 * Float64(pi * abs(angle))))) * 0.5), Float64(a * a), Float64(Float64(Float64(1.0 * b) * b) * 1.0));
        	end
        	return tmp
        end
        
        code[a_, b_, angle_] := If[LessEqual[N[Abs[angle], $MachinePrecision], 1.35e-6], N[(N[Power[N[(a * N[(0.005555555555555556 * N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * 1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - N[Cos[N[(0.011111111111111112 * N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] * N[(a * a), $MachinePrecision] + N[(N[(N[(1.0 * b), $MachinePrecision] * b), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        \mathbf{if}\;\left|angle\right| \leq 1.35 \cdot 10^{-6}:\\
        \;\;\;\;{\left(a \cdot \left(0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(\left(1 - \cos \left(0.011111111111111112 \cdot \left(\pi \cdot \left|angle\right|\right)\right)\right) \cdot 0.5, a \cdot a, \left(\left(1 \cdot b\right) \cdot b\right) \cdot 1\right)\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if angle < 1.34999999999999999e-6

          1. Initial program 79.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. Taylor expanded in angle around 0

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

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

              \[\leadsto {\left(a \cdot \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

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

                \[\leadsto {\left(a \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
              3. lower-PI.f6474.4%

                \[\leadsto {\left(a \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
            4. Applied rewrites74.4%

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

            if 1.34999999999999999e-6 < angle

            1. Initial program 79.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. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto {\left(a \cdot \sin \left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot {\pi}^{\color{blue}{\left(\frac{1}{3} + \frac{1}{3}\right)}}\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
                3. pow-addN/A

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

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

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

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

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

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

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

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

                  \[\leadsto {\left(a \cdot \sin \left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \sqrt[3]{\pi \cdot {\pi}^{\color{blue}{\left(\frac{2}{3} + \frac{1}{3}\right)}}}\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
                12. pow-prod-upN/A

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

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

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

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

                  \[\leadsto {\left(a \cdot \sin \left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \sqrt[3]{\color{blue}{\left(\pi \cdot {\pi}^{\frac{2}{3}}\right) \cdot \sqrt[3]{\pi}}}\right) \cdot \sqrt[3]{\pi}\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
                17. cbrt-prodN/A

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

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

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

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

            Alternative 5: 77.1% accurate, 2.2× speedup?

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

              1. Initial program 79.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. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{{b}^{2}} \]
              3. Step-by-step derivation
                1. lower-pow.f6457.9%

                  \[\leadsto {b}^{\color{blue}{2}} \]
              4. Applied rewrites57.9%

                \[\leadsto \color{blue}{{b}^{2}} \]
              5. Step-by-step derivation
                1. lift-pow.f64N/A

                  \[\leadsto {b}^{\color{blue}{2}} \]
                2. pow2N/A

                  \[\leadsto b \cdot \color{blue}{b} \]
                3. lift-*.f6457.9%

                  \[\leadsto b \cdot \color{blue}{b} \]
              6. Applied rewrites57.9%

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

              if 1.02e-94 < a

              1. Initial program 79.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. Taylor expanded in angle around 0

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

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

                  \[\leadsto {\left(a \cdot \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
                3. Step-by-step derivation
                  1. lower-*.f64N/A

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

                    \[\leadsto {\left(a \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
                  3. lower-PI.f6474.4%

                    \[\leadsto {\left(a \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
                4. Applied rewrites74.4%

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

              Alternative 6: 77.1% accurate, 2.2× speedup?

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

                1. Initial program 79.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. Taylor expanded in angle around 0

                  \[\leadsto \color{blue}{{b}^{2}} \]
                3. Step-by-step derivation
                  1. lower-pow.f6457.9%

                    \[\leadsto {b}^{\color{blue}{2}} \]
                4. Applied rewrites57.9%

                  \[\leadsto \color{blue}{{b}^{2}} \]
                5. Step-by-step derivation
                  1. lift-pow.f64N/A

                    \[\leadsto {b}^{\color{blue}{2}} \]
                  2. pow2N/A

                    \[\leadsto b \cdot \color{blue}{b} \]
                  3. lift-*.f6457.9%

                    \[\leadsto b \cdot \color{blue}{b} \]
                6. Applied rewrites57.9%

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

                if 1.02e-94 < a

                1. Initial program 79.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. Taylor expanded in angle around 0

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

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

                    \[\leadsto {\color{blue}{\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
                  3. Step-by-step derivation
                    1. lower-*.f64N/A

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

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

                      \[\leadsto {\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
                    4. lower-PI.f6474.4%

                      \[\leadsto {\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
                  4. Applied rewrites74.4%

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

                Alternative 7: 68.5% accurate, 2.8× speedup?

                \[\begin{array}{l} t_0 := \left|b\right| \cdot \left|b\right|\\ \mathbf{if}\;\left|b\right| \leq 1.75 \cdot 10^{+149}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5}, t\_0, \left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right) \cdot angle, angle, t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                (FPCore (a b angle)
                 :precision binary64
                 (let* ((t_0 (* (fabs b) (fabs b))))
                   (if (<= (fabs b) 1.75e+149)
                     (fma
                      (*
                       (*
                        (* PI PI)
                        (fma -3.08641975308642e-5 t_0 (* (* a a) 3.08641975308642e-5)))
                       angle)
                      angle
                      t_0)
                     t_0)))
                double code(double a, double b, double angle) {
                	double t_0 = fabs(b) * fabs(b);
                	double tmp;
                	if (fabs(b) <= 1.75e+149) {
                		tmp = fma((((((double) M_PI) * ((double) M_PI)) * fma(-3.08641975308642e-5, t_0, ((a * a) * 3.08641975308642e-5))) * angle), angle, t_0);
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                function code(a, b, angle)
                	t_0 = Float64(abs(b) * abs(b))
                	tmp = 0.0
                	if (abs(b) <= 1.75e+149)
                		tmp = fma(Float64(Float64(Float64(pi * pi) * fma(-3.08641975308642e-5, t_0, Float64(Float64(a * a) * 3.08641975308642e-5))) * angle), angle, t_0);
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 1.75e+149], N[(N[(N[(N[(Pi * Pi), $MachinePrecision] * N[(-3.08641975308642e-5 * t$95$0 + N[(N[(a * a), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * angle + t$95$0), $MachinePrecision], t$95$0]]
                
                \begin{array}{l}
                t_0 := \left|b\right| \cdot \left|b\right|\\
                \mathbf{if}\;\left|b\right| \leq 1.75 \cdot 10^{+149}:\\
                \;\;\;\;\mathsf{fma}\left(\left(\left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5}, t\_0, \left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right) \cdot angle, angle, t\_0\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if b < 1.75000000000000006e149

                  1. Initial program 79.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. Taylor expanded in angle around 0

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{-1}{32400}, {b}^{2} \cdot {\pi}^{2}, \frac{1}{32400} \cdot \left({a}^{2} \cdot {\pi}^{2}\right)\right) \cdot {angle}^{2} + {b}^{2} \]
                    4. unpow2N/A

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

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

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{32400}, {b}^{2} \cdot {\pi}^{2}, \frac{1}{32400} \cdot \left({a}^{2} \cdot {\pi}^{2}\right)\right) \cdot angle, \color{blue}{angle}, {b}^{2}\right) \]
                  6. Applied rewrites42.4%

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

                  if 1.75000000000000006e149 < b

                  1. Initial program 79.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. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{{b}^{2}} \]
                  3. Step-by-step derivation
                    1. lower-pow.f6457.9%

                      \[\leadsto {b}^{\color{blue}{2}} \]
                  4. Applied rewrites57.9%

                    \[\leadsto \color{blue}{{b}^{2}} \]
                  5. Step-by-step derivation
                    1. lift-pow.f64N/A

                      \[\leadsto {b}^{\color{blue}{2}} \]
                    2. pow2N/A

                      \[\leadsto b \cdot \color{blue}{b} \]
                    3. lift-*.f6457.9%

                      \[\leadsto b \cdot \color{blue}{b} \]
                  6. Applied rewrites57.9%

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

                Alternative 8: 66.1% accurate, 2.8× speedup?

                \[\begin{array}{l} t_0 := \left|b\right| \cdot \left|b\right|\\ \mathbf{if}\;\left|b\right| \leq 1.7 \cdot 10^{+149}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot angle, \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5}, t\_0, \left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right), t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                (FPCore (a b angle)
                 :precision binary64
                 (let* ((t_0 (* (fabs b) (fabs b))))
                   (if (<= (fabs b) 1.7e+149)
                     (fma
                      (* angle angle)
                      (*
                       (* PI PI)
                       (fma -3.08641975308642e-5 t_0 (* (* a a) 3.08641975308642e-5)))
                      t_0)
                     t_0)))
                double code(double a, double b, double angle) {
                	double t_0 = fabs(b) * fabs(b);
                	double tmp;
                	if (fabs(b) <= 1.7e+149) {
                		tmp = fma((angle * angle), ((((double) M_PI) * ((double) M_PI)) * fma(-3.08641975308642e-5, t_0, ((a * a) * 3.08641975308642e-5))), t_0);
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                function code(a, b, angle)
                	t_0 = Float64(abs(b) * abs(b))
                	tmp = 0.0
                	if (abs(b) <= 1.7e+149)
                		tmp = fma(Float64(angle * angle), Float64(Float64(pi * pi) * fma(-3.08641975308642e-5, t_0, Float64(Float64(a * a) * 3.08641975308642e-5))), t_0);
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 1.7e+149], N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * N[(-3.08641975308642e-5 * t$95$0 + N[(N[(a * a), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], t$95$0]]
                
                \begin{array}{l}
                t_0 := \left|b\right| \cdot \left|b\right|\\
                \mathbf{if}\;\left|b\right| \leq 1.7 \cdot 10^{+149}:\\
                \;\;\;\;\mathsf{fma}\left(angle \cdot angle, \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5}, t\_0, \left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right), t\_0\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if b < 1.6999999999999999e149

                  1. Initial program 79.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. Taylor expanded in angle around 0

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left({angle}^{2}, \mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5}, {b}^{2} \cdot {\pi}^{2}, 3.08641975308642 \cdot 10^{-5} \cdot \left({a}^{2} \cdot {\pi}^{2}\right)\right), {b}^{2}\right)} \]
                  5. Step-by-step derivation
                    1. Applied rewrites40.0%

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

                    if 1.6999999999999999e149 < b

                    1. Initial program 79.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. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    3. Step-by-step derivation
                      1. lower-pow.f6457.9%

                        \[\leadsto {b}^{\color{blue}{2}} \]
                    4. Applied rewrites57.9%

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    5. Step-by-step derivation
                      1. lift-pow.f64N/A

                        \[\leadsto {b}^{\color{blue}{2}} \]
                      2. pow2N/A

                        \[\leadsto b \cdot \color{blue}{b} \]
                      3. lift-*.f6457.9%

                        \[\leadsto b \cdot \color{blue}{b} \]
                    6. Applied rewrites57.9%

                      \[\leadsto \color{blue}{b \cdot b} \]
                  6. Recombined 2 regimes into one program.
                  7. Add Preprocessing

                  Alternative 9: 60.3% accurate, 0.8× speedup?

                  \[\begin{array}{l} t_0 := \left(\left(b \cdot b\right) \cdot b\right) \cdot b\\ t_1 := \frac{angle}{180} \cdot \pi\\ \mathbf{if}\;{\left(a \cdot \sin t\_1\right)}^{2} + {\left(b \cdot \cos t\_1\right)}^{2} \leq 10^{+307}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\sqrt{t\_0 \cdot t\_0}}\\ \end{array} \]
                  (FPCore (a b angle)
                   :precision binary64
                   (let* ((t_0 (* (* (* b b) b) b)) (t_1 (* (/ angle 180.0) PI)))
                     (if (<= (+ (pow (* a (sin t_1)) 2.0) (pow (* b (cos t_1)) 2.0)) 1e+307)
                       (* b b)
                       (sqrt (sqrt (* t_0 t_0))))))
                  double code(double a, double b, double angle) {
                  	double t_0 = ((b * b) * b) * b;
                  	double t_1 = (angle / 180.0) * ((double) M_PI);
                  	double tmp;
                  	if ((pow((a * sin(t_1)), 2.0) + pow((b * cos(t_1)), 2.0)) <= 1e+307) {
                  		tmp = b * b;
                  	} else {
                  		tmp = sqrt(sqrt((t_0 * t_0)));
                  	}
                  	return tmp;
                  }
                  
                  public static double code(double a, double b, double angle) {
                  	double t_0 = ((b * b) * b) * b;
                  	double t_1 = (angle / 180.0) * Math.PI;
                  	double tmp;
                  	if ((Math.pow((a * Math.sin(t_1)), 2.0) + Math.pow((b * Math.cos(t_1)), 2.0)) <= 1e+307) {
                  		tmp = b * b;
                  	} else {
                  		tmp = Math.sqrt(Math.sqrt((t_0 * t_0)));
                  	}
                  	return tmp;
                  }
                  
                  def code(a, b, angle):
                  	t_0 = ((b * b) * b) * b
                  	t_1 = (angle / 180.0) * math.pi
                  	tmp = 0
                  	if (math.pow((a * math.sin(t_1)), 2.0) + math.pow((b * math.cos(t_1)), 2.0)) <= 1e+307:
                  		tmp = b * b
                  	else:
                  		tmp = math.sqrt(math.sqrt((t_0 * t_0)))
                  	return tmp
                  
                  function code(a, b, angle)
                  	t_0 = Float64(Float64(Float64(b * b) * b) * b)
                  	t_1 = Float64(Float64(angle / 180.0) * pi)
                  	tmp = 0.0
                  	if (Float64((Float64(a * sin(t_1)) ^ 2.0) + (Float64(b * cos(t_1)) ^ 2.0)) <= 1e+307)
                  		tmp = Float64(b * b);
                  	else
                  		tmp = sqrt(sqrt(Float64(t_0 * t_0)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(a, b, angle)
                  	t_0 = ((b * b) * b) * b;
                  	t_1 = (angle / 180.0) * pi;
                  	tmp = 0.0;
                  	if ((((a * sin(t_1)) ^ 2.0) + ((b * cos(t_1)) ^ 2.0)) <= 1e+307)
                  		tmp = b * b;
                  	else
                  		tmp = sqrt(sqrt((t_0 * t_0)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(N[(b * b), $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(a * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 1e+307], N[(b * b), $MachinePrecision], N[Sqrt[N[Sqrt[N[(t$95$0 * t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  t_0 := \left(\left(b \cdot b\right) \cdot b\right) \cdot b\\
                  t_1 := \frac{angle}{180} \cdot \pi\\
                  \mathbf{if}\;{\left(a \cdot \sin t\_1\right)}^{2} + {\left(b \cdot \cos t\_1\right)}^{2} \leq 10^{+307}:\\
                  \;\;\;\;b \cdot b\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\sqrt{\sqrt{t\_0 \cdot t\_0}}\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) < 9.99999999999999986e306

                    1. Initial program 79.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. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    3. Step-by-step derivation
                      1. lower-pow.f6457.9%

                        \[\leadsto {b}^{\color{blue}{2}} \]
                    4. Applied rewrites57.9%

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    5. Step-by-step derivation
                      1. lift-pow.f64N/A

                        \[\leadsto {b}^{\color{blue}{2}} \]
                      2. pow2N/A

                        \[\leadsto b \cdot \color{blue}{b} \]
                      3. lift-*.f6457.9%

                        \[\leadsto b \cdot \color{blue}{b} \]
                    6. Applied rewrites57.9%

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

                    if 9.99999999999999986e306 < (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)))

                    1. Initial program 79.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. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    3. Step-by-step derivation
                      1. lower-pow.f6457.9%

                        \[\leadsto {b}^{\color{blue}{2}} \]
                    4. Applied rewrites57.9%

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    5. Step-by-step derivation
                      1. rem-square-sqrtN/A

                        \[\leadsto \sqrt{{b}^{2}} \cdot \color{blue}{\sqrt{{b}^{2}}} \]
                      2. sqrt-unprodN/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      3. lower-*.f32N/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      4. lower-unsound-*.f32N/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      5. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      6. lower-unsound-*.f6450.3%

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      7. lift-pow.f64N/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      8. pow2N/A

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot {b}^{2}} \]
                      9. lift-*.f6450.3%

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot {b}^{2}} \]
                      10. lift-pow.f64N/A

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot {b}^{2}} \]
                      11. pow2N/A

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
                      12. lift-*.f6450.3%

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
                    6. Applied rewrites50.3%

                      \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
                    7. Step-by-step derivation
                      1. rem-square-sqrtN/A

                        \[\leadsto \sqrt{\sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \cdot \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)}} \]
                      2. sqrt-unprodN/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      4. lower-*.f6445.8%

                        \[\leadsto \sqrt{\sqrt{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      5. lift-*.f64N/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      6. lift-*.f64N/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      7. associate-*l*N/A

                        \[\leadsto \sqrt{\sqrt{\left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      8. *-commutativeN/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      9. lower-*.f64N/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      10. *-commutativeN/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      11. lower-*.f6445.8%

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      12. lift-*.f64N/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      13. lift-*.f64N/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)}} \]
                      14. associate-*l*N/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}} \]
                      15. *-commutativeN/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}} \]
                      16. lower-*.f64N/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(b \cdot \left(b \cdot b\right)\right) \cdot b\right)}} \]
                      17. *-commutativeN/A

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}} \]
                      18. lower-*.f6445.8%

                        \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}} \]
                    8. Applied rewrites45.8%

                      \[\leadsto \sqrt{\sqrt{\left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right) \cdot \left(\left(\left(b \cdot b\right) \cdot b\right) \cdot b\right)}} \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 10: 59.5% accurate, 0.9× speedup?

                  \[\begin{array}{l} t_0 := \frac{angle}{180} \cdot \pi\\ \mathbf{if}\;{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2} \leq 10^{+307}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)}\\ \end{array} \]
                  (FPCore (a b angle)
                   :precision binary64
                   (let* ((t_0 (* (/ angle 180.0) PI)))
                     (if (<= (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0)) 1e+307)
                       (* b b)
                       (sqrt (* (* b b) (* b b))))))
                  double code(double a, double b, double angle) {
                  	double t_0 = (angle / 180.0) * ((double) M_PI);
                  	double tmp;
                  	if ((pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0)) <= 1e+307) {
                  		tmp = b * b;
                  	} else {
                  		tmp = sqrt(((b * b) * (b * b)));
                  	}
                  	return tmp;
                  }
                  
                  public static double code(double a, double b, double angle) {
                  	double t_0 = (angle / 180.0) * Math.PI;
                  	double tmp;
                  	if ((Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0)) <= 1e+307) {
                  		tmp = b * b;
                  	} else {
                  		tmp = Math.sqrt(((b * b) * (b * b)));
                  	}
                  	return tmp;
                  }
                  
                  def code(a, b, angle):
                  	t_0 = (angle / 180.0) * math.pi
                  	tmp = 0
                  	if (math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)) <= 1e+307:
                  		tmp = b * b
                  	else:
                  		tmp = math.sqrt(((b * b) * (b * b)))
                  	return tmp
                  
                  function code(a, b, angle)
                  	t_0 = Float64(Float64(angle / 180.0) * pi)
                  	tmp = 0.0
                  	if (Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0)) <= 1e+307)
                  		tmp = Float64(b * b);
                  	else
                  		tmp = sqrt(Float64(Float64(b * b) * Float64(b * b)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(a, b, angle)
                  	t_0 = (angle / 180.0) * pi;
                  	tmp = 0.0;
                  	if ((((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0)) <= 1e+307)
                  		tmp = b * b;
                  	else
                  		tmp = sqrt(((b * b) * (b * b)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[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], 1e+307], N[(b * b), $MachinePrecision], N[Sqrt[N[(N[(b * b), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
                  
                  \begin{array}{l}
                  t_0 := \frac{angle}{180} \cdot \pi\\
                  \mathbf{if}\;{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2} \leq 10^{+307}:\\
                  \;\;\;\;b \cdot b\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)}\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) < 9.99999999999999986e306

                    1. Initial program 79.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. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    3. Step-by-step derivation
                      1. lower-pow.f6457.9%

                        \[\leadsto {b}^{\color{blue}{2}} \]
                    4. Applied rewrites57.9%

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    5. Step-by-step derivation
                      1. lift-pow.f64N/A

                        \[\leadsto {b}^{\color{blue}{2}} \]
                      2. pow2N/A

                        \[\leadsto b \cdot \color{blue}{b} \]
                      3. lift-*.f6457.9%

                        \[\leadsto b \cdot \color{blue}{b} \]
                    6. Applied rewrites57.9%

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

                    if 9.99999999999999986e306 < (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)))

                    1. Initial program 79.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. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    3. Step-by-step derivation
                      1. lower-pow.f6457.9%

                        \[\leadsto {b}^{\color{blue}{2}} \]
                    4. Applied rewrites57.9%

                      \[\leadsto \color{blue}{{b}^{2}} \]
                    5. Step-by-step derivation
                      1. rem-square-sqrtN/A

                        \[\leadsto \sqrt{{b}^{2}} \cdot \color{blue}{\sqrt{{b}^{2}}} \]
                      2. sqrt-unprodN/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      3. lower-*.f32N/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      4. lower-unsound-*.f32N/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      5. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      6. lower-unsound-*.f6450.3%

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      7. lift-pow.f64N/A

                        \[\leadsto \sqrt{{b}^{2} \cdot {b}^{2}} \]
                      8. pow2N/A

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot {b}^{2}} \]
                      9. lift-*.f6450.3%

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot {b}^{2}} \]
                      10. lift-pow.f64N/A

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot {b}^{2}} \]
                      11. pow2N/A

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
                      12. lift-*.f6450.3%

                        \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
                    6. Applied rewrites50.3%

                      \[\leadsto \sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 11: 57.9% accurate, 29.7× speedup?

                  \[b \cdot b \]
                  (FPCore (a b angle) :precision binary64 (* b b))
                  double code(double a, double b, double angle) {
                  	return b * b;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(a, b, angle)
                  use fmin_fmax_functions
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: angle
                      code = b * b
                  end function
                  
                  public static double code(double a, double b, double angle) {
                  	return b * b;
                  }
                  
                  def code(a, b, angle):
                  	return b * b
                  
                  function code(a, b, angle)
                  	return Float64(b * b)
                  end
                  
                  function tmp = code(a, b, angle)
                  	tmp = b * b;
                  end
                  
                  code[a_, b_, angle_] := N[(b * b), $MachinePrecision]
                  
                  b \cdot b
                  
                  Derivation
                  1. Initial program 79.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. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{{b}^{2}} \]
                  3. Step-by-step derivation
                    1. lower-pow.f6457.9%

                      \[\leadsto {b}^{\color{blue}{2}} \]
                  4. Applied rewrites57.9%

                    \[\leadsto \color{blue}{{b}^{2}} \]
                  5. Step-by-step derivation
                    1. lift-pow.f64N/A

                      \[\leadsto {b}^{\color{blue}{2}} \]
                    2. pow2N/A

                      \[\leadsto b \cdot \color{blue}{b} \]
                    3. lift-*.f6457.9%

                      \[\leadsto b \cdot \color{blue}{b} \]
                  6. Applied rewrites57.9%

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

                  Reproduce

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