Linear.Quaternion:$csin from linear-1.19.1.3

Percentage Accurate: 100.0% → 100.0%
Time: 11.0s
Alternatives: 18
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \cos x \cdot \frac{\sinh y}{y} \end{array} \]
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
	return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
	return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y):
	return math.cos(x) * (math.sinh(y) / y)
function code(x, y)
	return Float64(cos(x) * Float64(sinh(y) / y))
end
function tmp = code(x, y)
	tmp = cos(x) * (sinh(y) / y);
end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\cos x \cdot \frac{\sinh y}{y}
\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 18 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: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \cos x \cdot \frac{\sinh y}{y} \end{array} \]
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
	return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
	return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y):
	return math.cos(x) * (math.sinh(y) / y)
function code(x, y)
	return Float64(cos(x) * Float64(sinh(y) / y))
end
function tmp = code(x, y)
	tmp = cos(x) * (sinh(y) / y);
end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}

Alternative 1: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \cos x \cdot \frac{\sinh y}{y} \end{array} \]
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
	return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
	return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y):
	return math.cos(x) * (math.sinh(y) / y)
function code(x, y)
	return Float64(cos(x) * Float64(sinh(y) / y))
end
function tmp = code(x, y)
	tmp = cos(x) * (sinh(y) / y);
end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
Derivation
  1. Initial program 100.0%

    \[\cos x \cdot \frac{\sinh y}{y} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 86.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sinh y}{y}\\ \mathbf{if}\;t\_0 \leq 1.02:\\ \;\;\;\;\cos x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (sinh y) y))) (if (<= t_0 1.02) (cos x) t_0)))
double code(double x, double y) {
	double t_0 = sinh(y) / y;
	double tmp;
	if (t_0 <= 1.02) {
		tmp = cos(x);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sinh(y) / y
    if (t_0 <= 1.02d0) then
        tmp = cos(x)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sinh(y) / y;
	double tmp;
	if (t_0 <= 1.02) {
		tmp = Math.cos(x);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sinh(y) / y
	tmp = 0
	if t_0 <= 1.02:
		tmp = math.cos(x)
	else:
		tmp = t_0
	return tmp
function code(x, y)
	t_0 = Float64(sinh(y) / y)
	tmp = 0.0
	if (t_0 <= 1.02)
		tmp = cos(x);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sinh(y) / y;
	tmp = 0.0;
	if (t_0 <= 1.02)
		tmp = cos(x);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$0, 1.02], N[Cos[x], $MachinePrecision], t$95$0]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq 1.02:\\
\;\;\;\;\cos x\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (sinh.f64 y) y) < 1.02

    1. Initial program 100.0%

      \[\cos x \cdot \frac{\sinh y}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\cos x} \]
    4. Step-by-step derivation
      1. cos-lowering-cos.f6499.3%

        \[\leadsto \mathsf{cos.f64}\left(x\right) \]
    5. Simplified99.3%

      \[\leadsto \color{blue}{\cos x} \]

    if 1.02 < (/.f64 (sinh.f64 y) y)

    1. Initial program 100.0%

      \[\cos x \cdot \frac{\sinh y}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
    4. Step-by-step derivation
      1. Simplified75.0%

        \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
      2. Step-by-step derivation
        1. *-lft-identityN/A

          \[\leadsto \frac{\sinh y}{\color{blue}{y}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\sinh y, \color{blue}{y}\right) \]
        3. sinh-lowering-sinh.f6475.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right) \]
      3. Applied egg-rr75.0%

        \[\leadsto \color{blue}{\frac{\sinh y}{y}} \]
    5. Recombined 2 regimes into one program.
    6. Add Preprocessing

    Alternative 3: 84.4% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\ \mathbf{if}\;y \leq 0.016:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\frac{\sinh y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (let* ((t_0 (* (cos x) (+ 1.0 (* y (* y 0.16666666666666666))))))
       (if (<= y 0.016)
         t_0
         (if (<= y 2e+152) (* (/ (sinh y) y) (+ 1.0 (* (* x x) -0.5))) t_0))))
    double code(double x, double y) {
    	double t_0 = cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
    	double tmp;
    	if (y <= 0.016) {
    		tmp = t_0;
    	} else if (y <= 2e+152) {
    		tmp = (sinh(y) / y) * (1.0 + ((x * x) * -0.5));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: t_0
        real(8) :: tmp
        t_0 = cos(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
        if (y <= 0.016d0) then
            tmp = t_0
        else if (y <= 2d+152) then
            tmp = (sinh(y) / y) * (1.0d0 + ((x * x) * (-0.5d0)))
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double t_0 = Math.cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
    	double tmp;
    	if (y <= 0.016) {
    		tmp = t_0;
    	} else if (y <= 2e+152) {
    		tmp = (Math.sinh(y) / y) * (1.0 + ((x * x) * -0.5));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y):
    	t_0 = math.cos(x) * (1.0 + (y * (y * 0.16666666666666666)))
    	tmp = 0
    	if y <= 0.016:
    		tmp = t_0
    	elif y <= 2e+152:
    		tmp = (math.sinh(y) / y) * (1.0 + ((x * x) * -0.5))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y)
    	t_0 = Float64(cos(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666))))
    	tmp = 0.0
    	if (y <= 0.016)
    		tmp = t_0;
    	elseif (y <= 2e+152)
    		tmp = Float64(Float64(sinh(y) / y) * Float64(1.0 + Float64(Float64(x * x) * -0.5)));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	t_0 = cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
    	tmp = 0.0;
    	if (y <= 0.016)
    		tmp = t_0;
    	elseif (y <= 2e+152)
    		tmp = (sinh(y) / y) * (1.0 + ((x * x) * -0.5));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := Block[{t$95$0 = N[(N[Cos[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.016], t$95$0, If[LessEqual[y, 2e+152], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
    \mathbf{if}\;y \leq 0.016:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;y \leq 2 \cdot 10^{+152}:\\
    \;\;\;\;\frac{\sinh y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < 0.016 or 2.0000000000000001e152 < y

      1. Initial program 100.0%

        \[\cos x \cdot \frac{\sinh y}{y} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{\cos x + \frac{1}{6} \cdot \left({y}^{2} \cdot \cos x\right)} \]
      4. Step-by-step derivation
        1. *-lft-identityN/A

          \[\leadsto 1 \cdot \cos x + \color{blue}{\frac{1}{6}} \cdot \left({y}^{2} \cdot \cos x\right) \]
        2. associate-*r*N/A

          \[\leadsto 1 \cdot \cos x + \left(\frac{1}{6} \cdot {y}^{2}\right) \cdot \color{blue}{\cos x} \]
        3. distribute-rgt-inN/A

          \[\leadsto \cos x \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\cos x, \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)}\right) \]
        5. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \left(\color{blue}{1} + \frac{1}{6} \cdot {y}^{2}\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \left(\frac{1}{6} \cdot \left(y \cdot \color{blue}{y}\right)\right)\right)\right) \]
        8. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \left(\left(\frac{1}{6} \cdot y\right) \cdot \color{blue}{y}\right)\right)\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \left(y \cdot \color{blue}{\left(\frac{1}{6} \cdot y\right)}\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{1}{6} \cdot y\right)}\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(y \cdot \color{blue}{\frac{1}{6}}\right)\right)\right)\right) \]
        12. *-lowering-*.f6485.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \color{blue}{\frac{1}{6}}\right)\right)\right)\right) \]
      5. Simplified85.4%

        \[\leadsto \color{blue}{\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)} \]

      if 0.016 < y < 2.0000000000000001e152

      1. Initial program 100.0%

        \[\cos x \cdot \frac{\sinh y}{y} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{-1}{2} \cdot {x}^{2}\right)}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{2} \cdot {x}^{2}\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{sinh.f64}\left(y\right)}, y\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({x}^{2} \cdot \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
        5. *-lowering-*.f6476.9%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
      5. Simplified76.9%

        \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot -0.5\right)} \cdot \frac{\sinh y}{y} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification84.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 0.016:\\ \;\;\;\;\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\frac{\sinh y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 84.6% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\ \mathbf{if}\;y \leq 0.135:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+154}:\\ \;\;\;\;\sinh y \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (let* ((t_0 (* (cos x) (+ 1.0 (* y (* y 0.16666666666666666))))))
       (if (<= y 0.135) t_0 (if (<= y 3.3e+154) (* (sinh y) (/ 1.0 y)) t_0))))
    double code(double x, double y) {
    	double t_0 = cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
    	double tmp;
    	if (y <= 0.135) {
    		tmp = t_0;
    	} else if (y <= 3.3e+154) {
    		tmp = sinh(y) * (1.0 / y);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: t_0
        real(8) :: tmp
        t_0 = cos(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
        if (y <= 0.135d0) then
            tmp = t_0
        else if (y <= 3.3d+154) then
            tmp = sinh(y) * (1.0d0 / y)
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double t_0 = Math.cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
    	double tmp;
    	if (y <= 0.135) {
    		tmp = t_0;
    	} else if (y <= 3.3e+154) {
    		tmp = Math.sinh(y) * (1.0 / y);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y):
    	t_0 = math.cos(x) * (1.0 + (y * (y * 0.16666666666666666)))
    	tmp = 0
    	if y <= 0.135:
    		tmp = t_0
    	elif y <= 3.3e+154:
    		tmp = math.sinh(y) * (1.0 / y)
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y)
    	t_0 = Float64(cos(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666))))
    	tmp = 0.0
    	if (y <= 0.135)
    		tmp = t_0;
    	elseif (y <= 3.3e+154)
    		tmp = Float64(sinh(y) * Float64(1.0 / y));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	t_0 = cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
    	tmp = 0.0;
    	if (y <= 0.135)
    		tmp = t_0;
    	elseif (y <= 3.3e+154)
    		tmp = sinh(y) * (1.0 / y);
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := Block[{t$95$0 = N[(N[Cos[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.135], t$95$0, If[LessEqual[y, 3.3e+154], N[(N[Sinh[y], $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
    \mathbf{if}\;y \leq 0.135:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;y \leq 3.3 \cdot 10^{+154}:\\
    \;\;\;\;\sinh y \cdot \frac{1}{y}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < 0.13500000000000001 or 3.3e154 < y

      1. Initial program 100.0%

        \[\cos x \cdot \frac{\sinh y}{y} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{\cos x + \frac{1}{6} \cdot \left({y}^{2} \cdot \cos x\right)} \]
      4. Step-by-step derivation
        1. *-lft-identityN/A

          \[\leadsto 1 \cdot \cos x + \color{blue}{\frac{1}{6}} \cdot \left({y}^{2} \cdot \cos x\right) \]
        2. associate-*r*N/A

          \[\leadsto 1 \cdot \cos x + \left(\frac{1}{6} \cdot {y}^{2}\right) \cdot \color{blue}{\cos x} \]
        3. distribute-rgt-inN/A

          \[\leadsto \cos x \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\cos x, \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)}\right) \]
        5. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \left(\color{blue}{1} + \frac{1}{6} \cdot {y}^{2}\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \left(\frac{1}{6} \cdot \left(y \cdot \color{blue}{y}\right)\right)\right)\right) \]
        8. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \left(\left(\frac{1}{6} \cdot y\right) \cdot \color{blue}{y}\right)\right)\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \left(y \cdot \color{blue}{\left(\frac{1}{6} \cdot y\right)}\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{1}{6} \cdot y\right)}\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(y \cdot \color{blue}{\frac{1}{6}}\right)\right)\right)\right) \]
        12. *-lowering-*.f6485.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \color{blue}{\frac{1}{6}}\right)\right)\right)\right) \]
      5. Simplified85.4%

        \[\leadsto \color{blue}{\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)} \]

      if 0.13500000000000001 < y < 3.3e154

      1. Initial program 100.0%

        \[\cos x \cdot \frac{\sinh y}{y} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
      4. Step-by-step derivation
        1. Simplified73.1%

          \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
        2. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \frac{1 \cdot \sinh y}{\color{blue}{y}} \]
          2. associate-*l/N/A

            \[\leadsto \frac{1}{y} \cdot \color{blue}{\sinh y} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{y}\right), \color{blue}{\sinh y}\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \sinh \color{blue}{y}\right) \]
          5. sinh-lowering-sinh.f6473.1%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \mathsf{sinh.f64}\left(y\right)\right) \]
        3. Applied egg-rr73.1%

          \[\leadsto \color{blue}{\frac{1}{y} \cdot \sinh y} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification84.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 0.135:\\ \;\;\;\;\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+154}:\\ \;\;\;\;\sinh y \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 5: 68.3% accurate, 1.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 0.00048:\\ \;\;\;\;\cos x\\ \mathbf{else}:\\ \;\;\;\;\sinh y \cdot \frac{1}{y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= y 0.00048) (cos x) (* (sinh y) (/ 1.0 y))))
      double code(double x, double y) {
      	double tmp;
      	if (y <= 0.00048) {
      		tmp = cos(x);
      	} else {
      		tmp = sinh(y) * (1.0 / y);
      	}
      	return tmp;
      }
      
      real(8) function code(x, y)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: tmp
          if (y <= 0.00048d0) then
              tmp = cos(x)
          else
              tmp = sinh(y) * (1.0d0 / y)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if (y <= 0.00048) {
      		tmp = Math.cos(x);
      	} else {
      		tmp = Math.sinh(y) * (1.0 / y);
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if y <= 0.00048:
      		tmp = math.cos(x)
      	else:
      		tmp = math.sinh(y) * (1.0 / y)
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if (y <= 0.00048)
      		tmp = cos(x);
      	else
      		tmp = Float64(sinh(y) * Float64(1.0 / y));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if (y <= 0.00048)
      		tmp = cos(x);
      	else
      		tmp = sinh(y) * (1.0 / y);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[LessEqual[y, 0.00048], N[Cos[x], $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 0.00048:\\
      \;\;\;\;\cos x\\
      
      \mathbf{else}:\\
      \;\;\;\;\sinh y \cdot \frac{1}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 4.80000000000000012e-4

        1. Initial program 100.0%

          \[\cos x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\cos x} \]
        4. Step-by-step derivation
          1. cos-lowering-cos.f6468.3%

            \[\leadsto \mathsf{cos.f64}\left(x\right) \]
        5. Simplified68.3%

          \[\leadsto \color{blue}{\cos x} \]

        if 4.80000000000000012e-4 < y

        1. Initial program 100.0%

          \[\cos x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
        4. Step-by-step derivation
          1. Simplified72.7%

            \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
          2. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \frac{1 \cdot \sinh y}{\color{blue}{y}} \]
            2. associate-*l/N/A

              \[\leadsto \frac{1}{y} \cdot \color{blue}{\sinh y} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{y}\right), \color{blue}{\sinh y}\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \sinh \color{blue}{y}\right) \]
            5. sinh-lowering-sinh.f6472.7%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \mathsf{sinh.f64}\left(y\right)\right) \]
          3. Applied egg-rr72.7%

            \[\leadsto \color{blue}{\frac{1}{y} \cdot \sinh y} \]
        5. Recombined 2 regimes into one program.
        6. Final simplification69.3%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 0.00048:\\ \;\;\;\;\cos x\\ \mathbf{else}:\\ \;\;\;\;\sinh y \cdot \frac{1}{y}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 6: 66.3% accurate, 1.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\\ t_1 := \left(x \cdot x\right) \cdot -0.5\\ \mathbf{if}\;y \leq 0.00038:\\ \;\;\;\;\cos x\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+75}:\\ \;\;\;\;\frac{y \cdot \left(1 + \frac{\left(y \cdot y\right) \cdot \left(0.027777777777777776 - t\_0 \cdot t\_0\right)}{0.16666666666666666 - t\_0}\right)}{y}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+260}:\\ \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + t\_1\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + t\_1\\ \mathbf{else}:\\ \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \end{array} \end{array} \]
        (FPCore (x y)
         :precision binary64
         (let* ((t_0
                 (*
                  (* y y)
                  (+ 0.008333333333333333 (* y (* y 0.0001984126984126984)))))
                (t_1 (* (* x x) -0.5)))
           (if (<= y 0.00038)
             (cos x)
             (if (<= y 2e+75)
               (/
                (*
                 y
                 (+
                  1.0
                  (/
                   (* (* y y) (- 0.027777777777777776 (* t_0 t_0)))
                   (- 0.16666666666666666 t_0))))
                y)
               (if (<= y 2e+260)
                 (+
                  (+
                   1.0
                   (*
                    y
                    (*
                     y
                     (*
                      (+ 1.0 t_1)
                      (+
                       0.16666666666666666
                       (*
                        y
                        (*
                         y
                         (+
                          0.008333333333333333
                          (* (* y y) 0.0001984126984126984)))))))))
                  t_1)
                 (+ 1.0 (* 0.16666666666666666 (* y y))))))))
        double code(double x, double y) {
        	double t_0 = (y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)));
        	double t_1 = (x * x) * -0.5;
        	double tmp;
        	if (y <= 0.00038) {
        		tmp = cos(x);
        	} else if (y <= 2e+75) {
        		tmp = (y * (1.0 + (((y * y) * (0.027777777777777776 - (t_0 * t_0))) / (0.16666666666666666 - t_0)))) / y;
        	} else if (y <= 2e+260) {
        		tmp = (1.0 + (y * (y * ((1.0 + t_1) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_1;
        	} else {
        		tmp = 1.0 + (0.16666666666666666 * (y * y));
        	}
        	return tmp;
        }
        
        real(8) function code(x, y)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8) :: t_0
            real(8) :: t_1
            real(8) :: tmp
            t_0 = (y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0)))
            t_1 = (x * x) * (-0.5d0)
            if (y <= 0.00038d0) then
                tmp = cos(x)
            else if (y <= 2d+75) then
                tmp = (y * (1.0d0 + (((y * y) * (0.027777777777777776d0 - (t_0 * t_0))) / (0.16666666666666666d0 - t_0)))) / y
            else if (y <= 2d+260) then
                tmp = (1.0d0 + (y * (y * ((1.0d0 + t_1) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0))))))))) + t_1
            else
                tmp = 1.0d0 + (0.16666666666666666d0 * (y * y))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y) {
        	double t_0 = (y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)));
        	double t_1 = (x * x) * -0.5;
        	double tmp;
        	if (y <= 0.00038) {
        		tmp = Math.cos(x);
        	} else if (y <= 2e+75) {
        		tmp = (y * (1.0 + (((y * y) * (0.027777777777777776 - (t_0 * t_0))) / (0.16666666666666666 - t_0)))) / y;
        	} else if (y <= 2e+260) {
        		tmp = (1.0 + (y * (y * ((1.0 + t_1) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_1;
        	} else {
        		tmp = 1.0 + (0.16666666666666666 * (y * y));
        	}
        	return tmp;
        }
        
        def code(x, y):
        	t_0 = (y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))
        	t_1 = (x * x) * -0.5
        	tmp = 0
        	if y <= 0.00038:
        		tmp = math.cos(x)
        	elif y <= 2e+75:
        		tmp = (y * (1.0 + (((y * y) * (0.027777777777777776 - (t_0 * t_0))) / (0.16666666666666666 - t_0)))) / y
        	elif y <= 2e+260:
        		tmp = (1.0 + (y * (y * ((1.0 + t_1) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_1
        	else:
        		tmp = 1.0 + (0.16666666666666666 * (y * y))
        	return tmp
        
        function code(x, y)
        	t_0 = Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))
        	t_1 = Float64(Float64(x * x) * -0.5)
        	tmp = 0.0
        	if (y <= 0.00038)
        		tmp = cos(x);
        	elseif (y <= 2e+75)
        		tmp = Float64(Float64(y * Float64(1.0 + Float64(Float64(Float64(y * y) * Float64(0.027777777777777776 - Float64(t_0 * t_0))) / Float64(0.16666666666666666 - t_0)))) / y);
        	elseif (y <= 2e+260)
        		tmp = Float64(Float64(1.0 + Float64(y * Float64(y * Float64(Float64(1.0 + t_1) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984))))))))) + t_1);
        	else
        		tmp = Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y)
        	t_0 = (y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)));
        	t_1 = (x * x) * -0.5;
        	tmp = 0.0;
        	if (y <= 0.00038)
        		tmp = cos(x);
        	elseif (y <= 2e+75)
        		tmp = (y * (1.0 + (((y * y) * (0.027777777777777776 - (t_0 * t_0))) / (0.16666666666666666 - t_0)))) / y;
        	elseif (y <= 2e+260)
        		tmp = (1.0 + (y * (y * ((1.0 + t_1) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_1;
        	else
        		tmp = 1.0 + (0.16666666666666666 * (y * y));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_] := Block[{t$95$0 = N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[y, 0.00038], N[Cos[x], $MachinePrecision], If[LessEqual[y, 2e+75], N[(N[(y * N[(1.0 + N[(N[(N[(y * y), $MachinePrecision] * N[(0.027777777777777776 - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.16666666666666666 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2e+260], N[(N[(1.0 + N[(y * N[(y * N[(N[(1.0 + t$95$1), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\\
        t_1 := \left(x \cdot x\right) \cdot -0.5\\
        \mathbf{if}\;y \leq 0.00038:\\
        \;\;\;\;\cos x\\
        
        \mathbf{elif}\;y \leq 2 \cdot 10^{+75}:\\
        \;\;\;\;\frac{y \cdot \left(1 + \frac{\left(y \cdot y\right) \cdot \left(0.027777777777777776 - t\_0 \cdot t\_0\right)}{0.16666666666666666 - t\_0}\right)}{y}\\
        
        \mathbf{elif}\;y \leq 2 \cdot 10^{+260}:\\
        \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + t\_1\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if y < 3.8000000000000002e-4

          1. Initial program 100.0%

            \[\cos x \cdot \frac{\sinh y}{y} \]
          2. Add Preprocessing
          3. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\cos x} \]
          4. Step-by-step derivation
            1. cos-lowering-cos.f6468.3%

              \[\leadsto \mathsf{cos.f64}\left(x\right) \]
          5. Simplified68.3%

            \[\leadsto \color{blue}{\cos x} \]

          if 3.8000000000000002e-4 < y < 1.99999999999999985e75

          1. Initial program 100.0%

            \[\cos x \cdot \frac{\sinh y}{y} \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
          4. Step-by-step derivation
            1. Simplified83.3%

              \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
            2. Taylor expanded in y around 0

              \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left(y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)}, y\right)\right) \]
            3. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right), y\right)\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left({y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({y}^{2}\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
              6. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left({y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right), y\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(\left(y \cdot y\right) \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right), y\right)\right) \]
              8. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
              11. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left({y}^{2} \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({y}^{2}\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
              16. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
              17. *-lowering-*.f6420.7%

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
            4. Simplified20.7%

              \[\leadsto 1 \cdot \frac{\color{blue}{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)}}{y} \]
            5. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{6} + y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right) \cdot \left(y \cdot y\right)\right)\right)\right), y\right)\right) \]
              2. flip-+N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\frac{\frac{1}{6} \cdot \frac{1}{6} - \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right) \cdot \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)}{\frac{1}{6} - y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)} \cdot \left(y \cdot y\right)\right)\right)\right), y\right)\right) \]
              3. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\frac{\left(\frac{1}{6} \cdot \frac{1}{6} - \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right) \cdot \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right) \cdot \left(y \cdot y\right)}{\frac{1}{6} - y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)}\right)\right)\right), y\right)\right) \]
              4. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\frac{1}{6} \cdot \frac{1}{6} - \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right) \cdot \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right) \cdot \left(y \cdot y\right)\right), \left(\frac{1}{6} - y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right), y\right)\right) \]
            6. Applied egg-rr67.3%

              \[\leadsto 1 \cdot \frac{y \cdot \left(1 + \color{blue}{\frac{\left(0.027777777777777776 - \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right) \cdot \left(y \cdot y\right)}{0.16666666666666666 - \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)}}\right)}{y} \]

            if 1.99999999999999985e75 < y < 2.00000000000000013e260

            1. Initial program 100.0%

              \[\cos x \cdot \frac{\sinh y}{y} \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{-1}{2} \cdot {x}^{2}\right)}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
            4. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{2} \cdot {x}^{2}\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{sinh.f64}\left(y\right)}, y\right)\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({x}^{2} \cdot \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
              5. *-lowering-*.f6488.9%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
            5. Simplified88.9%

              \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot -0.5\right)} \cdot \frac{\sinh y}{y} \]
            6. Taylor expanded in y around 0

              \[\leadsto \color{blue}{1 + \left(\frac{-1}{2} \cdot {x}^{2} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right) + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right)\right) + \frac{1}{120} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right)\right)\right)\right)} \]
            7. Simplified88.9%

              \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot -0.5 + \left(1 + y \cdot \left(y \cdot \left(\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right)} \]

            if 2.00000000000000013e260 < y

            1. Initial program 100.0%

              \[\cos x \cdot \frac{\sinh y}{y} \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
            4. Step-by-step derivation
              1. Simplified85.7%

                \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
              2. Step-by-step derivation
                1. *-lft-identityN/A

                  \[\leadsto \frac{\sinh y}{\color{blue}{y}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\sinh y, \color{blue}{y}\right) \]
                3. sinh-lowering-sinh.f6485.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right) \]
              3. Applied egg-rr85.7%

                \[\leadsto \color{blue}{\frac{\sinh y}{y}} \]
              4. Taylor expanded in y around 0

                \[\leadsto \color{blue}{1 + \frac{1}{6} \cdot {y}^{2}} \]
              5. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({y}^{2}\right)}\right)\right) \]
                3. unpow2N/A

                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \left(y \cdot \color{blue}{y}\right)\right)\right) \]
                4. *-lowering-*.f6485.7%

                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right) \]
              6. Simplified85.7%

                \[\leadsto \color{blue}{1 + 0.16666666666666666 \cdot \left(y \cdot y\right)} \]
            5. Recombined 4 regimes into one program.
            6. Final simplification71.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 0.00038:\\ \;\;\;\;\cos x\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+75}:\\ \;\;\;\;\frac{y \cdot \left(1 + \frac{\left(y \cdot y\right) \cdot \left(0.027777777777777776 - \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)}{0.16666666666666666 - \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)}\right)}{y}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+260}:\\ \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + \left(x \cdot x\right) \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \end{array} \]
            7. Add Preprocessing

            Alternative 7: 46.4% accurate, 3.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\\ t_1 := \left(x \cdot x\right) \cdot -0.5\\ \mathbf{if}\;y \leq 6.6 \cdot 10^{+72}:\\ \;\;\;\;\frac{y \cdot \left(1 + \frac{\left(y \cdot y\right) \cdot \left(0.027777777777777776 - t\_0 \cdot t\_0\right)}{0.16666666666666666 - t\_0}\right)}{y}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+260}:\\ \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + t\_1\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + t\_1\\ \mathbf{else}:\\ \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \end{array} \end{array} \]
            (FPCore (x y)
             :precision binary64
             (let* ((t_0
                     (*
                      (* y y)
                      (+ 0.008333333333333333 (* y (* y 0.0001984126984126984)))))
                    (t_1 (* (* x x) -0.5)))
               (if (<= y 6.6e+72)
                 (/
                  (*
                   y
                   (+
                    1.0
                    (/
                     (* (* y y) (- 0.027777777777777776 (* t_0 t_0)))
                     (- 0.16666666666666666 t_0))))
                  y)
                 (if (<= y 2e+260)
                   (+
                    (+
                     1.0
                     (*
                      y
                      (*
                       y
                       (*
                        (+ 1.0 t_1)
                        (+
                         0.16666666666666666
                         (*
                          y
                          (*
                           y
                           (+
                            0.008333333333333333
                            (* (* y y) 0.0001984126984126984)))))))))
                    t_1)
                   (+ 1.0 (* 0.16666666666666666 (* y y)))))))
            double code(double x, double y) {
            	double t_0 = (y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)));
            	double t_1 = (x * x) * -0.5;
            	double tmp;
            	if (y <= 6.6e+72) {
            		tmp = (y * (1.0 + (((y * y) * (0.027777777777777776 - (t_0 * t_0))) / (0.16666666666666666 - t_0)))) / y;
            	} else if (y <= 2e+260) {
            		tmp = (1.0 + (y * (y * ((1.0 + t_1) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_1;
            	} else {
            		tmp = 1.0 + (0.16666666666666666 * (y * y));
            	}
            	return tmp;
            }
            
            real(8) function code(x, y)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8) :: t_0
                real(8) :: t_1
                real(8) :: tmp
                t_0 = (y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0)))
                t_1 = (x * x) * (-0.5d0)
                if (y <= 6.6d+72) then
                    tmp = (y * (1.0d0 + (((y * y) * (0.027777777777777776d0 - (t_0 * t_0))) / (0.16666666666666666d0 - t_0)))) / y
                else if (y <= 2d+260) then
                    tmp = (1.0d0 + (y * (y * ((1.0d0 + t_1) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0))))))))) + t_1
                else
                    tmp = 1.0d0 + (0.16666666666666666d0 * (y * y))
                end if
                code = tmp
            end function
            
            public static double code(double x, double y) {
            	double t_0 = (y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)));
            	double t_1 = (x * x) * -0.5;
            	double tmp;
            	if (y <= 6.6e+72) {
            		tmp = (y * (1.0 + (((y * y) * (0.027777777777777776 - (t_0 * t_0))) / (0.16666666666666666 - t_0)))) / y;
            	} else if (y <= 2e+260) {
            		tmp = (1.0 + (y * (y * ((1.0 + t_1) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_1;
            	} else {
            		tmp = 1.0 + (0.16666666666666666 * (y * y));
            	}
            	return tmp;
            }
            
            def code(x, y):
            	t_0 = (y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))
            	t_1 = (x * x) * -0.5
            	tmp = 0
            	if y <= 6.6e+72:
            		tmp = (y * (1.0 + (((y * y) * (0.027777777777777776 - (t_0 * t_0))) / (0.16666666666666666 - t_0)))) / y
            	elif y <= 2e+260:
            		tmp = (1.0 + (y * (y * ((1.0 + t_1) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_1
            	else:
            		tmp = 1.0 + (0.16666666666666666 * (y * y))
            	return tmp
            
            function code(x, y)
            	t_0 = Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))
            	t_1 = Float64(Float64(x * x) * -0.5)
            	tmp = 0.0
            	if (y <= 6.6e+72)
            		tmp = Float64(Float64(y * Float64(1.0 + Float64(Float64(Float64(y * y) * Float64(0.027777777777777776 - Float64(t_0 * t_0))) / Float64(0.16666666666666666 - t_0)))) / y);
            	elseif (y <= 2e+260)
            		tmp = Float64(Float64(1.0 + Float64(y * Float64(y * Float64(Float64(1.0 + t_1) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984))))))))) + t_1);
            	else
            		tmp = Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y)
            	t_0 = (y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)));
            	t_1 = (x * x) * -0.5;
            	tmp = 0.0;
            	if (y <= 6.6e+72)
            		tmp = (y * (1.0 + (((y * y) * (0.027777777777777776 - (t_0 * t_0))) / (0.16666666666666666 - t_0)))) / y;
            	elseif (y <= 2e+260)
            		tmp = (1.0 + (y * (y * ((1.0 + t_1) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_1;
            	else
            		tmp = 1.0 + (0.16666666666666666 * (y * y));
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_] := Block[{t$95$0 = N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[y, 6.6e+72], N[(N[(y * N[(1.0 + N[(N[(N[(y * y), $MachinePrecision] * N[(0.027777777777777776 - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.16666666666666666 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2e+260], N[(N[(1.0 + N[(y * N[(y * N[(N[(1.0 + t$95$1), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\\
            t_1 := \left(x \cdot x\right) \cdot -0.5\\
            \mathbf{if}\;y \leq 6.6 \cdot 10^{+72}:\\
            \;\;\;\;\frac{y \cdot \left(1 + \frac{\left(y \cdot y\right) \cdot \left(0.027777777777777776 - t\_0 \cdot t\_0\right)}{0.16666666666666666 - t\_0}\right)}{y}\\
            
            \mathbf{elif}\;y \leq 2 \cdot 10^{+260}:\\
            \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + t\_1\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + t\_1\\
            
            \mathbf{else}:\\
            \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if y < 6.6e72

              1. Initial program 100.0%

                \[\cos x \cdot \frac{\sinh y}{y} \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

                \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
              4. Step-by-step derivation
                1. Simplified66.0%

                  \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                2. Taylor expanded in y around 0

                  \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left(y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)}, y\right)\right) \]
                3. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right), y\right)\right) \]
                  2. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left({y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({y}^{2}\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                  5. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left({y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  7. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(\left(y \cdot y\right) \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  8. associate-*l*N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  9. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  11. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  12. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  13. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  14. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left({y}^{2} \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  15. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({y}^{2}\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  16. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                  17. *-lowering-*.f6461.0%

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                4. Simplified61.0%

                  \[\leadsto 1 \cdot \frac{\color{blue}{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)}}{y} \]
                5. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{6} + y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right) \cdot \left(y \cdot y\right)\right)\right)\right), y\right)\right) \]
                  2. flip-+N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\frac{\frac{1}{6} \cdot \frac{1}{6} - \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right) \cdot \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)}{\frac{1}{6} - y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)} \cdot \left(y \cdot y\right)\right)\right)\right), y\right)\right) \]
                  3. associate-*l/N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\frac{\left(\frac{1}{6} \cdot \frac{1}{6} - \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right) \cdot \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right) \cdot \left(y \cdot y\right)}{\frac{1}{6} - y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)}\right)\right)\right), y\right)\right) \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\frac{1}{6} \cdot \frac{1}{6} - \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right) \cdot \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right) \cdot \left(y \cdot y\right)\right), \left(\frac{1}{6} - y \cdot \left(y \cdot \left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                6. Applied egg-rr46.2%

                  \[\leadsto 1 \cdot \frac{y \cdot \left(1 + \color{blue}{\frac{\left(0.027777777777777776 - \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right) \cdot \left(y \cdot y\right)}{0.16666666666666666 - \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)}}\right)}{y} \]

                if 6.6e72 < y < 2.00000000000000013e260

                1. Initial program 100.0%

                  \[\cos x \cdot \frac{\sinh y}{y} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{-1}{2} \cdot {x}^{2}\right)}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                4. Step-by-step derivation
                  1. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{2} \cdot {x}^{2}\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{sinh.f64}\left(y\right)}, y\right)\right) \]
                  2. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({x}^{2} \cdot \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                  5. *-lowering-*.f6488.9%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                5. Simplified88.9%

                  \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot -0.5\right)} \cdot \frac{\sinh y}{y} \]
                6. Taylor expanded in y around 0

                  \[\leadsto \color{blue}{1 + \left(\frac{-1}{2} \cdot {x}^{2} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right) + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right)\right) + \frac{1}{120} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right)\right)\right)\right)} \]
                7. Simplified88.9%

                  \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot -0.5 + \left(1 + y \cdot \left(y \cdot \left(\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right)} \]

                if 2.00000000000000013e260 < y

                1. Initial program 100.0%

                  \[\cos x \cdot \frac{\sinh y}{y} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                4. Step-by-step derivation
                  1. Simplified85.7%

                    \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                  2. Step-by-step derivation
                    1. *-lft-identityN/A

                      \[\leadsto \frac{\sinh y}{\color{blue}{y}} \]
                    2. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\sinh y, \color{blue}{y}\right) \]
                    3. sinh-lowering-sinh.f6485.7%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right) \]
                  3. Applied egg-rr85.7%

                    \[\leadsto \color{blue}{\frac{\sinh y}{y}} \]
                  4. Taylor expanded in y around 0

                    \[\leadsto \color{blue}{1 + \frac{1}{6} \cdot {y}^{2}} \]
                  5. Step-by-step derivation
                    1. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({y}^{2}\right)}\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \left(y \cdot \color{blue}{y}\right)\right)\right) \]
                    4. *-lowering-*.f6485.7%

                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right) \]
                  6. Simplified85.7%

                    \[\leadsto \color{blue}{1 + 0.16666666666666666 \cdot \left(y \cdot y\right)} \]
                5. Recombined 3 regimes into one program.
                6. Final simplification53.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6.6 \cdot 10^{+72}:\\ \;\;\;\;\frac{y \cdot \left(1 + \frac{\left(y \cdot y\right) \cdot \left(0.027777777777777776 - \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)}{0.16666666666666666 - \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)}\right)}{y}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+260}:\\ \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + \left(x \cdot x\right) \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \end{array} \]
                7. Add Preprocessing

                Alternative 8: 59.6% accurate, 5.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x \cdot x\right) \cdot -0.5\\ \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 - y \cdot \left(y \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + t\_0\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + t\_0\\ \end{array} \end{array} \]
                (FPCore (x y)
                 :precision binary64
                 (let* ((t_0 (* (* x x) -0.5)))
                   (if (<= x 2.8e+289)
                     (/
                      (*
                       y
                       (+
                        1.0
                        (*
                         (* y y)
                         (+
                          0.16666666666666666
                          (*
                           y
                           (*
                            y
                            (- 0.008333333333333333 (* y (* y -0.0001984126984126984)))))))))
                      y)
                     (+
                      (+
                       1.0
                       (*
                        y
                        (*
                         y
                         (*
                          (+ 1.0 t_0)
                          (+
                           0.16666666666666666
                           (*
                            y
                            (*
                             y
                             (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984)))))))))
                      t_0))))
                double code(double x, double y) {
                	double t_0 = (x * x) * -0.5;
                	double tmp;
                	if (x <= 2.8e+289) {
                		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 - (y * (y * -0.0001984126984126984))))))))) / y;
                	} else {
                		tmp = (1.0 + (y * (y * ((1.0 + t_0) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_0;
                	}
                	return tmp;
                }
                
                real(8) function code(x, y)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8) :: t_0
                    real(8) :: tmp
                    t_0 = (x * x) * (-0.5d0)
                    if (x <= 2.8d+289) then
                        tmp = (y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 - (y * (y * (-0.0001984126984126984d0)))))))))) / y
                    else
                        tmp = (1.0d0 + (y * (y * ((1.0d0 + t_0) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0))))))))) + t_0
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y) {
                	double t_0 = (x * x) * -0.5;
                	double tmp;
                	if (x <= 2.8e+289) {
                		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 - (y * (y * -0.0001984126984126984))))))))) / y;
                	} else {
                		tmp = (1.0 + (y * (y * ((1.0 + t_0) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_0;
                	}
                	return tmp;
                }
                
                def code(x, y):
                	t_0 = (x * x) * -0.5
                	tmp = 0
                	if x <= 2.8e+289:
                		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 - (y * (y * -0.0001984126984126984))))))))) / y
                	else:
                		tmp = (1.0 + (y * (y * ((1.0 + t_0) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_0
                	return tmp
                
                function code(x, y)
                	t_0 = Float64(Float64(x * x) * -0.5)
                	tmp = 0.0
                	if (x <= 2.8e+289)
                		tmp = Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 - Float64(y * Float64(y * -0.0001984126984126984))))))))) / y);
                	else
                		tmp = Float64(Float64(1.0 + Float64(y * Float64(y * Float64(Float64(1.0 + t_0) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984))))))))) + t_0);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y)
                	t_0 = (x * x) * -0.5;
                	tmp = 0.0;
                	if (x <= 2.8e+289)
                		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 - (y * (y * -0.0001984126984126984))))))))) / y;
                	else
                		tmp = (1.0 + (y * (y * ((1.0 + t_0) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))))) + t_0;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[x, 2.8e+289], N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 - N[(y * N[(y * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(1.0 + N[(y * N[(y * N[(N[(1.0 + t$95$0), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \left(x \cdot x\right) \cdot -0.5\\
                \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\
                \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 - y \cdot \left(y \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + t\_0\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < 2.79999999999999991e289

                  1. Initial program 100.0%

                    \[\cos x \cdot \frac{\sinh y}{y} \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around 0

                    \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                  4. Step-by-step derivation
                    1. Simplified67.9%

                      \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                    2. Taylor expanded in y around 0

                      \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left(y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)}, y\right)\right) \]
                    3. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right), y\right)\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left({y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({y}^{2}\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                      4. unpow2N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left({y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      7. unpow2N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(\left(y \cdot y\right) \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      8. associate-*l*N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      9. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      10. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      11. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      12. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      13. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      14. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left({y}^{2} \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      15. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({y}^{2}\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      16. unpow2N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      17. *-lowering-*.f6463.7%

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                    4. Simplified63.7%

                      \[\leadsto 1 \cdot \frac{\color{blue}{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)}}{y} \]
                    5. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      2. flip-+N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\frac{\frac{1}{120} \cdot \frac{1}{120} - \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)}{\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}} \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      3. associate-*l/N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\frac{\left(\frac{1}{120} \cdot \frac{1}{120} - \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right) \cdot y}{\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      4. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(\frac{1}{120} \cdot \frac{1}{120} - \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right) \cdot y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{120} \cdot \frac{1}{120} - \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      6. --lowering--.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(\frac{1}{120} \cdot \frac{1}{120}\right), \left(\left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      7. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \left(\left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      8. swap-sqrN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      9. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right), \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      10. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(y \cdot y\right), \left(y \cdot y\right)\right), \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      11. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \left(y \cdot y\right)\right), \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      12. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      13. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      14. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \left(\frac{1}{120} - \frac{1}{5040} \cdot \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      15. cancel-sign-sub-invN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \left(\frac{1}{120} + \left(\mathsf{neg}\left(\frac{1}{5040}\right)\right) \cdot \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      16. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \mathsf{+.f64}\left(\frac{1}{120}, \left(\left(\mathsf{neg}\left(\frac{1}{5040}\right)\right) \cdot \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      17. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\frac{1}{5040}\right)\right), \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      18. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\frac{-1}{5040}, \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                    6. Applied egg-rr46.5%

                      \[\leadsto 1 \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \color{blue}{\frac{\left(6.944444444444444 \cdot 10^{-5} - \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot 3.936759889140842 \cdot 10^{-8}\right) \cdot y}{0.008333333333333333 + -0.0001984126984126984 \cdot \left(y \cdot y\right)}}\right)\right)}{y} \]
                    7. Step-by-step derivation
                      1. *-lft-identityN/A

                        \[\leadsto \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(\frac{1}{6} + y \cdot \frac{\left(\frac{1}{14400} - \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \frac{1}{25401600}\right) \cdot y}{\frac{1}{120} + \frac{-1}{5040} \cdot \left(y \cdot y\right)}\right)\right)}{\color{blue}{y}} \]
                      2. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(\frac{1}{6} + y \cdot \frac{\left(\frac{1}{14400} - \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \frac{1}{25401600}\right) \cdot y}{\frac{1}{120} + \frac{-1}{5040} \cdot \left(y \cdot y\right)}\right)\right)\right), \color{blue}{y}\right) \]
                    8. Applied egg-rr63.7%

                      \[\leadsto \color{blue}{\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 - y \cdot \left(y \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}{y}} \]

                    if 2.79999999999999991e289 < x

                    1. Initial program 100.0%

                      \[\cos x \cdot \frac{\sinh y}{y} \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0

                      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{-1}{2} \cdot {x}^{2}\right)}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                    4. Step-by-step derivation
                      1. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{2} \cdot {x}^{2}\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{sinh.f64}\left(y\right)}, y\right)\right) \]
                      2. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({x}^{2} \cdot \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                      4. unpow2N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                      5. *-lowering-*.f6441.4%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{-1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                    5. Simplified41.4%

                      \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot -0.5\right)} \cdot \frac{\sinh y}{y} \]
                    6. Taylor expanded in y around 0

                      \[\leadsto \color{blue}{1 + \left(\frac{-1}{2} \cdot {x}^{2} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right) + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right)\right) + \frac{1}{120} \cdot \left(1 + \frac{-1}{2} \cdot {x}^{2}\right)\right)\right)\right)} \]
                    7. Simplified41.4%

                      \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot -0.5 + \left(1 + y \cdot \left(y \cdot \left(\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right)} \]
                  5. Recombined 2 regimes into one program.
                  6. Final simplification63.2%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 - y \cdot \left(y \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + y \cdot \left(y \cdot \left(\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\right)\right) + \left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 9: 59.6% accurate, 7.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 - y \cdot \left(y \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \end{array} \]
                  (FPCore (x y)
                   :precision binary64
                   (if (<= x 2.8e+289)
                     (/
                      (*
                       y
                       (+
                        1.0
                        (*
                         (* y y)
                         (+
                          0.16666666666666666
                          (*
                           y
                           (* y (- 0.008333333333333333 (* y (* y -0.0001984126984126984)))))))))
                      y)
                     (* (* x x) -0.5)))
                  double code(double x, double y) {
                  	double tmp;
                  	if (x <= 2.8e+289) {
                  		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 - (y * (y * -0.0001984126984126984))))))))) / y;
                  	} else {
                  		tmp = (x * x) * -0.5;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8) :: tmp
                      if (x <= 2.8d+289) then
                          tmp = (y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 - (y * (y * (-0.0001984126984126984d0)))))))))) / y
                      else
                          tmp = (x * x) * (-0.5d0)
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y) {
                  	double tmp;
                  	if (x <= 2.8e+289) {
                  		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 - (y * (y * -0.0001984126984126984))))))))) / y;
                  	} else {
                  		tmp = (x * x) * -0.5;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y):
                  	tmp = 0
                  	if x <= 2.8e+289:
                  		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 - (y * (y * -0.0001984126984126984))))))))) / y
                  	else:
                  		tmp = (x * x) * -0.5
                  	return tmp
                  
                  function code(x, y)
                  	tmp = 0.0
                  	if (x <= 2.8e+289)
                  		tmp = Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 - Float64(y * Float64(y * -0.0001984126984126984))))))))) / y);
                  	else
                  		tmp = Float64(Float64(x * x) * -0.5);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y)
                  	tmp = 0.0;
                  	if (x <= 2.8e+289)
                  		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 - (y * (y * -0.0001984126984126984))))))))) / y;
                  	else
                  		tmp = (x * x) * -0.5;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_] := If[LessEqual[x, 2.8e+289], N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 - N[(y * N[(y * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\
                  \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 - y \cdot \left(y \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 2.79999999999999991e289

                    1. Initial program 100.0%

                      \[\cos x \cdot \frac{\sinh y}{y} \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0

                      \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                    4. Step-by-step derivation
                      1. Simplified67.9%

                        \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                      2. Taylor expanded in y around 0

                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left(y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)}, y\right)\right) \]
                      3. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right), y\right)\right) \]
                        2. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left({y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                        3. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({y}^{2}\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                        4. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                        5. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right)\right) \]
                        6. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left({y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        7. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(\left(y \cdot y\right) \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        8. associate-*l*N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        9. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        10. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        11. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        12. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        13. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        14. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left({y}^{2} \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        15. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({y}^{2}\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        16. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        17. *-lowering-*.f6463.7%

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      4. Simplified63.7%

                        \[\leadsto 1 \cdot \frac{\color{blue}{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)}}{y} \]
                      5. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\left(\frac{1}{120} + \left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        2. flip-+N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\frac{\frac{1}{120} \cdot \frac{1}{120} - \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)}{\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}} \cdot y\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        3. associate-*l/N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\frac{\left(\frac{1}{120} \cdot \frac{1}{120} - \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right) \cdot y}{\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}}\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        4. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(\frac{1}{120} \cdot \frac{1}{120} - \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right) \cdot y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        5. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{120} \cdot \frac{1}{120} - \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        6. --lowering--.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(\frac{1}{120} \cdot \frac{1}{120}\right), \left(\left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        7. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \left(\left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right) \cdot \left(\left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        8. swap-sqrN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        9. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right), \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        10. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(y \cdot y\right), \left(y \cdot y\right)\right), \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        11. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \left(y \cdot y\right)\right), \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        12. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \left(\frac{1}{5040} \cdot \frac{1}{5040}\right)\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        13. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \left(\frac{1}{120} - \left(y \cdot y\right) \cdot \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        14. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \left(\frac{1}{120} - \frac{1}{5040} \cdot \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        15. cancel-sign-sub-invN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \left(\frac{1}{120} + \left(\mathsf{neg}\left(\frac{1}{5040}\right)\right) \cdot \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        16. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \mathsf{+.f64}\left(\frac{1}{120}, \left(\left(\mathsf{neg}\left(\frac{1}{5040}\right)\right) \cdot \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        17. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\frac{1}{5040}\right)\right), \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                        18. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{14400}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{*.f64}\left(y, y\right)\right), \frac{1}{25401600}\right)\right), y\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\frac{-1}{5040}, \left(y \cdot y\right)\right)\right)\right)\right)\right)\right)\right)\right), y\right)\right) \]
                      6. Applied egg-rr46.5%

                        \[\leadsto 1 \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \color{blue}{\frac{\left(6.944444444444444 \cdot 10^{-5} - \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot 3.936759889140842 \cdot 10^{-8}\right) \cdot y}{0.008333333333333333 + -0.0001984126984126984 \cdot \left(y \cdot y\right)}}\right)\right)}{y} \]
                      7. Step-by-step derivation
                        1. *-lft-identityN/A

                          \[\leadsto \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(\frac{1}{6} + y \cdot \frac{\left(\frac{1}{14400} - \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \frac{1}{25401600}\right) \cdot y}{\frac{1}{120} + \frac{-1}{5040} \cdot \left(y \cdot y\right)}\right)\right)}{\color{blue}{y}} \]
                        2. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(\frac{1}{6} + y \cdot \frac{\left(\frac{1}{14400} - \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \frac{1}{25401600}\right) \cdot y}{\frac{1}{120} + \frac{-1}{5040} \cdot \left(y \cdot y\right)}\right)\right)\right), \color{blue}{y}\right) \]
                      8. Applied egg-rr63.7%

                        \[\leadsto \color{blue}{\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 - y \cdot \left(y \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}{y}} \]

                      if 2.79999999999999991e289 < x

                      1. Initial program 100.0%

                        \[\cos x \cdot \frac{\sinh y}{y} \]
                      2. Add Preprocessing
                      3. Taylor expanded in y around 0

                        \[\leadsto \color{blue}{\cos x} \]
                      4. Step-by-step derivation
                        1. cos-lowering-cos.f6454.0%

                          \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                      5. Simplified54.0%

                        \[\leadsto \color{blue}{\cos x} \]
                      6. Taylor expanded in x around 0

                        \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                      7. Step-by-step derivation
                        1. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                        2. unpow2N/A

                          \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                        3. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                        4. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                        5. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                        6. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                        7. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                        8. sub-negN/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                        9. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                        10. +-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                        11. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                        12. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                        13. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                        14. unpow2N/A

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                        15. *-lowering-*.f640.9%

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                      8. Simplified0.9%

                        \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                      9. Taylor expanded in x around inf

                        \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                      10. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                        2. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        3. pow-sqrN/A

                          \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        4. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        5. associate-*l*N/A

                          \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        6. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        7. cube-multN/A

                          \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        8. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        9. cube-multN/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        10. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        11. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        12. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        13. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                        14. sub-negN/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                        15. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                        16. associate-*r/N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                        17. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                        18. distribute-neg-fracN/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                        19. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                        20. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                        21. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                        22. *-lowering-*.f640.9%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                      11. Simplified0.9%

                        \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                      12. Taylor expanded in x around 0

                        \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                      13. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                        2. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                        3. *-lowering-*.f6441.4%

                          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                      14. Simplified41.4%

                        \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]
                    5. Recombined 2 regimes into one program.
                    6. Final simplification63.2%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 - y \cdot \left(y \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 10: 58.8% accurate, 8.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \end{array} \]
                    (FPCore (x y)
                     :precision binary64
                     (if (<= x 2.8e+289)
                       (+
                        1.0
                        (*
                         (* y y)
                         (+
                          0.16666666666666666
                          (* y (* y (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984)))))))
                       (* (* x x) -0.5)))
                    double code(double x, double y) {
                    	double tmp;
                    	if (x <= 2.8e+289) {
                    		tmp = 1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
                    	} else {
                    		tmp = (x * x) * -0.5;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8) :: tmp
                        if (x <= 2.8d+289) then
                            tmp = 1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0))))))
                        else
                            tmp = (x * x) * (-0.5d0)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y) {
                    	double tmp;
                    	if (x <= 2.8e+289) {
                    		tmp = 1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
                    	} else {
                    		tmp = (x * x) * -0.5;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y):
                    	tmp = 0
                    	if x <= 2.8e+289:
                    		tmp = 1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))
                    	else:
                    		tmp = (x * x) * -0.5
                    	return tmp
                    
                    function code(x, y)
                    	tmp = 0.0
                    	if (x <= 2.8e+289)
                    		tmp = Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))));
                    	else
                    		tmp = Float64(Float64(x * x) * -0.5);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y)
                    	tmp = 0.0;
                    	if (x <= 2.8e+289)
                    		tmp = 1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
                    	else
                    		tmp = (x * x) * -0.5;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_] := If[LessEqual[x, 2.8e+289], N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\
                    \;\;\;\;1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < 2.79999999999999991e289

                      1. Initial program 100.0%

                        \[\cos x \cdot \frac{\sinh y}{y} \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around 0

                        \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                      4. Step-by-step derivation
                        1. Simplified67.9%

                          \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                        2. Taylor expanded in y around 0

                          \[\leadsto \color{blue}{1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)} \]
                        3. Step-by-step derivation
                          1. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)}\right) \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({y}^{2}\right), \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)}\right)\right) \]
                          3. unpow2N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \left(\color{blue}{\frac{1}{6}} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \left(\color{blue}{\frac{1}{6}} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right) \]
                          5. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)}\right)\right)\right) \]
                          6. unpow2N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(\left(y \cdot y\right) \cdot \left(\color{blue}{\frac{1}{120}} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)\right) \]
                          7. associate-*l*N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)}\right)\right)\right)\right) \]
                          8. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot \color{blue}{y}\right)\right)\right)\right)\right) \]
                          9. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \color{blue}{\left(\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)}\right)\right)\right)\right) \]
                          10. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(y \cdot \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right)\right)\right)\right)\right) \]
                          11. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right)\right)\right)\right)\right) \]
                          12. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \color{blue}{\left(\frac{1}{5040} \cdot {y}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
                          13. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \left({y}^{2} \cdot \color{blue}{\frac{1}{5040}}\right)\right)\right)\right)\right)\right)\right) \]
                          14. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({y}^{2}\right), \color{blue}{\frac{1}{5040}}\right)\right)\right)\right)\right)\right)\right) \]
                          15. unpow2N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right) \]
                          16. *-lowering-*.f6463.0%

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{1}{5040}\right)\right)\right)\right)\right)\right)\right) \]
                        4. Simplified63.0%

                          \[\leadsto \color{blue}{1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)} \]

                        if 2.79999999999999991e289 < x

                        1. Initial program 100.0%

                          \[\cos x \cdot \frac{\sinh y}{y} \]
                        2. Add Preprocessing
                        3. Taylor expanded in y around 0

                          \[\leadsto \color{blue}{\cos x} \]
                        4. Step-by-step derivation
                          1. cos-lowering-cos.f6454.0%

                            \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                        5. Simplified54.0%

                          \[\leadsto \color{blue}{\cos x} \]
                        6. Taylor expanded in x around 0

                          \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                        7. Step-by-step derivation
                          1. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                          2. unpow2N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                          3. associate-*l*N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                          4. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                          5. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                          6. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                          7. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                          8. sub-negN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                          9. metadata-evalN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                          10. +-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                          11. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                          12. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                          13. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                          14. unpow2N/A

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                          15. *-lowering-*.f640.9%

                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                        8. Simplified0.9%

                          \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                        9. Taylor expanded in x around inf

                          \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                        10. Step-by-step derivation
                          1. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                          2. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          3. pow-sqrN/A

                            \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          4. unpow2N/A

                            \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          5. associate-*l*N/A

                            \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          6. unpow2N/A

                            \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          7. cube-multN/A

                            \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          8. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          9. cube-multN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          10. unpow2N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          11. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          12. unpow2N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          13. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                          14. sub-negN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                          15. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                          16. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                          17. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                          18. distribute-neg-fracN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                          19. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                          20. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                          21. unpow2N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                          22. *-lowering-*.f640.9%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                        11. Simplified0.9%

                          \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                        12. Taylor expanded in x around 0

                          \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                        13. Step-by-step derivation
                          1. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                          2. unpow2N/A

                            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                          3. *-lowering-*.f6441.4%

                            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                        14. Simplified41.4%

                          \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]
                      5. Recombined 2 regimes into one program.
                      6. Final simplification62.5%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 11: 57.6% accurate, 9.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \end{array} \]
                      (FPCore (x y)
                       :precision binary64
                       (if (<= x 2.8e+289)
                         (/
                          (*
                           y
                           (+
                            1.0
                            (* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
                          y)
                         (* (* x x) -0.5)))
                      double code(double x, double y) {
                      	double tmp;
                      	if (x <= 2.8e+289) {
                      		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y;
                      	} else {
                      		tmp = (x * x) * -0.5;
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(x, y)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8) :: tmp
                          if (x <= 2.8d+289) then
                              tmp = (y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))) / y
                          else
                              tmp = (x * x) * (-0.5d0)
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y) {
                      	double tmp;
                      	if (x <= 2.8e+289) {
                      		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y;
                      	} else {
                      		tmp = (x * x) * -0.5;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y):
                      	tmp = 0
                      	if x <= 2.8e+289:
                      		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y
                      	else:
                      		tmp = (x * x) * -0.5
                      	return tmp
                      
                      function code(x, y)
                      	tmp = 0.0
                      	if (x <= 2.8e+289)
                      		tmp = Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))) / y);
                      	else
                      		tmp = Float64(Float64(x * x) * -0.5);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y)
                      	tmp = 0.0;
                      	if (x <= 2.8e+289)
                      		tmp = (y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y;
                      	else
                      		tmp = (x * x) * -0.5;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_] := If[LessEqual[x, 2.8e+289], N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\
                      \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)}{y}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < 2.79999999999999991e289

                        1. Initial program 100.0%

                          \[\cos x \cdot \frac{\sinh y}{y} \]
                        2. Add Preprocessing
                        3. Taylor expanded in x around 0

                          \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                        4. Step-by-step derivation
                          1. Simplified67.9%

                            \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                          2. Step-by-step derivation
                            1. *-lft-identityN/A

                              \[\leadsto \frac{\sinh y}{\color{blue}{y}} \]
                            2. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\sinh y, \color{blue}{y}\right) \]
                            3. sinh-lowering-sinh.f6467.9%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right) \]
                          3. Applied egg-rr67.9%

                            \[\leadsto \color{blue}{\frac{\sinh y}{y}} \]
                          4. Taylor expanded in y around 0

                            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)}, y\right) \]
                          5. Step-by-step derivation
                            1. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right), y\right) \]
                            2. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right), y\right) \]
                            3. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({y}^{2}\right), \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right), y\right) \]
                            4. unpow2N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right), y\right) \]
                            5. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right), y\right) \]
                            6. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(\frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)\right), y\right) \]
                            7. unpow2N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(\frac{1}{120} \cdot \left(y \cdot y\right)\right)\right)\right)\right)\right), y\right) \]
                            8. associate-*r*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(\left(\frac{1}{120} \cdot y\right) \cdot y\right)\right)\right)\right)\right), y\right) \]
                            9. *-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \left(\frac{1}{120} \cdot y\right)\right)\right)\right)\right)\right), y\right) \]
                            10. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(\frac{1}{120} \cdot y\right)\right)\right)\right)\right)\right), y\right) \]
                            11. *-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(y \cdot \frac{1}{120}\right)\right)\right)\right)\right)\right), y\right) \]
                            12. *-lowering-*.f6461.3%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \frac{1}{120}\right)\right)\right)\right)\right)\right), y\right) \]
                          6. Simplified61.3%

                            \[\leadsto \frac{\color{blue}{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)}}{y} \]

                          if 2.79999999999999991e289 < x

                          1. Initial program 100.0%

                            \[\cos x \cdot \frac{\sinh y}{y} \]
                          2. Add Preprocessing
                          3. Taylor expanded in y around 0

                            \[\leadsto \color{blue}{\cos x} \]
                          4. Step-by-step derivation
                            1. cos-lowering-cos.f6454.0%

                              \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                          5. Simplified54.0%

                            \[\leadsto \color{blue}{\cos x} \]
                          6. Taylor expanded in x around 0

                            \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                          7. Step-by-step derivation
                            1. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                            2. unpow2N/A

                              \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                            4. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                            5. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                            6. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                            7. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                            8. sub-negN/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                            9. metadata-evalN/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                            10. +-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                            11. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                            12. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                            13. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                            14. unpow2N/A

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                            15. *-lowering-*.f640.9%

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                          8. Simplified0.9%

                            \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                          9. Taylor expanded in x around inf

                            \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                          10. Step-by-step derivation
                            1. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                            2. metadata-evalN/A

                              \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            3. pow-sqrN/A

                              \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            4. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            5. associate-*l*N/A

                              \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            6. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            7. cube-multN/A

                              \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            8. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            9. cube-multN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            10. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            11. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            12. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            13. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                            14. sub-negN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                            15. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                            16. associate-*r/N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                            17. metadata-evalN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                            18. distribute-neg-fracN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                            19. metadata-evalN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                            20. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                            21. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                            22. *-lowering-*.f640.9%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                          11. Simplified0.9%

                            \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                          12. Taylor expanded in x around 0

                            \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                          13. Step-by-step derivation
                            1. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                            2. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                            3. *-lowering-*.f6441.4%

                              \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                          14. Simplified41.4%

                            \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]
                        5. Recombined 2 regimes into one program.
                        6. Final simplification60.9%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;\frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 12: 47.7% accurate, 10.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2 \cdot 10^{+94}:\\ \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \end{array} \]
                        (FPCore (x y)
                         :precision binary64
                         (if (<= x 2e+94)
                           (+ 1.0 (* 0.16666666666666666 (* y y)))
                           (if (<= x 2.8e+289)
                             (* x (* x (* (* x x) 0.041666666666666664)))
                             (* (* x x) -0.5))))
                        double code(double x, double y) {
                        	double tmp;
                        	if (x <= 2e+94) {
                        		tmp = 1.0 + (0.16666666666666666 * (y * y));
                        	} else if (x <= 2.8e+289) {
                        		tmp = x * (x * ((x * x) * 0.041666666666666664));
                        	} else {
                        		tmp = (x * x) * -0.5;
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(x, y)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8) :: tmp
                            if (x <= 2d+94) then
                                tmp = 1.0d0 + (0.16666666666666666d0 * (y * y))
                            else if (x <= 2.8d+289) then
                                tmp = x * (x * ((x * x) * 0.041666666666666664d0))
                            else
                                tmp = (x * x) * (-0.5d0)
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y) {
                        	double tmp;
                        	if (x <= 2e+94) {
                        		tmp = 1.0 + (0.16666666666666666 * (y * y));
                        	} else if (x <= 2.8e+289) {
                        		tmp = x * (x * ((x * x) * 0.041666666666666664));
                        	} else {
                        		tmp = (x * x) * -0.5;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y):
                        	tmp = 0
                        	if x <= 2e+94:
                        		tmp = 1.0 + (0.16666666666666666 * (y * y))
                        	elif x <= 2.8e+289:
                        		tmp = x * (x * ((x * x) * 0.041666666666666664))
                        	else:
                        		tmp = (x * x) * -0.5
                        	return tmp
                        
                        function code(x, y)
                        	tmp = 0.0
                        	if (x <= 2e+94)
                        		tmp = Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)));
                        	elseif (x <= 2.8e+289)
                        		tmp = Float64(x * Float64(x * Float64(Float64(x * x) * 0.041666666666666664)));
                        	else
                        		tmp = Float64(Float64(x * x) * -0.5);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y)
                        	tmp = 0.0;
                        	if (x <= 2e+94)
                        		tmp = 1.0 + (0.16666666666666666 * (y * y));
                        	elseif (x <= 2.8e+289)
                        		tmp = x * (x * ((x * x) * 0.041666666666666664));
                        	else
                        		tmp = (x * x) * -0.5;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_] := If[LessEqual[x, 2e+94], N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+289], N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq 2 \cdot 10^{+94}:\\
                        \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
                        
                        \mathbf{elif}\;x \leq 2.8 \cdot 10^{+289}:\\
                        \;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if x < 2e94

                          1. Initial program 100.0%

                            \[\cos x \cdot \frac{\sinh y}{y} \]
                          2. Add Preprocessing
                          3. Taylor expanded in x around 0

                            \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                          4. Step-by-step derivation
                            1. Simplified74.4%

                              \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                            2. Step-by-step derivation
                              1. *-lft-identityN/A

                                \[\leadsto \frac{\sinh y}{\color{blue}{y}} \]
                              2. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\sinh y, \color{blue}{y}\right) \]
                              3. sinh-lowering-sinh.f6474.4%

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right) \]
                            3. Applied egg-rr74.4%

                              \[\leadsto \color{blue}{\frac{\sinh y}{y}} \]
                            4. Taylor expanded in y around 0

                              \[\leadsto \color{blue}{1 + \frac{1}{6} \cdot {y}^{2}} \]
                            5. Step-by-step derivation
                              1. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)}\right) \]
                              2. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({y}^{2}\right)}\right)\right) \]
                              3. unpow2N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \left(y \cdot \color{blue}{y}\right)\right)\right) \]
                              4. *-lowering-*.f6456.4%

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right) \]
                            6. Simplified56.4%

                              \[\leadsto \color{blue}{1 + 0.16666666666666666 \cdot \left(y \cdot y\right)} \]

                            if 2e94 < x < 2.79999999999999991e289

                            1. Initial program 100.0%

                              \[\cos x \cdot \frac{\sinh y}{y} \]
                            2. Add Preprocessing
                            3. Taylor expanded in y around 0

                              \[\leadsto \color{blue}{\cos x} \]
                            4. Step-by-step derivation
                              1. cos-lowering-cos.f6442.8%

                                \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                            5. Simplified42.8%

                              \[\leadsto \color{blue}{\cos x} \]
                            6. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                            7. Step-by-step derivation
                              1. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                              2. unpow2N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                              3. associate-*l*N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                              4. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                              5. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                              6. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                              7. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                              8. sub-negN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                              9. metadata-evalN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                              10. +-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                              11. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                              12. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                              13. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                              14. unpow2N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                              15. *-lowering-*.f6432.7%

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                            8. Simplified32.7%

                              \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                            9. Taylor expanded in x around inf

                              \[\leadsto \color{blue}{\frac{1}{24} \cdot {x}^{4}} \]
                            10. Step-by-step derivation
                              1. metadata-evalN/A

                                \[\leadsto \frac{1}{24} \cdot {x}^{\left(2 \cdot \color{blue}{2}\right)} \]
                              2. pow-sqrN/A

                                \[\leadsto \frac{1}{24} \cdot \left({x}^{2} \cdot \color{blue}{{x}^{2}}\right) \]
                              3. associate-*l*N/A

                                \[\leadsto \left(\frac{1}{24} \cdot {x}^{2}\right) \cdot \color{blue}{{x}^{2}} \]
                              4. *-commutativeN/A

                                \[\leadsto {x}^{2} \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)} \]
                              5. unpow2N/A

                                \[\leadsto \left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {x}^{2}\right) \]
                              6. associate-*l*N/A

                                \[\leadsto x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2}\right)\right)} \]
                              7. *-commutativeN/A

                                \[\leadsto x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2}\right) \cdot \color{blue}{x}\right) \]
                              8. associate-*r*N/A

                                \[\leadsto x \cdot \left(\frac{1}{24} \cdot \color{blue}{\left({x}^{2} \cdot x\right)}\right) \]
                              9. unpow2N/A

                                \[\leadsto x \cdot \left(\frac{1}{24} \cdot \left(\left(x \cdot x\right) \cdot x\right)\right) \]
                              10. unpow3N/A

                                \[\leadsto x \cdot \left(\frac{1}{24} \cdot {x}^{\color{blue}{3}}\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{3}\right)}\right) \]
                              12. unpow3N/A

                                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{x}\right)\right)\right) \]
                              13. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot \left({x}^{2} \cdot x\right)\right)\right) \]
                              14. associate-*r*N/A

                                \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{24} \cdot {x}^{2}\right) \cdot \color{blue}{x}\right)\right) \]
                              15. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right) \]
                              16. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right) \]
                              17. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right) \]
                              18. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right) \]
                              19. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right) \]
                              20. *-lowering-*.f6432.7%

                                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right) \]
                            11. Simplified32.7%

                              \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]

                            if 2.79999999999999991e289 < x

                            1. Initial program 100.0%

                              \[\cos x \cdot \frac{\sinh y}{y} \]
                            2. Add Preprocessing
                            3. Taylor expanded in y around 0

                              \[\leadsto \color{blue}{\cos x} \]
                            4. Step-by-step derivation
                              1. cos-lowering-cos.f6454.0%

                                \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                            5. Simplified54.0%

                              \[\leadsto \color{blue}{\cos x} \]
                            6. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                            7. Step-by-step derivation
                              1. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                              2. unpow2N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                              3. associate-*l*N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                              4. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                              5. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                              6. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                              7. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                              8. sub-negN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                              9. metadata-evalN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                              10. +-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                              11. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                              12. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                              13. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                              14. unpow2N/A

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                              15. *-lowering-*.f640.9%

                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                            8. Simplified0.9%

                              \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                            9. Taylor expanded in x around inf

                              \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                            10. Step-by-step derivation
                              1. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                              2. metadata-evalN/A

                                \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              3. pow-sqrN/A

                                \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              4. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              5. associate-*l*N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              6. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              7. cube-multN/A

                                \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              8. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              9. cube-multN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              10. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              12. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              13. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                              14. sub-negN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                              15. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                              16. associate-*r/N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                              17. metadata-evalN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                              18. distribute-neg-fracN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                              19. metadata-evalN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                              20. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                              21. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                              22. *-lowering-*.f640.9%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                            11. Simplified0.9%

                              \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                            12. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                            13. Step-by-step derivation
                              1. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                              2. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                              3. *-lowering-*.f6441.4%

                                \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                            14. Simplified41.4%

                              \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]
                          5. Recombined 3 regimes into one program.
                          6. Final simplification52.0%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2 \cdot 10^{+94}:\\ \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                          7. Add Preprocessing

                          Alternative 13: 55.9% accurate, 11.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;1 + y \cdot \left(y \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \end{array} \]
                          (FPCore (x y)
                           :precision binary64
                           (if (<= x 2.8e+289)
                             (+ 1.0 (* y (* y (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
                             (* (* x x) -0.5)))
                          double code(double x, double y) {
                          	double tmp;
                          	if (x <= 2.8e+289) {
                          		tmp = 1.0 + (y * (y * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
                          	} else {
                          		tmp = (x * x) * -0.5;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(x, y)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8) :: tmp
                              if (x <= 2.8d+289) then
                                  tmp = 1.0d0 + (y * (y * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
                              else
                                  tmp = (x * x) * (-0.5d0)
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y) {
                          	double tmp;
                          	if (x <= 2.8e+289) {
                          		tmp = 1.0 + (y * (y * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
                          	} else {
                          		tmp = (x * x) * -0.5;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y):
                          	tmp = 0
                          	if x <= 2.8e+289:
                          		tmp = 1.0 + (y * (y * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))
                          	else:
                          		tmp = (x * x) * -0.5
                          	return tmp
                          
                          function code(x, y)
                          	tmp = 0.0
                          	if (x <= 2.8e+289)
                          		tmp = Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333))))));
                          	else
                          		tmp = Float64(Float64(x * x) * -0.5);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y)
                          	tmp = 0.0;
                          	if (x <= 2.8e+289)
                          		tmp = 1.0 + (y * (y * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
                          	else
                          		tmp = (x * x) * -0.5;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_] := If[LessEqual[x, 2.8e+289], N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\
                          \;\;\;\;1 + y \cdot \left(y \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if x < 2.79999999999999991e289

                            1. Initial program 100.0%

                              \[\cos x \cdot \frac{\sinh y}{y} \]
                            2. Add Preprocessing
                            3. Taylor expanded in x around 0

                              \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                            4. Step-by-step derivation
                              1. Simplified67.9%

                                \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                              2. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \frac{1 \cdot \sinh y}{\color{blue}{y}} \]
                                2. associate-*l/N/A

                                  \[\leadsto \frac{1}{y} \cdot \color{blue}{\sinh y} \]
                                3. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{y}\right), \color{blue}{\sinh y}\right) \]
                                4. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \sinh \color{blue}{y}\right) \]
                                5. sinh-lowering-sinh.f6467.9%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \mathsf{sinh.f64}\left(y\right)\right) \]
                              3. Applied egg-rr67.9%

                                \[\leadsto \color{blue}{\frac{1}{y} \cdot \sinh y} \]
                              4. Taylor expanded in y around 0

                                \[\leadsto \color{blue}{1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)} \]
                              5. Step-by-step derivation
                                1. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}\right) \]
                                2. unpow2N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \left(\left(y \cdot y\right) \cdot \left(\color{blue}{\frac{1}{6}} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) \]
                                3. associate-*l*N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}\right)\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{\left(y \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}\right)\right) \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right)\right)\right) \]
                                6. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{6}, \color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right)}\right)\right)\right)\right) \]
                                7. unpow2N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{6}, \left(\frac{1}{120} \cdot \left(y \cdot \color{blue}{y}\right)\right)\right)\right)\right)\right) \]
                                8. associate-*r*N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{6}, \left(\left(\frac{1}{120} \cdot y\right) \cdot \color{blue}{y}\right)\right)\right)\right)\right) \]
                                9. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{6}, \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot y\right)}\right)\right)\right)\right)\right) \]
                                10. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{1}{120} \cdot y\right)}\right)\right)\right)\right)\right) \]
                                11. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \left(y \cdot \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                                12. *-lowering-*.f6460.6%

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                              6. Simplified60.6%

                                \[\leadsto \color{blue}{1 + y \cdot \left(y \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)} \]

                              if 2.79999999999999991e289 < x

                              1. Initial program 100.0%

                                \[\cos x \cdot \frac{\sinh y}{y} \]
                              2. Add Preprocessing
                              3. Taylor expanded in y around 0

                                \[\leadsto \color{blue}{\cos x} \]
                              4. Step-by-step derivation
                                1. cos-lowering-cos.f6454.0%

                                  \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                              5. Simplified54.0%

                                \[\leadsto \color{blue}{\cos x} \]
                              6. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                              7. Step-by-step derivation
                                1. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                                2. unpow2N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                                3. associate-*l*N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                                6. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                8. sub-negN/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                                9. metadata-evalN/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                                10. +-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                                11. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                                12. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                13. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                14. unpow2N/A

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                15. *-lowering-*.f640.9%

                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                              8. Simplified0.9%

                                \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                              9. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                              10. Step-by-step derivation
                                1. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                                2. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                3. pow-sqrN/A

                                  \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                4. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                5. associate-*l*N/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                6. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                7. cube-multN/A

                                  \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                8. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                9. cube-multN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                10. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                11. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                12. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                13. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                14. sub-negN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                15. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                16. associate-*r/N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                                17. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                                18. distribute-neg-fracN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                                19. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                                20. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                                21. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                                22. *-lowering-*.f640.9%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                              11. Simplified0.9%

                                \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                              12. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                              13. Step-by-step derivation
                                1. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                                2. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                                3. *-lowering-*.f6441.4%

                                  \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                              14. Simplified41.4%

                                \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]
                            5. Recombined 2 regimes into one program.
                            6. Final simplification60.2%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.8 \cdot 10^{+289}:\\ \;\;\;\;1 + y \cdot \left(y \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                            7. Add Preprocessing

                            Alternative 14: 52.9% accurate, 12.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.45 \cdot 10^{+237}:\\ \;\;\;\;\frac{y \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (if (<= x 1.45e+237)
                               (/ (* y (+ 1.0 (* 0.16666666666666666 (* y y)))) y)
                               (* (* x x) -0.5)))
                            double code(double x, double y) {
                            	double tmp;
                            	if (x <= 1.45e+237) {
                            		tmp = (y * (1.0 + (0.16666666666666666 * (y * y)))) / y;
                            	} else {
                            		tmp = (x * x) * -0.5;
                            	}
                            	return tmp;
                            }
                            
                            real(8) function code(x, y)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8) :: tmp
                                if (x <= 1.45d+237) then
                                    tmp = (y * (1.0d0 + (0.16666666666666666d0 * (y * y)))) / y
                                else
                                    tmp = (x * x) * (-0.5d0)
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y) {
                            	double tmp;
                            	if (x <= 1.45e+237) {
                            		tmp = (y * (1.0 + (0.16666666666666666 * (y * y)))) / y;
                            	} else {
                            		tmp = (x * x) * -0.5;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y):
                            	tmp = 0
                            	if x <= 1.45e+237:
                            		tmp = (y * (1.0 + (0.16666666666666666 * (y * y)))) / y
                            	else:
                            		tmp = (x * x) * -0.5
                            	return tmp
                            
                            function code(x, y)
                            	tmp = 0.0
                            	if (x <= 1.45e+237)
                            		tmp = Float64(Float64(y * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)))) / y);
                            	else
                            		tmp = Float64(Float64(x * x) * -0.5);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y)
                            	tmp = 0.0;
                            	if (x <= 1.45e+237)
                            		tmp = (y * (1.0 + (0.16666666666666666 * (y * y)))) / y;
                            	else
                            		tmp = (x * x) * -0.5;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_] := If[LessEqual[x, 1.45e+237], N[(N[(y * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;x \leq 1.45 \cdot 10^{+237}:\\
                            \;\;\;\;\frac{y \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)}{y}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x < 1.45000000000000005e237

                              1. Initial program 100.0%

                                \[\cos x \cdot \frac{\sinh y}{y} \]
                              2. Add Preprocessing
                              3. Taylor expanded in x around 0

                                \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                              4. Step-by-step derivation
                                1. Simplified69.5%

                                  \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                                2. Step-by-step derivation
                                  1. *-lft-identityN/A

                                    \[\leadsto \frac{\sinh y}{\color{blue}{y}} \]
                                  2. /-lowering-/.f64N/A

                                    \[\leadsto \mathsf{/.f64}\left(\sinh y, \color{blue}{y}\right) \]
                                  3. sinh-lowering-sinh.f6469.5%

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right) \]
                                3. Applied egg-rr69.5%

                                  \[\leadsto \color{blue}{\frac{\sinh y}{y}} \]
                                4. Taylor expanded in y around 0

                                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(y \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right)}, y\right) \]
                                5. Step-by-step derivation
                                  1. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right), y\right) \]
                                  2. +-lowering-+.f64N/A

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\frac{1}{6} \cdot {y}^{2}\right)\right)\right), y\right) \]
                                  3. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \left({y}^{2}\right)\right)\right)\right), y\right) \]
                                  4. unpow2N/A

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \left(y \cdot y\right)\right)\right)\right), y\right) \]
                                  5. *-lowering-*.f6459.2%

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, y\right)\right)\right)\right), y\right) \]
                                6. Simplified59.2%

                                  \[\leadsto \frac{\color{blue}{y \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}{y} \]

                                if 1.45000000000000005e237 < x

                                1. Initial program 100.0%

                                  \[\cos x \cdot \frac{\sinh y}{y} \]
                                2. Add Preprocessing
                                3. Taylor expanded in y around 0

                                  \[\leadsto \color{blue}{\cos x} \]
                                4. Step-by-step derivation
                                  1. cos-lowering-cos.f6435.2%

                                    \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                                5. Simplified35.2%

                                  \[\leadsto \color{blue}{\cos x} \]
                                6. Taylor expanded in x around 0

                                  \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                                7. Step-by-step derivation
                                  1. +-lowering-+.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                                  2. unpow2N/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                                  3. associate-*l*N/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                                  4. *-commutativeN/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                                  5. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                                  6. *-commutativeN/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                  7. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                  8. sub-negN/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                                  9. metadata-evalN/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                                  10. +-commutativeN/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                                  11. +-lowering-+.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                                  12. *-commutativeN/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                  13. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                  14. unpow2N/A

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                  15. *-lowering-*.f6424.2%

                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                8. Simplified24.2%

                                  \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                                9. Taylor expanded in x around inf

                                  \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                                10. Step-by-step derivation
                                  1. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                                  2. metadata-evalN/A

                                    \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  3. pow-sqrN/A

                                    \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  4. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  5. associate-*l*N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  6. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  7. cube-multN/A

                                    \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  8. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  9. cube-multN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  10. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  11. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  12. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  13. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                  14. sub-negN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                  15. +-lowering-+.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                  16. associate-*r/N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                                  17. metadata-evalN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                                  18. distribute-neg-fracN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                                  19. metadata-evalN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                                  20. /-lowering-/.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                                  21. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                                  22. *-lowering-*.f6424.2%

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                                11. Simplified24.2%

                                  \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                                12. Taylor expanded in x around 0

                                  \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                                13. Step-by-step derivation
                                  1. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                                  2. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                                  3. *-lowering-*.f6441.8%

                                    \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                                14. Simplified41.8%

                                  \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]
                              5. Recombined 2 regimes into one program.
                              6. Final simplification58.1%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.45 \cdot 10^{+237}:\\ \;\;\;\;\frac{y \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 15: 37.5% accurate, 13.6× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 3400000000:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+136}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\ \end{array} \end{array} \]
                              (FPCore (x y)
                               :precision binary64
                               (if (<= y 3400000000.0)
                                 1.0
                                 (if (<= y 1.4e+136) (* (* x x) -0.5) (* 0.16666666666666666 (* y y)))))
                              double code(double x, double y) {
                              	double tmp;
                              	if (y <= 3400000000.0) {
                              		tmp = 1.0;
                              	} else if (y <= 1.4e+136) {
                              		tmp = (x * x) * -0.5;
                              	} else {
                              		tmp = 0.16666666666666666 * (y * y);
                              	}
                              	return tmp;
                              }
                              
                              real(8) function code(x, y)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8) :: tmp
                                  if (y <= 3400000000.0d0) then
                                      tmp = 1.0d0
                                  else if (y <= 1.4d+136) then
                                      tmp = (x * x) * (-0.5d0)
                                  else
                                      tmp = 0.16666666666666666d0 * (y * y)
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y) {
                              	double tmp;
                              	if (y <= 3400000000.0) {
                              		tmp = 1.0;
                              	} else if (y <= 1.4e+136) {
                              		tmp = (x * x) * -0.5;
                              	} else {
                              		tmp = 0.16666666666666666 * (y * y);
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y):
                              	tmp = 0
                              	if y <= 3400000000.0:
                              		tmp = 1.0
                              	elif y <= 1.4e+136:
                              		tmp = (x * x) * -0.5
                              	else:
                              		tmp = 0.16666666666666666 * (y * y)
                              	return tmp
                              
                              function code(x, y)
                              	tmp = 0.0
                              	if (y <= 3400000000.0)
                              		tmp = 1.0;
                              	elseif (y <= 1.4e+136)
                              		tmp = Float64(Float64(x * x) * -0.5);
                              	else
                              		tmp = Float64(0.16666666666666666 * Float64(y * y));
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y)
                              	tmp = 0.0;
                              	if (y <= 3400000000.0)
                              		tmp = 1.0;
                              	elseif (y <= 1.4e+136)
                              		tmp = (x * x) * -0.5;
                              	else
                              		tmp = 0.16666666666666666 * (y * y);
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_] := If[LessEqual[y, 3400000000.0], 1.0, If[LessEqual[y, 1.4e+136], N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision], N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;y \leq 3400000000:\\
                              \;\;\;\;1\\
                              
                              \mathbf{elif}\;y \leq 1.4 \cdot 10^{+136}:\\
                              \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if y < 3.4e9

                                1. Initial program 100.0%

                                  \[\cos x \cdot \frac{\sinh y}{y} \]
                                2. Add Preprocessing
                                3. Taylor expanded in y around 0

                                  \[\leadsto \color{blue}{\cos x} \]
                                4. Step-by-step derivation
                                  1. cos-lowering-cos.f6468.0%

                                    \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                                5. Simplified68.0%

                                  \[\leadsto \color{blue}{\cos x} \]
                                6. Taylor expanded in x around 0

                                  \[\leadsto \color{blue}{1} \]
                                7. Step-by-step derivation
                                  1. Simplified40.9%

                                    \[\leadsto \color{blue}{1} \]

                                  if 3.4e9 < y < 1.4000000000000001e136

                                  1. Initial program 100.0%

                                    \[\cos x \cdot \frac{\sinh y}{y} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in y around 0

                                    \[\leadsto \color{blue}{\cos x} \]
                                  4. Step-by-step derivation
                                    1. cos-lowering-cos.f643.1%

                                      \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                                  5. Simplified3.1%

                                    \[\leadsto \color{blue}{\cos x} \]
                                  6. Taylor expanded in x around 0

                                    \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                                  7. Step-by-step derivation
                                    1. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                                    2. unpow2N/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                                    3. associate-*l*N/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                                    4. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                                    5. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                                    6. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                    7. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                    8. sub-negN/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                                    9. metadata-evalN/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                                    10. +-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                                    11. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                                    12. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                    13. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                    14. unpow2N/A

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                    15. *-lowering-*.f6414.1%

                                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                  8. Simplified14.1%

                                    \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                                  9. Taylor expanded in x around inf

                                    \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                                  10. Step-by-step derivation
                                    1. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                                    2. metadata-evalN/A

                                      \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    3. pow-sqrN/A

                                      \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    4. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    5. associate-*l*N/A

                                      \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    6. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    7. cube-multN/A

                                      \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    8. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    9. cube-multN/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    10. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    11. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    12. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    13. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                    14. sub-negN/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                    15. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                    16. associate-*r/N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                                    17. metadata-evalN/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                                    18. distribute-neg-fracN/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                                    19. metadata-evalN/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                                    20. /-lowering-/.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                                    21. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                                    22. *-lowering-*.f6412.7%

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                                  11. Simplified12.7%

                                    \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                                  12. Taylor expanded in x around 0

                                    \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                                  13. Step-by-step derivation
                                    1. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                                    2. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                                    3. *-lowering-*.f6421.1%

                                      \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                                  14. Simplified21.1%

                                    \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]

                                  if 1.4000000000000001e136 < y

                                  1. Initial program 100.0%

                                    \[\cos x \cdot \frac{\sinh y}{y} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in x around 0

                                    \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                                  4. Step-by-step derivation
                                    1. Simplified72.4%

                                      \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                                    2. Step-by-step derivation
                                      1. *-lft-identityN/A

                                        \[\leadsto \frac{\sinh y}{\color{blue}{y}} \]
                                      2. /-lowering-/.f64N/A

                                        \[\leadsto \mathsf{/.f64}\left(\sinh y, \color{blue}{y}\right) \]
                                      3. sinh-lowering-sinh.f6472.4%

                                        \[\leadsto \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right) \]
                                    3. Applied egg-rr72.4%

                                      \[\leadsto \color{blue}{\frac{\sinh y}{y}} \]
                                    4. Taylor expanded in y around 0

                                      \[\leadsto \color{blue}{1 + \frac{1}{6} \cdot {y}^{2}} \]
                                    5. Step-by-step derivation
                                      1. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)}\right) \]
                                      2. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({y}^{2}\right)}\right)\right) \]
                                      3. unpow2N/A

                                        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \left(y \cdot \color{blue}{y}\right)\right)\right) \]
                                      4. *-lowering-*.f6472.4%

                                        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right) \]
                                    6. Simplified72.4%

                                      \[\leadsto \color{blue}{1 + 0.16666666666666666 \cdot \left(y \cdot y\right)} \]
                                    7. Taylor expanded in y around inf

                                      \[\leadsto \color{blue}{\frac{1}{6} \cdot {y}^{2}} \]
                                    8. Step-by-step derivation
                                      1. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({y}^{2}\right)}\right) \]
                                      2. unpow2N/A

                                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{6}, \left(y \cdot \color{blue}{y}\right)\right) \]
                                      3. *-lowering-*.f6472.4%

                                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right) \]
                                    9. Simplified72.4%

                                      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(y \cdot y\right)} \]
                                  5. Recombined 3 regimes into one program.
                                  6. Final simplification42.5%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 3400000000:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+136}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\ \end{array} \]
                                  7. Add Preprocessing

                                  Alternative 16: 46.7% accurate, 17.1× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.45 \cdot 10^{+237}:\\ \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \end{array} \]
                                  (FPCore (x y)
                                   :precision binary64
                                   (if (<= x 1.45e+237)
                                     (+ 1.0 (* 0.16666666666666666 (* y y)))
                                     (* (* x x) -0.5)))
                                  double code(double x, double y) {
                                  	double tmp;
                                  	if (x <= 1.45e+237) {
                                  		tmp = 1.0 + (0.16666666666666666 * (y * y));
                                  	} else {
                                  		tmp = (x * x) * -0.5;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  real(8) function code(x, y)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8) :: tmp
                                      if (x <= 1.45d+237) then
                                          tmp = 1.0d0 + (0.16666666666666666d0 * (y * y))
                                      else
                                          tmp = (x * x) * (-0.5d0)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y) {
                                  	double tmp;
                                  	if (x <= 1.45e+237) {
                                  		tmp = 1.0 + (0.16666666666666666 * (y * y));
                                  	} else {
                                  		tmp = (x * x) * -0.5;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y):
                                  	tmp = 0
                                  	if x <= 1.45e+237:
                                  		tmp = 1.0 + (0.16666666666666666 * (y * y))
                                  	else:
                                  		tmp = (x * x) * -0.5
                                  	return tmp
                                  
                                  function code(x, y)
                                  	tmp = 0.0
                                  	if (x <= 1.45e+237)
                                  		tmp = Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)));
                                  	else
                                  		tmp = Float64(Float64(x * x) * -0.5);
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y)
                                  	tmp = 0.0;
                                  	if (x <= 1.45e+237)
                                  		tmp = 1.0 + (0.16666666666666666 * (y * y));
                                  	else
                                  		tmp = (x * x) * -0.5;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_] := If[LessEqual[x, 1.45e+237], N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;x \leq 1.45 \cdot 10^{+237}:\\
                                  \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if x < 1.45000000000000005e237

                                    1. Initial program 100.0%

                                      \[\cos x \cdot \frac{\sinh y}{y} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in x around 0

                                      \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right)\right) \]
                                    4. Step-by-step derivation
                                      1. Simplified69.5%

                                        \[\leadsto \color{blue}{1} \cdot \frac{\sinh y}{y} \]
                                      2. Step-by-step derivation
                                        1. *-lft-identityN/A

                                          \[\leadsto \frac{\sinh y}{\color{blue}{y}} \]
                                        2. /-lowering-/.f64N/A

                                          \[\leadsto \mathsf{/.f64}\left(\sinh y, \color{blue}{y}\right) \]
                                        3. sinh-lowering-sinh.f6469.5%

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{sinh.f64}\left(y\right), y\right) \]
                                      3. Applied egg-rr69.5%

                                        \[\leadsto \color{blue}{\frac{\sinh y}{y}} \]
                                      4. Taylor expanded in y around 0

                                        \[\leadsto \color{blue}{1 + \frac{1}{6} \cdot {y}^{2}} \]
                                      5. Step-by-step derivation
                                        1. +-lowering-+.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)}\right) \]
                                        2. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({y}^{2}\right)}\right)\right) \]
                                        3. unpow2N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \left(y \cdot \color{blue}{y}\right)\right)\right) \]
                                        4. *-lowering-*.f6451.9%

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right) \]
                                      6. Simplified51.9%

                                        \[\leadsto \color{blue}{1 + 0.16666666666666666 \cdot \left(y \cdot y\right)} \]

                                      if 1.45000000000000005e237 < x

                                      1. Initial program 100.0%

                                        \[\cos x \cdot \frac{\sinh y}{y} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in y around 0

                                        \[\leadsto \color{blue}{\cos x} \]
                                      4. Step-by-step derivation
                                        1. cos-lowering-cos.f6435.2%

                                          \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                                      5. Simplified35.2%

                                        \[\leadsto \color{blue}{\cos x} \]
                                      6. Taylor expanded in x around 0

                                        \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                                      7. Step-by-step derivation
                                        1. +-lowering-+.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                                        2. unpow2N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                                        3. associate-*l*N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                                        4. *-commutativeN/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                                        5. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                                        6. *-commutativeN/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                        7. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                        8. sub-negN/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                                        9. metadata-evalN/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                                        10. +-commutativeN/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                                        11. +-lowering-+.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                                        12. *-commutativeN/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                        13. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                        14. unpow2N/A

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                        15. *-lowering-*.f6424.2%

                                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                      8. Simplified24.2%

                                        \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                                      9. Taylor expanded in x around inf

                                        \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                                      10. Step-by-step derivation
                                        1. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                                        2. metadata-evalN/A

                                          \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        3. pow-sqrN/A

                                          \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        4. unpow2N/A

                                          \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        5. associate-*l*N/A

                                          \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        6. unpow2N/A

                                          \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        7. cube-multN/A

                                          \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        8. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        9. cube-multN/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        10. unpow2N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        11. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        12. unpow2N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        13. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                        14. sub-negN/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                        15. +-lowering-+.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                        16. associate-*r/N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                                        17. metadata-evalN/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                                        18. distribute-neg-fracN/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                                        19. metadata-evalN/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                                        20. /-lowering-/.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                                        21. unpow2N/A

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                                        22. *-lowering-*.f6424.2%

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                                      11. Simplified24.2%

                                        \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                                      12. Taylor expanded in x around 0

                                        \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                                      13. Step-by-step derivation
                                        1. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                                        2. unpow2N/A

                                          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                                        3. *-lowering-*.f6441.8%

                                          \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                                      14. Simplified41.8%

                                        \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]
                                    5. Recombined 2 regimes into one program.
                                    6. Final simplification51.2%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.45 \cdot 10^{+237}:\\ \;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                                    7. Add Preprocessing

                                    Alternative 17: 30.1% accurate, 20.5× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 10500000000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \end{array} \]
                                    (FPCore (x y)
                                     :precision binary64
                                     (if (<= y 10500000000.0) 1.0 (* (* x x) -0.5)))
                                    double code(double x, double y) {
                                    	double tmp;
                                    	if (y <= 10500000000.0) {
                                    		tmp = 1.0;
                                    	} else {
                                    		tmp = (x * x) * -0.5;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    real(8) function code(x, y)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        real(8) :: tmp
                                        if (y <= 10500000000.0d0) then
                                            tmp = 1.0d0
                                        else
                                            tmp = (x * x) * (-0.5d0)
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x, double y) {
                                    	double tmp;
                                    	if (y <= 10500000000.0) {
                                    		tmp = 1.0;
                                    	} else {
                                    		tmp = (x * x) * -0.5;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y):
                                    	tmp = 0
                                    	if y <= 10500000000.0:
                                    		tmp = 1.0
                                    	else:
                                    		tmp = (x * x) * -0.5
                                    	return tmp
                                    
                                    function code(x, y)
                                    	tmp = 0.0
                                    	if (y <= 10500000000.0)
                                    		tmp = 1.0;
                                    	else
                                    		tmp = Float64(Float64(x * x) * -0.5);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y)
                                    	tmp = 0.0;
                                    	if (y <= 10500000000.0)
                                    		tmp = 1.0;
                                    	else
                                    		tmp = (x * x) * -0.5;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_] := If[LessEqual[y, 10500000000.0], 1.0, N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;y \leq 10500000000:\\
                                    \;\;\;\;1\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if y < 1.05e10

                                      1. Initial program 100.0%

                                        \[\cos x \cdot \frac{\sinh y}{y} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in y around 0

                                        \[\leadsto \color{blue}{\cos x} \]
                                      4. Step-by-step derivation
                                        1. cos-lowering-cos.f6468.0%

                                          \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                                      5. Simplified68.0%

                                        \[\leadsto \color{blue}{\cos x} \]
                                      6. Taylor expanded in x around 0

                                        \[\leadsto \color{blue}{1} \]
                                      7. Step-by-step derivation
                                        1. Simplified40.9%

                                          \[\leadsto \color{blue}{1} \]

                                        if 1.05e10 < y

                                        1. Initial program 100.0%

                                          \[\cos x \cdot \frac{\sinh y}{y} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in y around 0

                                          \[\leadsto \color{blue}{\cos x} \]
                                        4. Step-by-step derivation
                                          1. cos-lowering-cos.f643.1%

                                            \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                                        5. Simplified3.1%

                                          \[\leadsto \color{blue}{\cos x} \]
                                        6. Taylor expanded in x around 0

                                          \[\leadsto \color{blue}{1 + {x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)} \]
                                        7. Step-by-step derivation
                                          1. +-lowering-+.f64N/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right) \]
                                          2. unpow2N/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{1}{24} \cdot {x}^{2}} - \frac{1}{2}\right)\right)\right) \]
                                          3. associate-*l*N/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)\right)}\right)\right) \]
                                          4. *-commutativeN/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \left(x \cdot \left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot \color{blue}{x}\right)\right)\right) \]
                                          5. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\left(\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right) \cdot x\right)}\right)\right) \]
                                          6. *-commutativeN/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \left(x \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                          7. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2} - \frac{1}{2}\right)}\right)\right)\right) \]
                                          8. sub-negN/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
                                          9. metadata-evalN/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{24} \cdot {x}^{2} + \frac{-1}{2}\right)\right)\right)\right) \]
                                          10. +-commutativeN/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{-1}{2} + \color{blue}{\frac{1}{24} \cdot {x}^{2}}\right)\right)\right)\right) \]
                                          11. +-lowering-+.f64N/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right)\right) \]
                                          12. *-commutativeN/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                          13. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                          14. unpow2N/A

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                          15. *-lowering-*.f6413.2%

                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                        8. Simplified13.2%

                                          \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(-0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                                        9. Taylor expanded in x around inf

                                          \[\leadsto \color{blue}{{x}^{4} \cdot \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)} \]
                                        10. Step-by-step derivation
                                          1. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(\left({x}^{4}\right), \color{blue}{\left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)}\right) \]
                                          2. metadata-evalN/A

                                            \[\leadsto \mathsf{*.f64}\left(\left({x}^{\left(2 \cdot 2\right)}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          3. pow-sqrN/A

                                            \[\leadsto \mathsf{*.f64}\left(\left({x}^{2} \cdot {x}^{2}\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          4. unpow2N/A

                                            \[\leadsto \mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot {x}^{2}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          5. associate-*l*N/A

                                            \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot {x}^{2}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          6. unpow2N/A

                                            \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          7. cube-multN/A

                                            \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{3}\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          8. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{3}\right)\right), \left(\color{blue}{\frac{1}{24}} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          9. cube-multN/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          10. unpow2N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot {x}^{2}\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          11. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          12. unpow2N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          13. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} - \frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right) \]
                                          14. sub-negN/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{24} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                          15. +-lowering-+.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{{x}^{2}}\right)\right)}\right)\right) \]
                                          16. associate-*r/N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{{x}^{2}}\right)\right)\right)\right) \]
                                          17. metadata-evalN/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{{x}^{2}}\right)\right)\right)\right) \]
                                          18. distribute-neg-fracN/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{\color{blue}{{x}^{2}}}\right)\right)\right) \]
                                          19. metadata-evalN/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{\frac{-1}{2}}{{\color{blue}{x}}^{2}}\right)\right)\right) \]
                                          20. /-lowering-/.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
                                          21. unpow2N/A

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                                          22. *-lowering-*.f6411.7%

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                                        11. Simplified11.7%

                                          \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.041666666666666664 + \frac{-0.5}{x \cdot x}\right)} \]
                                        12. Taylor expanded in x around 0

                                          \[\leadsto \color{blue}{\frac{-1}{2} \cdot {x}^{2}} \]
                                        13. Step-by-step derivation
                                          1. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left({x}^{2}\right)}\right) \]
                                          2. unpow2N/A

                                            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \left(x \cdot \color{blue}{x}\right)\right) \]
                                          3. *-lowering-*.f6418.1%

                                            \[\leadsto \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                                        14. Simplified18.1%

                                          \[\leadsto \color{blue}{-0.5 \cdot \left(x \cdot x\right)} \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification36.1%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 10500000000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot -0.5\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 18: 27.5% accurate, 205.0× speedup?

                                      \[\begin{array}{l} \\ 1 \end{array} \]
                                      (FPCore (x y) :precision binary64 1.0)
                                      double code(double x, double y) {
                                      	return 1.0;
                                      }
                                      
                                      real(8) function code(x, y)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          code = 1.0d0
                                      end function
                                      
                                      public static double code(double x, double y) {
                                      	return 1.0;
                                      }
                                      
                                      def code(x, y):
                                      	return 1.0
                                      
                                      function code(x, y)
                                      	return 1.0
                                      end
                                      
                                      function tmp = code(x, y)
                                      	tmp = 1.0;
                                      end
                                      
                                      code[x_, y_] := 1.0
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      1
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 100.0%

                                        \[\cos x \cdot \frac{\sinh y}{y} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in y around 0

                                        \[\leadsto \color{blue}{\cos x} \]
                                      4. Step-by-step derivation
                                        1. cos-lowering-cos.f6454.3%

                                          \[\leadsto \mathsf{cos.f64}\left(x\right) \]
                                      5. Simplified54.3%

                                        \[\leadsto \color{blue}{\cos x} \]
                                      6. Taylor expanded in x around 0

                                        \[\leadsto \color{blue}{1} \]
                                      7. Step-by-step derivation
                                        1. Simplified32.8%

                                          \[\leadsto \color{blue}{1} \]
                                        2. Add Preprocessing

                                        Reproduce

                                        ?
                                        herbie shell --seed 2024145 
                                        (FPCore (x y)
                                          :name "Linear.Quaternion:$csin from linear-1.19.1.3"
                                          :precision binary64
                                          (* (cos x) (/ (sinh y) y)))