ab-angle->ABCF A

Percentage Accurate: 79.0% → 79.1%
Time: 4.6s
Alternatives: 9
Speedup: 1.0×

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
  :pre TRUE
  (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]]
f(a, b, angle):
	a in [-inf, +inf],
	b in [-inf, +inf],
	angle in [-inf, +inf]
code: THEORY
BEGIN
f(a, b, angle: real): real =
	LET t_0 = ((angle / (180)) * (4 * atan(1))) IN
	((a * (sin(t_0))) ^ (2)) + ((b * (cos(t_0))) ^ (2))
END code
\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 9 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.0% 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
  :pre TRUE
  (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]]
f(a, b, angle):
	a in [-inf, +inf],
	b in [-inf, +inf],
	angle in [-inf, +inf]
code: THEORY
BEGIN
f(a, b, angle: real): real =
	LET t_0 = ((angle / (180)) * (4 * atan(1))) IN
	((a * (sin(t_0))) ^ (2)) + ((b * (cos(t_0))) ^ (2))
END code
\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.1% accurate, 0.9× speedup?

\[{\left(a \cdot \sin \left(\frac{1}{{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}^{-1}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right)\right)}^{2} \]
(FPCore (a b angle)
  :precision binary64
  :pre TRUE
  (+
 (pow
  (* a (sin (/ 1.0 (pow (* PI (* 0.005555555555555556 angle)) -1.0))))
  2.0)
 (pow (* b (sin (* PI (fma 0.005555555555555556 angle 0.5)))) 2.0)))
double code(double a, double b, double angle) {
	return pow((a * sin((1.0 / pow((((double) M_PI) * (0.005555555555555556 * angle)), -1.0)))), 2.0) + pow((b * sin((((double) M_PI) * fma(0.005555555555555556, angle, 0.5)))), 2.0);
}
function code(a, b, angle)
	return Float64((Float64(a * sin(Float64(1.0 / (Float64(pi * Float64(0.005555555555555556 * angle)) ^ -1.0)))) ^ 2.0) + (Float64(b * sin(Float64(pi * fma(0.005555555555555556, angle, 0.5)))) ^ 2.0))
end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(1.0 / N[Power[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle + 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
f(a, b, angle):
	a in [-inf, +inf],
	b in [-inf, +inf],
	angle in [-inf, +inf]
code: THEORY
BEGIN
f(a, b, angle: real): real =
	((a * (sin(((1) / (((4 * atan(1)) * ((5555555555555555767577313730498644872568547725677490234375e-60) * angle)) ^ (-1)))))) ^ (2)) + ((b * (sin(((4 * atan(1)) * (((5555555555555555767577313730498644872568547725677490234375e-60) * angle) + (5e-1)))))) ^ (2))
END code
{\left(a \cdot \sin \left(\frac{1}{{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}^{-1}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right)\right)}^{2}
Derivation
  1. Initial program 79.0%

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

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right)\right)}^{2} \]
    2. Step-by-step derivation
      1. Applied rewrites79.0%

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

      Alternative 2: 79.0% accurate, 1.0× speedup?

      \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right)\right)}^{2} \]
      (FPCore (a b angle)
        :precision binary64
        :pre TRUE
        (+
       (pow (* a (sin (* (/ angle 180.0) PI))) 2.0)
       (pow (* b (sin (* PI (fma 0.005555555555555556 angle 0.5)))) 2.0)))
      double code(double a, double b, double angle) {
      	return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * sin((((double) M_PI) * fma(0.005555555555555556, angle, 0.5)))), 2.0);
      }
      
      function code(a, b, angle)
      	return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * sin(Float64(pi * fma(0.005555555555555556, angle, 0.5)))) ^ 2.0))
      end
      
      code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle + 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
      
      f(a, b, angle):
      	a in [-inf, +inf],
      	b in [-inf, +inf],
      	angle in [-inf, +inf]
      code: THEORY
      BEGIN
      f(a, b, angle: real): real =
      	((a * (sin(((angle / (180)) * (4 * atan(1)))))) ^ (2)) + ((b * (sin(((4 * atan(1)) * (((5555555555555555767577313730498644872568547725677490234375e-60) * angle) + (5e-1)))))) ^ (2))
      END code
      {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right)\right)}^{2}
      
      Derivation
      1. Initial program 79.0%

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

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

        Alternative 3: 79.0% accurate, 1.9× speedup?

        \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + b \cdot b \]
        (FPCore (a b angle)
          :precision binary64
          :pre TRUE
          (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (* b b)))
        double code(double a, double b, double angle) {
        	return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + (b * b);
        }
        
        public static double code(double a, double b, double angle) {
        	return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + (b * b);
        }
        
        def code(a, b, angle):
        	return math.pow((a * math.sin(((angle / 180.0) * math.pi))), 2.0) + (b * b)
        
        function code(a, b, angle)
        	return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + Float64(b * b))
        end
        
        function tmp = code(a, b, angle)
        	tmp = ((a * sin(((angle / 180.0) * pi))) ^ 2.0) + (b * b);
        end
        
        code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]
        
        f(a, b, angle):
        	a in [-inf, +inf],
        	b in [-inf, +inf],
        	angle in [-inf, +inf]
        code: THEORY
        BEGIN
        f(a, b, angle: real): real =
        	((a * (sin(((angle / (180)) * (4 * atan(1)))))) ^ (2)) + (b * b)
        END code
        {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + b \cdot b
        
        Derivation
        1. Initial program 79.0%

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

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

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

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

            Alternative 4: 78.9% accurate, 1.9× speedup?

            \[\begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 57.91029501410751:\\ \;\;\;\;{\left(0.005555555555555556 \cdot \left(a \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right)}^{2} + {b}^{2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot \left|angle\right|\right)\right)\right), a \cdot a, b \cdot b\right)\\ \end{array} \]
            (FPCore (a b angle)
              :precision binary64
              :pre TRUE
              (if (<= (fabs angle) 57.91029501410751)
              (+
               (pow (* 0.005555555555555556 (* a (* (fabs angle) PI))) 2.0)
               (pow b 2.0))
              (fma
               (-
                0.5
                (*
                 0.5
                 (cos (* 2.0 (* PI (* 0.005555555555555556 (fabs angle)))))))
               (* a a)
               (* b b))))
            double code(double a, double b, double angle) {
            	double tmp;
            	if (fabs(angle) <= 57.91029501410751) {
            		tmp = pow((0.005555555555555556 * (a * (fabs(angle) * ((double) M_PI)))), 2.0) + pow(b, 2.0);
            	} else {
            		tmp = fma((0.5 - (0.5 * cos((2.0 * (((double) M_PI) * (0.005555555555555556 * fabs(angle))))))), (a * a), (b * b));
            	}
            	return tmp;
            }
            
            function code(a, b, angle)
            	tmp = 0.0
            	if (abs(angle) <= 57.91029501410751)
            		tmp = Float64((Float64(0.005555555555555556 * Float64(a * Float64(abs(angle) * pi))) ^ 2.0) + (b ^ 2.0));
            	else
            		tmp = fma(Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * Float64(pi * Float64(0.005555555555555556 * abs(angle))))))), Float64(a * a), Float64(b * b));
            	end
            	return tmp
            end
            
            code[a_, b_, angle_] := If[LessEqual[N[Abs[angle], $MachinePrecision], 57.91029501410751], N[(N[Power[N[(0.005555555555555556 * N[(a * N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * N[(Pi * N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]]
            
            f(a, b, angle):
            	a in [-inf, +inf],
            	b in [-inf, +inf],
            	angle in [-inf, +inf]
            code: THEORY
            BEGIN
            f(a, b, angle: real): real =
            	LET tmp = IF ((abs(angle)) <= (5791029501410751123557929531671106815338134765625e-47)) THEN ((((5555555555555555767577313730498644872568547725677490234375e-60) * (a * ((abs(angle)) * (4 * atan(1))))) ^ (2)) + (b ^ (2))) ELSE ((((5e-1) - ((5e-1) * (cos(((2) * ((4 * atan(1)) * ((5555555555555555767577313730498644872568547725677490234375e-60) * (abs(angle))))))))) * (a * a)) + (b * b)) ENDIF IN
            	tmp
            END code
            \begin{array}{l}
            \mathbf{if}\;\left|angle\right| \leq 57.91029501410751:\\
            \;\;\;\;{\left(0.005555555555555556 \cdot \left(a \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right)}^{2} + {b}^{2}\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot \left|angle\right|\right)\right)\right), a \cdot a, b \cdot b\right)\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 57.910295014107511

              1. Initial program 79.0%

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

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

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

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

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

                  if 57.910295014107511 < angle

                  1. Initial program 79.0%

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

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

                      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {b}^{2} \]
                    2. Applied rewrites61.6%

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

                  Alternative 5: 75.4% accurate, 2.2× speedup?

                  \[\begin{array}{l} \mathbf{if}\;\left|a\right| \leq 1.678151993572926 \cdot 10^{+37}:\\ \;\;\;\;\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \pi\right)\right)\right) \cdot \left(b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(0.005555555555555556 \cdot \left(\left|a\right| \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {b}^{2}\\ \end{array} \]
                  (FPCore (a b angle)
                    :precision binary64
                    :pre TRUE
                    (if (<= (fabs a) 1.678151993572926e+37)
                    (* (- 0.5 (* 0.5 (cos (* 2.0 (* 0.5 PI))))) (* b b))
                    (+
                     (pow (* 0.005555555555555556 (* (fabs a) (* angle PI))) 2.0)
                     (pow b 2.0))))
                  double code(double a, double b, double angle) {
                  	double tmp;
                  	if (fabs(a) <= 1.678151993572926e+37) {
                  		tmp = (0.5 - (0.5 * cos((2.0 * (0.5 * ((double) M_PI)))))) * (b * b);
                  	} else {
                  		tmp = pow((0.005555555555555556 * (fabs(a) * (angle * ((double) M_PI)))), 2.0) + pow(b, 2.0);
                  	}
                  	return tmp;
                  }
                  
                  public static double code(double a, double b, double angle) {
                  	double tmp;
                  	if (Math.abs(a) <= 1.678151993572926e+37) {
                  		tmp = (0.5 - (0.5 * Math.cos((2.0 * (0.5 * Math.PI))))) * (b * b);
                  	} else {
                  		tmp = Math.pow((0.005555555555555556 * (Math.abs(a) * (angle * Math.PI))), 2.0) + Math.pow(b, 2.0);
                  	}
                  	return tmp;
                  }
                  
                  def code(a, b, angle):
                  	tmp = 0
                  	if math.fabs(a) <= 1.678151993572926e+37:
                  		tmp = (0.5 - (0.5 * math.cos((2.0 * (0.5 * math.pi))))) * (b * b)
                  	else:
                  		tmp = math.pow((0.005555555555555556 * (math.fabs(a) * (angle * math.pi))), 2.0) + math.pow(b, 2.0)
                  	return tmp
                  
                  function code(a, b, angle)
                  	tmp = 0.0
                  	if (abs(a) <= 1.678151993572926e+37)
                  		tmp = Float64(Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * Float64(0.5 * pi))))) * Float64(b * b));
                  	else
                  		tmp = Float64((Float64(0.005555555555555556 * Float64(abs(a) * Float64(angle * pi))) ^ 2.0) + (b ^ 2.0));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(a, b, angle)
                  	tmp = 0.0;
                  	if (abs(a) <= 1.678151993572926e+37)
                  		tmp = (0.5 - (0.5 * cos((2.0 * (0.5 * pi))))) * (b * b);
                  	else
                  		tmp = ((0.005555555555555556 * (abs(a) * (angle * pi))) ^ 2.0) + (b ^ 2.0);
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[a_, b_, angle_] := If[LessEqual[N[Abs[a], $MachinePrecision], 1.678151993572926e+37], N[(N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(0.005555555555555556 * N[(N[Abs[a], $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]]
                  
                  f(a, b, angle):
                  	a in [-inf, +inf],
                  	b in [-inf, +inf],
                  	angle in [-inf, +inf]
                  code: THEORY
                  BEGIN
                  f(a, b, angle: real): real =
                  	LET tmp = IF ((abs(a)) <= (16781519935729260116091134213040898048)) THEN (((5e-1) - ((5e-1) * (cos(((2) * ((5e-1) * (4 * atan(1)))))))) * (b * b)) ELSE ((((5555555555555555767577313730498644872568547725677490234375e-60) * ((abs(a)) * (angle * (4 * atan(1))))) ^ (2)) + (b ^ (2))) ENDIF IN
                  	tmp
                  END code
                  \begin{array}{l}
                  \mathbf{if}\;\left|a\right| \leq 1.678151993572926 \cdot 10^{+37}:\\
                  \;\;\;\;\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \pi\right)\right)\right) \cdot \left(b \cdot b\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;{\left(0.005555555555555556 \cdot \left(\left|a\right| \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {b}^{2}\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if a < 1.678151993572926e37

                    1. Initial program 79.0%

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

                      \[\leadsto {b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)}^{2} \]
                    3. Step-by-step derivation
                      1. Applied rewrites56.3%

                        \[\leadsto {b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \]
                      2. Step-by-step derivation
                        1. Applied rewrites56.4%

                          \[\leadsto {b}^{2} \cdot {\sin \left(\mathsf{fma}\left(0.005555555555555556, angle, 0.5\right) \cdot \pi\right)}^{2} \]
                        2. Taylor expanded in angle around 0

                          \[\leadsto {b}^{2} \cdot {\sin \left(\frac{1}{2} \cdot \pi\right)}^{2} \]
                        3. Step-by-step derivation
                          1. Applied rewrites56.6%

                            \[\leadsto {b}^{2} \cdot {\sin \left(0.5 \cdot \pi\right)}^{2} \]
                          2. Applied rewrites56.6%

                            \[\leadsto \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \pi\right)\right)\right) \cdot \left(b \cdot b\right) \]

                          if 1.678151993572926e37 < a

                          1. Initial program 79.0%

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

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

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

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

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

                            Alternative 6: 75.3% accurate, 2.4× speedup?

                            \[\begin{array}{l} \mathbf{if}\;\left|a\right| \leq 1.678151993572926 \cdot 10^{+37}:\\ \;\;\;\;\frac{1}{\frac{1}{b \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;{\left(0.005555555555555556 \cdot \left(\left|a\right| \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {b}^{2}\\ \end{array} \]
                            (FPCore (a b angle)
                              :precision binary64
                              :pre TRUE
                              (if (<= (fabs a) 1.678151993572926e+37)
                              (/ 1.0 (/ 1.0 (* b b)))
                              (+
                               (pow (* 0.005555555555555556 (* (fabs a) (* angle PI))) 2.0)
                               (pow b 2.0))))
                            double code(double a, double b, double angle) {
                            	double tmp;
                            	if (fabs(a) <= 1.678151993572926e+37) {
                            		tmp = 1.0 / (1.0 / (b * b));
                            	} else {
                            		tmp = pow((0.005555555555555556 * (fabs(a) * (angle * ((double) M_PI)))), 2.0) + pow(b, 2.0);
                            	}
                            	return tmp;
                            }
                            
                            public static double code(double a, double b, double angle) {
                            	double tmp;
                            	if (Math.abs(a) <= 1.678151993572926e+37) {
                            		tmp = 1.0 / (1.0 / (b * b));
                            	} else {
                            		tmp = Math.pow((0.005555555555555556 * (Math.abs(a) * (angle * Math.PI))), 2.0) + Math.pow(b, 2.0);
                            	}
                            	return tmp;
                            }
                            
                            def code(a, b, angle):
                            	tmp = 0
                            	if math.fabs(a) <= 1.678151993572926e+37:
                            		tmp = 1.0 / (1.0 / (b * b))
                            	else:
                            		tmp = math.pow((0.005555555555555556 * (math.fabs(a) * (angle * math.pi))), 2.0) + math.pow(b, 2.0)
                            	return tmp
                            
                            function code(a, b, angle)
                            	tmp = 0.0
                            	if (abs(a) <= 1.678151993572926e+37)
                            		tmp = Float64(1.0 / Float64(1.0 / Float64(b * b)));
                            	else
                            		tmp = Float64((Float64(0.005555555555555556 * Float64(abs(a) * Float64(angle * pi))) ^ 2.0) + (b ^ 2.0));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(a, b, angle)
                            	tmp = 0.0;
                            	if (abs(a) <= 1.678151993572926e+37)
                            		tmp = 1.0 / (1.0 / (b * b));
                            	else
                            		tmp = ((0.005555555555555556 * (abs(a) * (angle * pi))) ^ 2.0) + (b ^ 2.0);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[a_, b_, angle_] := If[LessEqual[N[Abs[a], $MachinePrecision], 1.678151993572926e+37], N[(1.0 / N[(1.0 / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(0.005555555555555556 * N[(N[Abs[a], $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]]
                            
                            f(a, b, angle):
                            	a in [-inf, +inf],
                            	b in [-inf, +inf],
                            	angle in [-inf, +inf]
                            code: THEORY
                            BEGIN
                            f(a, b, angle: real): real =
                            	LET tmp = IF ((abs(a)) <= (16781519935729260116091134213040898048)) THEN ((1) / ((1) / (b * b))) ELSE ((((5555555555555555767577313730498644872568547725677490234375e-60) * ((abs(a)) * (angle * (4 * atan(1))))) ^ (2)) + (b ^ (2))) ENDIF IN
                            	tmp
                            END code
                            \begin{array}{l}
                            \mathbf{if}\;\left|a\right| \leq 1.678151993572926 \cdot 10^{+37}:\\
                            \;\;\;\;\frac{1}{\frac{1}{b \cdot b}}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;{\left(0.005555555555555556 \cdot \left(\left|a\right| \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {b}^{2}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if a < 1.678151993572926e37

                              1. Initial program 79.0%

                                \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
                              2. Applied rewrites66.6%

                                \[\leadsto \frac{1}{{\left(\mathsf{fma}\left(\left(0.5 - 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot a, a, \left(\left(0.5 + 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot b\right) \cdot b\right)\right)}^{-1}} \]
                              3. Taylor expanded in angle around 0

                                \[\leadsto \frac{1}{\frac{1}{{b}^{2}}} \]
                              4. Step-by-step derivation
                                1. Applied rewrites56.4%

                                  \[\leadsto \frac{1}{\frac{1}{{b}^{2}}} \]
                                2. Applied rewrites56.4%

                                  \[\leadsto \frac{1}{\frac{1}{b \cdot b}} \]

                                if 1.678151993572926e37 < a

                                1. Initial program 79.0%

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

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

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

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

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

                                  Alternative 7: 57.8% accurate, 0.8× 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 5 \cdot 10^{+297}:\\ \;\;\;\;\frac{1}{\frac{1}{b \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{\sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)}}}\\ \end{array} \]
                                  (FPCore (a b angle)
                                    :precision binary64
                                    :pre TRUE
                                    (let* ((t_0 (* (/ angle 180.0) PI)))
                                    (if (<=
                                         (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))
                                         5e+297)
                                      (/ 1.0 (/ 1.0 (* b b)))
                                      (/ 1.0 (/ 1.0 (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)) <= 5e+297) {
                                  		tmp = 1.0 / (1.0 / (b * b));
                                  	} else {
                                  		tmp = 1.0 / (1.0 / 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)) <= 5e+297) {
                                  		tmp = 1.0 / (1.0 / (b * b));
                                  	} else {
                                  		tmp = 1.0 / (1.0 / 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)) <= 5e+297:
                                  		tmp = 1.0 / (1.0 / (b * b))
                                  	else:
                                  		tmp = 1.0 / (1.0 / 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)) <= 5e+297)
                                  		tmp = Float64(1.0 / Float64(1.0 / Float64(b * b)));
                                  	else
                                  		tmp = Float64(1.0 / Float64(1.0 / 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)) <= 5e+297)
                                  		tmp = 1.0 / (1.0 / (b * b));
                                  	else
                                  		tmp = 1.0 / (1.0 / 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], 5e+297], N[(1.0 / N[(1.0 / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[Sqrt[N[(N[(b * b), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                  
                                  f(a, b, angle):
                                  	a in [-inf, +inf],
                                  	b in [-inf, +inf],
                                  	angle in [-inf, +inf]
                                  code: THEORY
                                  BEGIN
                                  f(a, b, angle: real): real =
                                  	LET t_0 = ((angle / (180)) * (4 * atan(1))) IN
                                  		LET tmp = IF ((((a * (sin(t_0))) ^ (2)) + ((b * (cos(t_0))) ^ (2))) <= (4999999999999999797831017376714894119127812233696870733560457558998243835015834942700401512775872587353423939115559831572611431741498074611166071691150501229607379410134558461510763529142729843207341692956811227775656913210014077504201792814563184923802875085144633272926482892941009176900625498112)) THEN ((1) / ((1) / (b * b))) ELSE ((1) / ((1) / (sqrt(((b * b) * (b * b)))))) ENDIF IN
                                  	tmp
                                  END code
                                  \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 5 \cdot 10^{+297}:\\
                                  \;\;\;\;\frac{1}{\frac{1}{b \cdot b}}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{1}{\frac{1}{\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))) < 4.9999999999999998e297

                                    1. Initial program 79.0%

                                      \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
                                    2. Applied rewrites66.6%

                                      \[\leadsto \frac{1}{{\left(\mathsf{fma}\left(\left(0.5 - 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot a, a, \left(\left(0.5 + 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot b\right) \cdot b\right)\right)}^{-1}} \]
                                    3. Taylor expanded in angle around 0

                                      \[\leadsto \frac{1}{\frac{1}{{b}^{2}}} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites56.4%

                                        \[\leadsto \frac{1}{\frac{1}{{b}^{2}}} \]
                                      2. Applied rewrites56.4%

                                        \[\leadsto \frac{1}{\frac{1}{b \cdot b}} \]

                                      if 4.9999999999999998e297 < (+.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.0%

                                        \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
                                      2. Applied rewrites66.6%

                                        \[\leadsto \frac{1}{{\left(\mathsf{fma}\left(\left(0.5 - 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot a, a, \left(\left(0.5 + 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot b\right) \cdot b\right)\right)}^{-1}} \]
                                      3. Taylor expanded in angle around 0

                                        \[\leadsto \frac{1}{\frac{1}{{b}^{2}}} \]
                                      4. Step-by-step derivation
                                        1. Applied rewrites56.4%

                                          \[\leadsto \frac{1}{\frac{1}{{b}^{2}}} \]
                                        2. Applied rewrites56.4%

                                          \[\leadsto \frac{1}{\frac{1}{b \cdot b}} \]
                                        3. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \frac{1}{\frac{1}{\sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)}}} \]
                                          2. fabs-sqrN/A

                                            \[\leadsto \frac{1}{\frac{1}{\sqrt{\left|b \cdot b\right| \cdot \left|b \cdot b\right|}}} \]
                                          3. pow2N/A

                                            \[\leadsto \frac{1}{\frac{1}{\sqrt{\left|{b}^{2}\right| \cdot \left|{b}^{2}\right|}}} \]
                                          4. lift-pow.f64N/A

                                            \[\leadsto \frac{1}{\frac{1}{\sqrt{\left|{b}^{2}\right| \cdot \left|{b}^{2}\right|}}} \]
                                          5. rem-sqrt-square-revN/A

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

                                            \[\leadsto \frac{1}{\frac{1}{\sqrt{\sqrt{{b}^{2} \cdot {b}^{2}} \cdot \sqrt{{b}^{2} \cdot {b}^{2}}}}} \]
                                          7. lower-*.f6448.8%

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

                                            \[\leadsto \frac{1}{\frac{1}{\sqrt{\sqrt{{b}^{2} \cdot {b}^{2}} \cdot \sqrt{{b}^{2} \cdot {b}^{2}}}}} \]
                                          9. pow2N/A

                                            \[\leadsto \frac{1}{\frac{1}{\sqrt{\sqrt{\left(b \cdot b\right) \cdot {b}^{2}} \cdot \sqrt{\left(b \cdot b\right) \cdot {b}^{2}}}}} \]
                                          10. lift-*.f6448.8%

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

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

                                            \[\leadsto \frac{1}{\frac{1}{\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)}}}} \]
                                          13. lift-*.f6448.8%

                                            \[\leadsto \frac{1}{\frac{1}{\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)}}}} \]
                                        4. Applied rewrites48.8%

                                          \[\leadsto \frac{1}{\frac{1}{\sqrt{\left(b \cdot b\right) \cdot \left(b \cdot b\right)}}} \]
                                      5. Recombined 2 regimes into one program.
                                      6. Add Preprocessing

                                      Alternative 8: 56.4% accurate, 10.7× speedup?

                                      \[\frac{1}{\frac{1}{b \cdot b}} \]
                                      (FPCore (a b angle)
                                        :precision binary64
                                        :pre TRUE
                                        (/ 1.0 (/ 1.0 (* b b))))
                                      double code(double a, double b, double angle) {
                                      	return 1.0 / (1.0 / (b * b));
                                      }
                                      
                                      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 = 1.0d0 / (1.0d0 / (b * b))
                                      end function
                                      
                                      public static double code(double a, double b, double angle) {
                                      	return 1.0 / (1.0 / (b * b));
                                      }
                                      
                                      def code(a, b, angle):
                                      	return 1.0 / (1.0 / (b * b))
                                      
                                      function code(a, b, angle)
                                      	return Float64(1.0 / Float64(1.0 / Float64(b * b)))
                                      end
                                      
                                      function tmp = code(a, b, angle)
                                      	tmp = 1.0 / (1.0 / (b * b));
                                      end
                                      
                                      code[a_, b_, angle_] := N[(1.0 / N[(1.0 / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                      
                                      f(a, b, angle):
                                      	a in [-inf, +inf],
                                      	b in [-inf, +inf],
                                      	angle in [-inf, +inf]
                                      code: THEORY
                                      BEGIN
                                      f(a, b, angle: real): real =
                                      	(1) / ((1) / (b * b))
                                      END code
                                      \frac{1}{\frac{1}{b \cdot b}}
                                      
                                      Derivation
                                      1. Initial program 79.0%

                                        \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
                                      2. Applied rewrites66.6%

                                        \[\leadsto \frac{1}{{\left(\mathsf{fma}\left(\left(0.5 - 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot a, a, \left(\left(0.5 + 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot b\right) \cdot b\right)\right)}^{-1}} \]
                                      3. Taylor expanded in angle around 0

                                        \[\leadsto \frac{1}{\frac{1}{{b}^{2}}} \]
                                      4. Step-by-step derivation
                                        1. Applied rewrites56.4%

                                          \[\leadsto \frac{1}{\frac{1}{{b}^{2}}} \]
                                        2. Applied rewrites56.4%

                                          \[\leadsto \frac{1}{\frac{1}{b \cdot b}} \]
                                        3. Add Preprocessing

                                        Reproduce

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