ab-angle->ABCF C

Percentage Accurate: 79.6% → 79.5%
Time: 14.5s
Alternatives: 14
Speedup: 1.0×

Specification

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 79.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}

Alternative 1: 79.5% accurate, 1.0× speedup?

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

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

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

      \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. metadata-eval80.0%

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

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

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

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

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

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

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

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

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

    Alternative 2: 79.6% accurate, 1.0× speedup?

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

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

        \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. metadata-eval80.0%

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

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

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

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

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

      Alternative 3: 79.6% accurate, 1.0× speedup?

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

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

          \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. metadata-eval80.0%

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

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

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

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

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

        Alternative 4: 79.6% accurate, 1.0× speedup?

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

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

            \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
          2. Add Preprocessing
          3. Taylor expanded in a around 0 70.7%

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

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

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

              \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \]
            4. swap-sqr70.4%

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

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

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

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

              \[\leadsto \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) + \color{blue}{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
          5. Simplified79.5%

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

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

          Alternative 5: 62.3% accurate, 1.3× speedup?

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

            1. Initial program 78.1%

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

                \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
              2. Add Preprocessing
              3. Taylor expanded in a around inf 58.8%

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

              if 1.45e128 < b

              1. Initial program 88.0%

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

                  \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. metadata-eval88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto {\left(a \cdot \cos \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot 0.005555555555555556\right)\right)}\right)\right)}^{2} \]
                9. Taylor expanded in a around 0 60.7%

                  \[\leadsto \color{blue}{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}} \]
                10. Step-by-step derivation
                  1. unpow260.7%

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

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

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

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

                    \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
                  6. swap-sqr72.7%

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

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

                    \[\leadsto {\left(b \cdot \sin \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}^{2} \]
                11. Simplified72.7%

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

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

              Alternative 6: 79.5% accurate, 1.3× speedup?

              \[\begin{array}{l} \\ {\left(b \cdot \sin \left(\pi \cdot \frac{1}{\frac{180}{angle}}\right)\right)}^{2} + {a}^{2} \end{array} \]
              (FPCore (a b angle)
               :precision binary64
               (+ (pow (* b (sin (* PI (/ 1.0 (/ 180.0 angle))))) 2.0) (pow a 2.0)))
              double code(double a, double b, double angle) {
              	return pow((b * sin((((double) M_PI) * (1.0 / (180.0 / angle))))), 2.0) + pow(a, 2.0);
              }
              
              public static double code(double a, double b, double angle) {
              	return Math.pow((b * Math.sin((Math.PI * (1.0 / (180.0 / angle))))), 2.0) + Math.pow(a, 2.0);
              }
              
              def code(a, b, angle):
              	return math.pow((b * math.sin((math.pi * (1.0 / (180.0 / angle))))), 2.0) + math.pow(a, 2.0)
              
              function code(a, b, angle)
              	return Float64((Float64(b * sin(Float64(pi * Float64(1.0 / Float64(180.0 / angle))))) ^ 2.0) + (a ^ 2.0))
              end
              
              function tmp = code(a, b, angle)
              	tmp = ((b * sin((pi * (1.0 / (180.0 / angle))))) ^ 2.0) + (a ^ 2.0);
              end
              
              code[a_, b_, angle_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(1.0 / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              {\left(b \cdot \sin \left(\pi \cdot \frac{1}{\frac{180}{angle}}\right)\right)}^{2} + {a}^{2}
              \end{array}
              
              Derivation
              1. Initial program 80.0%

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

                  \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. metadata-eval80.0%

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

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

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

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

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

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

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

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

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

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

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

                Alternative 7: 79.6% accurate, 1.3× speedup?

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

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

                    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                  2. Add Preprocessing
                  3. Taylor expanded in angle around 0 79.3%

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

                  Alternative 8: 62.4% accurate, 2.0× speedup?

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

                    1. Initial program 78.1%

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

                        \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. metadata-eval78.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto {\left(a \cdot \cos \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}^{2} \]
                      11. Simplified58.8%

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

                      if 1.5999999999999999e126 < b

                      1. Initial program 88.0%

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

                          \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. metadata-eval88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto {\left(a \cdot \cos \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot 0.005555555555555556\right)\right)}\right)\right)}^{2} \]
                        9. Taylor expanded in a around 0 60.7%

                          \[\leadsto \color{blue}{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}} \]
                        10. Step-by-step derivation
                          1. unpow260.7%

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

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

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

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

                            \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
                          6. swap-sqr72.7%

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

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

                            \[\leadsto {\left(b \cdot \sin \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}^{2} \]
                        11. Simplified72.7%

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

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

                      Alternative 9: 62.4% accurate, 2.0× speedup?

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

                        1. Initial program 78.1%

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

                            \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. metadata-eval78.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto {\left(a \cdot \cos \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}^{2} \]
                          11. Simplified58.8%

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

                          if 5.8000000000000001e128 < b

                          1. Initial program 88.0%

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

                              \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                            2. Add Preprocessing
                            3. Taylor expanded in a around 0 60.7%

                              \[\leadsto \color{blue}{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}} \]
                            4. Step-by-step derivation
                              1. unpow260.7%

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

                                \[\leadsto \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)}^{2} \]
                              3. unpow260.7%

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

                                \[\leadsto \color{blue}{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
                              5. unpow272.4%

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

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

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

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

                          Alternative 10: 57.3% accurate, 2.0× speedup?

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

                            1. Initial program 78.7%

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

                                \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. metadata-eval78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
                                6. swap-sqr55.5%

                                  \[\leadsto \color{blue}{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
                                7. unpow255.5%

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

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

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

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

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

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

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

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

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

                              if 4.8000000000000002e222 < b

                              1. Initial program 94.9%

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

                                  \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                                2. Add Preprocessing
                                3. Taylor expanded in angle around 0 51.9%

                                  \[\leadsto \color{blue}{{a}^{2}} \]
                                4. Step-by-step derivation
                                  1. add-sqr-sqrt51.9%

                                    \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
                                  2. sqrt-unprod61.0%

                                    \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
                                  3. pow-prod-up61.0%

                                    \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
                                  4. metadata-eval61.0%

                                    \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
                                5. Applied egg-rr61.0%

                                  \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
                                6. Step-by-step derivation
                                  1. add-cbrt-cube61.0%

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

                                    \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
                                  3. add-sqr-sqrt61.0%

                                    \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
                                  4. sqrt-pow161.0%

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

                                    \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
                                  6. pow-prod-up61.0%

                                    \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
                                  7. metadata-eval61.0%

                                    \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
                                7. Applied egg-rr61.0%

                                  \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
                              3. Recombined 2 regimes into one program.
                              4. Final simplification55.9%

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

                              Alternative 11: 57.4% accurate, 2.0× speedup?

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

                                1. Initial program 78.7%

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

                                    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in a around inf 55.5%

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

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

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

                                      \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \]
                                    4. swap-sqr55.1%

                                      \[\leadsto \color{blue}{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
                                    5. unpow255.1%

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

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

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

                                  if 9.50000000000000084e220 < b

                                  1. Initial program 94.9%

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

                                      \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in angle around 0 51.9%

                                      \[\leadsto \color{blue}{{a}^{2}} \]
                                    4. Step-by-step derivation
                                      1. add-sqr-sqrt51.9%

                                        \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
                                      2. sqrt-unprod61.0%

                                        \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
                                      3. pow-prod-up61.0%

                                        \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
                                      4. metadata-eval61.0%

                                        \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
                                    5. Applied egg-rr61.0%

                                      \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
                                    6. Step-by-step derivation
                                      1. add-cbrt-cube61.0%

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

                                        \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
                                      3. add-sqr-sqrt61.0%

                                        \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
                                      4. sqrt-pow161.0%

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

                                        \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
                                      6. pow-prod-up61.0%

                                        \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
                                      7. metadata-eval61.0%

                                        \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
                                    7. Applied egg-rr61.0%

                                      \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
                                  3. Recombined 2 regimes into one program.
                                  4. Final simplification55.6%

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

                                  Alternative 12: 57.5% accurate, 2.0× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.9 \cdot 10^{+226}:\\ \;\;\;\;a \cdot a\\ \mathbf{else}:\\ \;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\ \end{array} \end{array} \]
                                  (FPCore (a b angle)
                                   :precision binary64
                                   (if (<= b 2.9e+226) (* a a) (pow (pow a 6.0) 0.3333333333333333)))
                                  double code(double a, double b, double angle) {
                                  	double tmp;
                                  	if (b <= 2.9e+226) {
                                  		tmp = a * a;
                                  	} else {
                                  		tmp = pow(pow(a, 6.0), 0.3333333333333333);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  real(8) function code(a, b, angle)
                                      real(8), intent (in) :: a
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: angle
                                      real(8) :: tmp
                                      if (b <= 2.9d+226) then
                                          tmp = a * a
                                      else
                                          tmp = (a ** 6.0d0) ** 0.3333333333333333d0
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double a, double b, double angle) {
                                  	double tmp;
                                  	if (b <= 2.9e+226) {
                                  		tmp = a * a;
                                  	} else {
                                  		tmp = Math.pow(Math.pow(a, 6.0), 0.3333333333333333);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(a, b, angle):
                                  	tmp = 0
                                  	if b <= 2.9e+226:
                                  		tmp = a * a
                                  	else:
                                  		tmp = math.pow(math.pow(a, 6.0), 0.3333333333333333)
                                  	return tmp
                                  
                                  function code(a, b, angle)
                                  	tmp = 0.0
                                  	if (b <= 2.9e+226)
                                  		tmp = Float64(a * a);
                                  	else
                                  		tmp = (a ^ 6.0) ^ 0.3333333333333333;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(a, b, angle)
                                  	tmp = 0.0;
                                  	if (b <= 2.9e+226)
                                  		tmp = a * a;
                                  	else
                                  		tmp = (a ^ 6.0) ^ 0.3333333333333333;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[a_, b_, angle_] := If[LessEqual[b, 2.9e+226], N[(a * a), $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;b \leq 2.9 \cdot 10^{+226}:\\
                                  \;\;\;\;a \cdot a\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if b < 2.89999999999999974e226

                                    1. Initial program 78.8%

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

                                        \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in angle around 0 54.9%

                                        \[\leadsto \color{blue}{{a}^{2}} \]
                                      4. Step-by-step derivation
                                        1. unpow254.9%

                                          \[\leadsto \color{blue}{a \cdot a} \]
                                      5. Applied egg-rr54.9%

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

                                      if 2.89999999999999974e226 < b

                                      1. Initial program 94.6%

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

                                          \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in angle around 0 54.4%

                                          \[\leadsto \color{blue}{{a}^{2}} \]
                                        4. Step-by-step derivation
                                          1. add-sqr-sqrt54.4%

                                            \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
                                          2. sqrt-unprod64.1%

                                            \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
                                          3. pow-prod-up64.1%

                                            \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
                                          4. metadata-eval64.1%

                                            \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
                                        5. Applied egg-rr64.1%

                                          \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
                                        6. Step-by-step derivation
                                          1. add-cbrt-cube64.1%

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

                                            \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
                                          3. add-sqr-sqrt64.1%

                                            \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
                                          4. sqrt-pow164.1%

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

                                            \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
                                          6. pow-prod-up64.1%

                                            \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
                                          7. metadata-eval64.1%

                                            \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
                                        7. Applied egg-rr64.1%

                                          \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
                                      3. Recombined 2 regimes into one program.
                                      4. Add Preprocessing

                                      Alternative 13: 57.5% accurate, 2.0× speedup?

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

                                        1. Initial program 78.7%

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

                                            \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in angle around 0 55.1%

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

                                              \[\leadsto \color{blue}{a \cdot a} \]
                                          5. Applied egg-rr55.1%

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

                                          if 1.65000000000000011e220 < b

                                          1. Initial program 94.9%

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

                                              \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in angle around 0 51.9%

                                              \[\leadsto \color{blue}{{a}^{2}} \]
                                            4. Step-by-step derivation
                                              1. add-sqr-sqrt51.9%

                                                \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
                                              2. sqrt-unprod61.0%

                                                \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
                                              3. pow-prod-up61.0%

                                                \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
                                              4. metadata-eval61.0%

                                                \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
                                            5. Applied egg-rr61.0%

                                              \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
                                            6. Step-by-step derivation
                                              1. add-cbrt-cube61.0%

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

                                                \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
                                              3. add-sqr-sqrt61.0%

                                                \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
                                              4. sqrt-pow161.0%

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

                                                \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
                                              6. pow-prod-up61.0%

                                                \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
                                              7. metadata-eval61.0%

                                                \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
                                            7. Applied egg-rr61.0%

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

                                                \[\leadsto \color{blue}{\sqrt[3]{{a}^{6}}} \]
                                            9. Simplified61.0%

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

                                          Alternative 14: 57.1% accurate, 139.0× speedup?

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

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

                                              \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in angle around 0 54.8%

                                              \[\leadsto \color{blue}{{a}^{2}} \]
                                            4. Step-by-step derivation
                                              1. unpow254.8%

                                                \[\leadsto \color{blue}{a \cdot a} \]
                                            5. Applied egg-rr54.8%

                                              \[\leadsto \color{blue}{a \cdot a} \]
                                            6. Add Preprocessing

                                            Reproduce

                                            ?
                                            herbie shell --seed 2024146 
                                            (FPCore (a b angle)
                                              :name "ab-angle->ABCF C"
                                              :precision binary64
                                              (+ (pow (* a (cos (* PI (/ angle 180.0)))) 2.0) (pow (* b (sin (* PI (/ angle 180.0)))) 2.0)))