Linear.Quaternion:$csinh from linear-1.19.1.3

Percentage Accurate: 99.9% → 99.9%
Time: 11.1s
Alternatives: 21
Speedup: 1.0×

Specification

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

\\
\cosh x \cdot \frac{\sin 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 21 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: 99.9% accurate, 1.0× speedup?

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

\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}

Alternative 1: 99.9% accurate, 1.0× speedup?

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

\\
\frac{\cosh x \cdot \sin y}{y}
\end{array}
Derivation
  1. Initial program 99.9%

    \[\cosh x \cdot \frac{\sin y}{y} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\cosh x \cdot \sin y}{\color{blue}{y}} \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\cosh x \cdot \sin y\right), \color{blue}{y}\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, \sin y\right), y\right) \]
    4. cosh-lowering-cosh.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \sin y\right), y\right) \]
    5. sin-lowering-sin.f6499.9%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{sin.f64}\left(y\right)\right), y\right) \]
  4. Applied egg-rr99.9%

    \[\leadsto \color{blue}{\frac{\cosh x \cdot \sin y}{y}} \]
  5. Add Preprocessing

Alternative 2: 99.9% accurate, 1.0× speedup?

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

\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Derivation
  1. Initial program 99.9%

    \[\cosh x \cdot \frac{\sin y}{y} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 3: 92.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot x\right)\\ t_1 := \frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\ t_2 := \left(x \cdot x\right) \cdot 0.001388888888888889\\ \mathbf{if}\;x \leq 0.125:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{+41}:\\ \;\;\;\;\frac{\cosh x \cdot y}{y}\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+77}:\\ \;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + t\_0 \cdot \left(t\_0 \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + t\_2 \cdot \left(t\_2 - 0.041666666666666664\right)}\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* x (* x x)))
        (t_1
         (*
          (/ (sin y) y)
          (+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664)))))))
        (t_2 (* (* x x) 0.001388888888888889)))
   (if (<= x 0.125)
     t_1
     (if (<= x 5.5e+41)
       (/ (* (cosh x) y) y)
       (if (<= x 2.6e+77)
         (*
          (+
           1.0
           (*
            (* x x)
            (+
             0.5
             (/
              (*
               (* x x)
               (+ 7.233796296296296e-5 (* t_0 (* t_0 2.6791838134430728e-9))))
              (+ 0.001736111111111111 (* t_2 (- t_2 0.041666666666666664)))))))
          (+ 1.0 (* (* y y) -0.16666666666666666)))
         t_1)))))
double code(double x, double y) {
	double t_0 = x * (x * x);
	double t_1 = (sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664)))));
	double t_2 = (x * x) * 0.001388888888888889;
	double tmp;
	if (x <= 0.125) {
		tmp = t_1;
	} else if (x <= 5.5e+41) {
		tmp = (cosh(x) * y) / y;
	} else if (x <= 2.6e+77) {
		tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_2 * (t_2 - 0.041666666666666664))))))) * (1.0 + ((y * y) * -0.16666666666666666));
	} else {
		tmp = t_1;
	}
	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) :: t_2
    real(8) :: tmp
    t_0 = x * (x * x)
    t_1 = (sin(y) / y) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0)))))
    t_2 = (x * x) * 0.001388888888888889d0
    if (x <= 0.125d0) then
        tmp = t_1
    else if (x <= 5.5d+41) then
        tmp = (cosh(x) * y) / y
    else if (x <= 2.6d+77) then
        tmp = (1.0d0 + ((x * x) * (0.5d0 + (((x * x) * (7.233796296296296d-5 + (t_0 * (t_0 * 2.6791838134430728d-9)))) / (0.001736111111111111d0 + (t_2 * (t_2 - 0.041666666666666664d0))))))) * (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = x * (x * x);
	double t_1 = (Math.sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664)))));
	double t_2 = (x * x) * 0.001388888888888889;
	double tmp;
	if (x <= 0.125) {
		tmp = t_1;
	} else if (x <= 5.5e+41) {
		tmp = (Math.cosh(x) * y) / y;
	} else if (x <= 2.6e+77) {
		tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_2 * (t_2 - 0.041666666666666664))))))) * (1.0 + ((y * y) * -0.16666666666666666));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y):
	t_0 = x * (x * x)
	t_1 = (math.sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664)))))
	t_2 = (x * x) * 0.001388888888888889
	tmp = 0
	if x <= 0.125:
		tmp = t_1
	elif x <= 5.5e+41:
		tmp = (math.cosh(x) * y) / y
	elif x <= 2.6e+77:
		tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_2 * (t_2 - 0.041666666666666664))))))) * (1.0 + ((y * y) * -0.16666666666666666))
	else:
		tmp = t_1
	return tmp
function code(x, y)
	t_0 = Float64(x * Float64(x * x))
	t_1 = Float64(Float64(sin(y) / y) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))))
	t_2 = Float64(Float64(x * x) * 0.001388888888888889)
	tmp = 0.0
	if (x <= 0.125)
		tmp = t_1;
	elseif (x <= 5.5e+41)
		tmp = Float64(Float64(cosh(x) * y) / y);
	elseif (x <= 2.6e+77)
		tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(Float64(x * x) * Float64(7.233796296296296e-5 + Float64(t_0 * Float64(t_0 * 2.6791838134430728e-9)))) / Float64(0.001736111111111111 + Float64(t_2 * Float64(t_2 - 0.041666666666666664))))))) * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = x * (x * x);
	t_1 = (sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664)))));
	t_2 = (x * x) * 0.001388888888888889;
	tmp = 0.0;
	if (x <= 0.125)
		tmp = t_1;
	elseif (x <= 5.5e+41)
		tmp = (cosh(x) * y) / y;
	elseif (x <= 2.6e+77)
		tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_2 * (t_2 - 0.041666666666666664))))))) * (1.0 + ((y * y) * -0.16666666666666666));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]}, If[LessEqual[x, 0.125], t$95$1, If[LessEqual[x, 5.5e+41], N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 2.6e+77], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(N[(x * x), $MachinePrecision] * N[(7.233796296296296e-5 + N[(t$95$0 * N[(t$95$0 * 2.6791838134430728e-9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.001736111111111111 + N[(t$95$2 * N[(t$95$2 - 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := \frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\
t_2 := \left(x \cdot x\right) \cdot 0.001388888888888889\\
\mathbf{if}\;x \leq 0.125:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 5.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{\cosh x \cdot y}{y}\\

\mathbf{elif}\;x \leq 2.6 \cdot 10^{+77}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + t\_0 \cdot \left(t\_0 \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + t\_2 \cdot \left(t\_2 - 0.041666666666666664\right)}\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 0.125 or 2.6000000000000002e77 < x

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + {x}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right)\right)}, \mathsf{/.f64}\left(\mathsf{sin.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({x}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{sin.f64}\left(y\right)}, y\right)\right) \]
      2. *-lowering-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      10. *-lowering-*.f6491.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
    5. Simplified91.8%

      \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)} \cdot \frac{\sin y}{y} \]

    if 0.125 < x < 5.5000000000000003e41

    1. Initial program 99.8%

      \[\cosh x \cdot \frac{\sin y}{y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\cosh x \cdot \sin y}{\color{blue}{y}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\cosh x \cdot \sin y\right), \color{blue}{y}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, \sin y\right), y\right) \]
      4. cosh-lowering-cosh.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \sin y\right), y\right) \]
      5. sin-lowering-sin.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{sin.f64}\left(y\right)\right), y\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\frac{\cosh x \cdot \sin y}{y}} \]
    5. Taylor expanded in y around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{y}\right), y\right) \]
    6. Step-by-step derivation
      1. Simplified100.0%

        \[\leadsto \frac{\cosh x \cdot \color{blue}{y}}{y} \]

      if 5.5000000000000003e41 < x < 2.6000000000000002e77

      1. Initial program 100.0%

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
        5. *-lowering-*.f6475.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
      5. Simplified75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
        14. *-lowering-*.f6429.0%

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

        \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]
      9. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(x \cdot x\right) \cdot \left(\frac{1}{24} + \left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
        2. flip3-+N/A

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(\left(\left(x \cdot x\right) \cdot \left({\frac{1}{24}}^{3} + {\left(\left(x \cdot x\right) \cdot \frac{1}{720}\right)}^{3}\right)\right), \left(\frac{1}{24} \cdot \frac{1}{24} + \left(\left(\left(x \cdot x\right) \cdot \frac{1}{720}\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{720}\right) - \frac{1}{24} \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
      10. Applied egg-rr75.0%

        \[\leadsto \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \color{blue}{\frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + \left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889 - 0.041666666666666664\right)}}\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]
    7. Recombined 3 regimes into one program.
    8. Final simplification91.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.125:\\ \;\;\;\;\frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{+41}:\\ \;\;\;\;\frac{\cosh x \cdot y}{y}\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+77}:\\ \;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + \left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889 - 0.041666666666666664\right)}\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 4: 84.7% accurate, 1.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\ \mathbf{if}\;x \leq 0.04:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+41}:\\ \;\;\;\;\frac{\cosh x \cdot y}{y}\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{+154}:\\ \;\;\;\;\cosh x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (let* ((t_0 (* (/ (sin y) y) (+ 1.0 (* (* x x) 0.5)))))
       (if (<= x 0.04)
         t_0
         (if (<= x 3.3e+41)
           (/ (* (cosh x) y) y)
           (if (<= x 1.32e+154)
             (* (cosh x) (+ 1.0 (* (* y y) -0.16666666666666666)))
             t_0)))))
    double code(double x, double y) {
    	double t_0 = (sin(y) / y) * (1.0 + ((x * x) * 0.5));
    	double tmp;
    	if (x <= 0.04) {
    		tmp = t_0;
    	} else if (x <= 3.3e+41) {
    		tmp = (cosh(x) * y) / y;
    	} else if (x <= 1.32e+154) {
    		tmp = cosh(x) * (1.0 + ((y * y) * -0.16666666666666666));
    	} 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 = (sin(y) / y) * (1.0d0 + ((x * x) * 0.5d0))
        if (x <= 0.04d0) then
            tmp = t_0
        else if (x <= 3.3d+41) then
            tmp = (cosh(x) * y) / y
        else if (x <= 1.32d+154) then
            tmp = cosh(x) * (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double t_0 = (Math.sin(y) / y) * (1.0 + ((x * x) * 0.5));
    	double tmp;
    	if (x <= 0.04) {
    		tmp = t_0;
    	} else if (x <= 3.3e+41) {
    		tmp = (Math.cosh(x) * y) / y;
    	} else if (x <= 1.32e+154) {
    		tmp = Math.cosh(x) * (1.0 + ((y * y) * -0.16666666666666666));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y):
    	t_0 = (math.sin(y) / y) * (1.0 + ((x * x) * 0.5))
    	tmp = 0
    	if x <= 0.04:
    		tmp = t_0
    	elif x <= 3.3e+41:
    		tmp = (math.cosh(x) * y) / y
    	elif x <= 1.32e+154:
    		tmp = math.cosh(x) * (1.0 + ((y * y) * -0.16666666666666666))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y)
    	t_0 = Float64(Float64(sin(y) / y) * Float64(1.0 + Float64(Float64(x * x) * 0.5)))
    	tmp = 0.0
    	if (x <= 0.04)
    		tmp = t_0;
    	elseif (x <= 3.3e+41)
    		tmp = Float64(Float64(cosh(x) * y) / y);
    	elseif (x <= 1.32e+154)
    		tmp = Float64(cosh(x) * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	t_0 = (sin(y) / y) * (1.0 + ((x * x) * 0.5));
    	tmp = 0.0;
    	if (x <= 0.04)
    		tmp = t_0;
    	elseif (x <= 3.3e+41)
    		tmp = (cosh(x) * y) / y;
    	elseif (x <= 1.32e+154)
    		tmp = cosh(x) * (1.0 + ((y * y) * -0.16666666666666666));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.04], t$95$0, If[LessEqual[x, 3.3e+41], N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 1.32e+154], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\
    \mathbf{if}\;x \leq 0.04:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;x \leq 3.3 \cdot 10^{+41}:\\
    \;\;\;\;\frac{\cosh x \cdot y}{y}\\
    
    \mathbf{elif}\;x \leq 1.32 \cdot 10^{+154}:\\
    \;\;\;\;\cosh x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if x < 0.0400000000000000008 or 1.31999999999999998e154 < x

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{{x}^{2} \cdot \sin y}{y} + \frac{\sin y}{y}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \left(\frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{\sin y}{y} + \frac{\sin \color{blue}{y}}{y} \]
        7. distribute-lft1-inN/A

          \[\leadsto \left(\frac{1}{2} \cdot {x}^{2} + 1\right) \cdot \color{blue}{\frac{\sin y}{y}} \]
        8. +-commutativeN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(\sin y, \color{blue}{y}\right)\right) \]
        15. sin-lowering-sin.f6483.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      5. Simplified83.8%

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

      if 0.0400000000000000008 < x < 3.3e41

      1. Initial program 99.8%

        \[\cosh x \cdot \frac{\sin y}{y} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \frac{\cosh x \cdot \sin y}{\color{blue}{y}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\cosh x \cdot \sin y\right), \color{blue}{y}\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, \sin y\right), y\right) \]
        4. cosh-lowering-cosh.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \sin y\right), y\right) \]
        5. sin-lowering-sin.f64100.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{sin.f64}\left(y\right)\right), y\right) \]
      4. Applied egg-rr100.0%

        \[\leadsto \color{blue}{\frac{\cosh x \cdot \sin y}{y}} \]
      5. Taylor expanded in y around 0

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{y}\right), y\right) \]
      6. Step-by-step derivation
        1. Simplified100.0%

          \[\leadsto \frac{\cosh x \cdot \color{blue}{y}}{y} \]

        if 3.3e41 < x < 1.31999999999999998e154

        1. Initial program 100.0%

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
          5. *-lowering-*.f6491.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
        5. Simplified91.7%

          \[\leadsto \cosh x \cdot \color{blue}{\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)} \]
      7. Recombined 3 regimes into one program.
      8. Final simplification85.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.04:\\ \;\;\;\;\frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+41}:\\ \;\;\;\;\frac{\cosh x \cdot y}{y}\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{+154}:\\ \;\;\;\;\cosh x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 5: 69.3% accurate, 1.7× speedup?

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

        1. Initial program 99.9%

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

          \[\leadsto \color{blue}{\frac{\sin y}{y}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\sin y, \color{blue}{y}\right) \]
          2. sin-lowering-sin.f6459.2%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right) \]
        5. Simplified59.2%

          \[\leadsto \color{blue}{\frac{\sin y}{y}} \]

        if 0.014999999999999999 < x < 4.00000000000000002e41

        1. Initial program 99.8%

          \[\cosh x \cdot \frac{\sin y}{y} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \frac{\cosh x \cdot \sin y}{\color{blue}{y}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\cosh x \cdot \sin y\right), \color{blue}{y}\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, \sin y\right), y\right) \]
          4. cosh-lowering-cosh.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \sin y\right), y\right) \]
          5. sin-lowering-sin.f64100.0%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{sin.f64}\left(y\right)\right), y\right) \]
        4. Applied egg-rr100.0%

          \[\leadsto \color{blue}{\frac{\cosh x \cdot \sin y}{y}} \]
        5. Taylor expanded in y around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{y}\right), y\right) \]
        6. Step-by-step derivation
          1. Simplified100.0%

            \[\leadsto \frac{\cosh x \cdot \color{blue}{y}}{y} \]

          if 4.00000000000000002e41 < x

          1. Initial program 100.0%

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
            5. *-lowering-*.f6486.8%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
          5. Simplified86.8%

            \[\leadsto \cosh x \cdot \color{blue}{\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 6: 69.2% accurate, 1.8× speedup?

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

          1. Initial program 99.9%

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

            \[\leadsto \color{blue}{\frac{\sin y}{y}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\sin y, \color{blue}{y}\right) \]
            2. sin-lowering-sin.f6459.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right) \]
          5. Simplified59.2%

            \[\leadsto \color{blue}{\frac{\sin y}{y}} \]

          if 0.00949999999999999976 < x < 7.20000000000000022e51

          1. Initial program 99.9%

            \[\cosh x \cdot \frac{\sin y}{y} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \frac{\cosh x \cdot \sin y}{\color{blue}{y}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\cosh x \cdot \sin y\right), \color{blue}{y}\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, \sin y\right), y\right) \]
            4. cosh-lowering-cosh.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \sin y\right), y\right) \]
            5. sin-lowering-sin.f64100.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{sin.f64}\left(y\right)\right), y\right) \]
          4. Applied egg-rr100.0%

            \[\leadsto \color{blue}{\frac{\cosh x \cdot \sin y}{y}} \]
          5. Taylor expanded in y around 0

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{y}\right), y\right) \]
          6. Step-by-step derivation
            1. Simplified90.9%

              \[\leadsto \frac{\cosh x \cdot \color{blue}{y}}{y} \]

            if 7.20000000000000022e51 < x

            1. Initial program 100.0%

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
            5. Simplified85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
              14. *-lowering-*.f6485.7%

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

              \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]
          7. Recombined 3 regimes into one program.
          8. Final simplification65.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.0095:\\ \;\;\;\;\frac{\sin y}{y}\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{+51}:\\ \;\;\;\;\frac{\cosh x \cdot y}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 7: 69.3% accurate, 1.8× speedup?

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

            1. Initial program 99.9%

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

              \[\leadsto \color{blue}{\frac{\sin y}{y}} \]
            4. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\sin y, \color{blue}{y}\right) \]
              2. sin-lowering-sin.f6459.2%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right) \]
            5. Simplified59.2%

              \[\leadsto \color{blue}{\frac{\sin y}{y}} \]

            if 0.0050000000000000001 < x < 8e51

            1. Initial program 99.9%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
            4. Step-by-step derivation
              1. Simplified90.8%

                \[\leadsto \cosh x \cdot \color{blue}{1} \]
              2. Step-by-step derivation
                1. *-rgt-identityN/A

                  \[\leadsto \cosh x \]
                2. cosh-lowering-cosh.f6490.8%

                  \[\leadsto \mathsf{cosh.f64}\left(x\right) \]
              3. Applied egg-rr90.8%

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

              if 8e51 < x

              1. Initial program 100.0%

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
              5. Simplified85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                14. *-lowering-*.f6485.7%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.005:\\ \;\;\;\;\frac{\sin y}{y}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+51}:\\ \;\;\;\;\cosh x\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\ \end{array} \]
            7. Add Preprocessing

            Alternative 8: 62.9% accurate, 1.9× speedup?

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

              1. Initial program 99.9%

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
              4. Step-by-step derivation
                1. Simplified59.1%

                  \[\leadsto \cosh x \cdot \color{blue}{1} \]
                2. Step-by-step derivation
                  1. *-rgt-identityN/A

                    \[\leadsto \cosh x \]
                  2. cosh-lowering-cosh.f6459.1%

                    \[\leadsto \mathsf{cosh.f64}\left(x\right) \]
                3. Applied egg-rr59.1%

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

                if 7.20000000000000022e51 < x

                1. Initial program 100.0%

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                5. Simplified85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                  14. *-lowering-*.f6485.7%

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

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

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

              Alternative 9: 46.2% accurate, 3.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot x\right)\\ t_1 := \left(x \cdot x\right) \cdot 0.001388888888888889\\ t_2 := 1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\ \mathbf{if}\;x \leq 1.12 \cdot 10^{+77}:\\ \;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + t\_0 \cdot \left(t\_0 \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + t\_1 \cdot \left(t\_1 - 0.041666666666666664\right)}\right)\right) \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot t\_2\\ \end{array} \end{array} \]
              (FPCore (x y)
               :precision binary64
               (let* ((t_0 (* x (* x x)))
                      (t_1 (* (* x x) 0.001388888888888889))
                      (t_2 (+ 1.0 (* (* y y) -0.16666666666666666))))
                 (if (<= x 1.12e+77)
                   (*
                    (+
                     1.0
                     (*
                      (* x x)
                      (+
                       0.5
                       (/
                        (*
                         (* x x)
                         (+ 7.233796296296296e-5 (* t_0 (* t_0 2.6791838134430728e-9))))
                        (+ 0.001736111111111111 (* t_1 (- t_1 0.041666666666666664)))))))
                    t_2)
                   (* (+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664))))) t_2))))
              double code(double x, double y) {
              	double t_0 = x * (x * x);
              	double t_1 = (x * x) * 0.001388888888888889;
              	double t_2 = 1.0 + ((y * y) * -0.16666666666666666);
              	double tmp;
              	if (x <= 1.12e+77) {
              		tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_1 * (t_1 - 0.041666666666666664))))))) * t_2;
              	} else {
              		tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * t_2;
              	}
              	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) :: t_2
                  real(8) :: tmp
                  t_0 = x * (x * x)
                  t_1 = (x * x) * 0.001388888888888889d0
                  t_2 = 1.0d0 + ((y * y) * (-0.16666666666666666d0))
                  if (x <= 1.12d+77) then
                      tmp = (1.0d0 + ((x * x) * (0.5d0 + (((x * x) * (7.233796296296296d-5 + (t_0 * (t_0 * 2.6791838134430728d-9)))) / (0.001736111111111111d0 + (t_1 * (t_1 - 0.041666666666666664d0))))))) * t_2
                  else
                      tmp = (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0))))) * t_2
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y) {
              	double t_0 = x * (x * x);
              	double t_1 = (x * x) * 0.001388888888888889;
              	double t_2 = 1.0 + ((y * y) * -0.16666666666666666);
              	double tmp;
              	if (x <= 1.12e+77) {
              		tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_1 * (t_1 - 0.041666666666666664))))))) * t_2;
              	} else {
              		tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * t_2;
              	}
              	return tmp;
              }
              
              def code(x, y):
              	t_0 = x * (x * x)
              	t_1 = (x * x) * 0.001388888888888889
              	t_2 = 1.0 + ((y * y) * -0.16666666666666666)
              	tmp = 0
              	if x <= 1.12e+77:
              		tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_1 * (t_1 - 0.041666666666666664))))))) * t_2
              	else:
              		tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * t_2
              	return tmp
              
              function code(x, y)
              	t_0 = Float64(x * Float64(x * x))
              	t_1 = Float64(Float64(x * x) * 0.001388888888888889)
              	t_2 = Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666))
              	tmp = 0.0
              	if (x <= 1.12e+77)
              		tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(Float64(x * x) * Float64(7.233796296296296e-5 + Float64(t_0 * Float64(t_0 * 2.6791838134430728e-9)))) / Float64(0.001736111111111111 + Float64(t_1 * Float64(t_1 - 0.041666666666666664))))))) * t_2);
              	else
              		tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))) * t_2);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y)
              	t_0 = x * (x * x);
              	t_1 = (x * x) * 0.001388888888888889;
              	t_2 = 1.0 + ((y * y) * -0.16666666666666666);
              	tmp = 0.0;
              	if (x <= 1.12e+77)
              		tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_1 * (t_1 - 0.041666666666666664))))))) * t_2;
              	else
              		tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * t_2;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.12e+77], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(N[(x * x), $MachinePrecision] * N[(7.233796296296296e-5 + N[(t$95$0 * N[(t$95$0 * 2.6791838134430728e-9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.001736111111111111 + N[(t$95$1 * N[(t$95$1 - 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := x \cdot \left(x \cdot x\right)\\
              t_1 := \left(x \cdot x\right) \cdot 0.001388888888888889\\
              t_2 := 1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\
              \mathbf{if}\;x \leq 1.12 \cdot 10^{+77}:\\
              \;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + t\_0 \cdot \left(t\_0 \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + t\_1 \cdot \left(t\_1 - 0.041666666666666664\right)}\right)\right) \cdot t\_2\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot t\_2\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < 1.1199999999999999e77

                1. Initial program 99.9%

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                5. Simplified58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                  14. *-lowering-*.f6452.5%

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

                  \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]
                9. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(x \cdot x\right) \cdot \left(\frac{1}{24} + \left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                  2. flip3-+N/A

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(\left(\left(x \cdot x\right) \cdot \left({\frac{1}{24}}^{3} + {\left(\left(x \cdot x\right) \cdot \frac{1}{720}\right)}^{3}\right)\right), \left(\frac{1}{24} \cdot \frac{1}{24} + \left(\left(\left(x \cdot x\right) \cdot \frac{1}{720}\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{720}\right) - \frac{1}{24} \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                10. Applied egg-rr34.2%

                  \[\leadsto \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \color{blue}{\frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + \left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889 - 0.041666666666666664\right)}}\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]

                if 1.1199999999999999e77 < x

                1. Initial program 100.0%

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

                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + {x}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right)\right)}, \mathsf{/.f64}\left(\mathsf{sin.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({x}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{sin.f64}\left(y\right)}, y\right)\right) \]
                  2. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
                  10. *-lowering-*.f6497.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right) \]
                8. Simplified89.1%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.12 \cdot 10^{+77}:\\ \;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + \left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889 - 0.041666666666666664\right)}\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 10: 59.2% accurate, 6.6× speedup?

              \[\begin{array}{l} \\ \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(\left(1 + x \cdot \left(x \cdot 0.5\right)\right) + \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right) \end{array} \]
              (FPCore (x y)
               :precision binary64
               (*
                (+ 1.0 (* (* y y) -0.16666666666666666))
                (+
                 (+ 1.0 (* x (* x 0.5)))
                 (*
                  (* x x)
                  (* (* x x) (+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))
              double code(double x, double y) {
              	return (1.0 + ((y * y) * -0.16666666666666666)) * ((1.0 + (x * (x * 0.5))) + ((x * x) * ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))));
              }
              
              real(8) function code(x, y)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  code = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * ((1.0d0 + (x * (x * 0.5d0))) + ((x * x) * ((x * x) * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))
              end function
              
              public static double code(double x, double y) {
              	return (1.0 + ((y * y) * -0.16666666666666666)) * ((1.0 + (x * (x * 0.5))) + ((x * x) * ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))));
              }
              
              def code(x, y):
              	return (1.0 + ((y * y) * -0.16666666666666666)) * ((1.0 + (x * (x * 0.5))) + ((x * x) * ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))
              
              function code(x, y)
              	return Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(Float64(1.0 + Float64(x * Float64(x * 0.5))) + Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889))))))
              end
              
              function tmp = code(x, y)
              	tmp = (1.0 + ((y * y) * -0.16666666666666666)) * ((1.0 + (x * (x * 0.5))) + ((x * x) * ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))));
              end
              
              code[x_, y_] := N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(\left(1 + x \cdot \left(x \cdot 0.5\right)\right) + \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)
              \end{array}
              
              Derivation
              1. Initial program 99.9%

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
                5. *-lowering-*.f6463.8%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
              5. Simplified63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]
              9. Step-by-step derivation
                1. distribute-rgt-inN/A

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot \left(x \cdot x\right)\right)\right), \left(\left(x \cdot \left(x \cdot \left(\frac{1}{24} + \left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                5. associate-*r*N/A

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{2}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(x \cdot \left(x \cdot \left(\frac{1}{24} + \left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                13. associate-*r*N/A

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{2}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
              10. Applied egg-rr59.1%

                \[\leadsto \color{blue}{\left(\left(1 + x \cdot \left(x \cdot 0.5\right)\right) + \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)} \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]
              11. Final simplification59.1%

                \[\leadsto \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(\left(1 + x \cdot \left(x \cdot 0.5\right)\right) + \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right) \]
              12. Add Preprocessing

              Alternative 11: 59.2% accurate, 7.6× speedup?

              \[\begin{array}{l} \\ \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right) \end{array} \]
              (FPCore (x y)
               :precision binary64
               (*
                (+ 1.0 (* (* y y) -0.16666666666666666))
                (+
                 1.0
                 (*
                  (* x x)
                  (+
                   0.5
                   (* x (* x (+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))))
              double code(double x, double y) {
              	return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
              }
              
              real(8) function code(x, y)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  code = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))))
              end function
              
              public static double code(double x, double y) {
              	return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
              }
              
              def code(x, y):
              	return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))))
              
              function code(x, y)
              	return Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889))))))))
              end
              
              function tmp = code(x, y)
              	tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
              end
              
              code[x_, y_] := N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)
              \end{array}
              
              Derivation
              1. Initial program 99.9%

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
                5. *-lowering-*.f6463.8%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
              5. Simplified63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]
              9. Final simplification59.1%

                \[\leadsto \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right) \]
              10. Add Preprocessing

              Alternative 12: 57.7% accurate, 8.5× speedup?

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

                1. Initial program 100.0%

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                5. Simplified74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                  14. *-lowering-*.f6467.8%

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}\right)\right)\right) \]
                  6. +-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({x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}\right)\right)\right)\right) \]
                  7. *-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}{\left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)}\right)\right)\right)\right)\right) \]
                  8. 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), \left(\color{blue}{\frac{1}{24}} + \frac{1}{720} \cdot {x}^{2}\right)\right)\right)\right)\right)\right) \]
                  9. *-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(\mathsf{*.f64}\left(x, x\right), \left(\color{blue}{\frac{1}{24}} + \frac{1}{720} \cdot {x}^{2}\right)\right)\right)\right)\right)\right) \]
                  10. +-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(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\frac{1}{720} \cdot {x}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
                  11. *-commutativeN/A

                    \[\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), \mathsf{+.f64}\left(\frac{1}{24}, \left({x}^{2} \cdot \color{blue}{\frac{1}{720}}\right)\right)\right)\right)\right)\right)\right) \]
                  12. unpow2N/A

                    \[\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), \mathsf{+.f64}\left(\frac{1}{24}, \left(\left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right)\right)\right)\right)\right) \]
                  13. associate-*l*N/A

                    \[\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), \mathsf{+.f64}\left(\frac{1}{24}, \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{720}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                  14. *-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(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \color{blue}{\left(x \cdot \frac{1}{720}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                  15. *-lowering-*.f6465.5%

                    \[\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), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\frac{1}{720}}\right)\right)\right)\right)\right)\right)\right)\right) \]
                11. Simplified65.5%

                  \[\leadsto \color{blue}{1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)} \]

                if 380 < y

                1. Initial program 99.9%

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
                  5. *-lowering-*.f6433.3%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                5. Simplified33.3%

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

                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{1}{2} \cdot {x}^{2}\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                7. 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}{1}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                  2. *-lowering-*.f64N/A

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                8. Simplified30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{12}, \left(y \cdot \color{blue}{y}\right)\right)\right)\right)\right) \]
                  15. *-lowering-*.f6430.8%

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right)\right)\right) \]
                11. Simplified30.8%

                  \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(0.5 + -0.08333333333333333 \cdot \left(y \cdot y\right)\right)\right)} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification56.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 380:\\ \;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(x \cdot \left(0.5 + \left(y \cdot y\right) \cdot -0.08333333333333333\right)\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 13: 44.5% accurate, 9.7× speedup?

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

                1. Initial program 99.9%

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
                  5. *-lowering-*.f6458.4%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                5. Simplified58.4%

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

                  \[\leadsto \color{blue}{1 + \frac{-1}{6} \cdot {y}^{2}} \]
                7. 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. *-commutativeN/A

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right) \]
                8. Simplified32.4%

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

                if 1.7500000000000001e77 < x < 4.80000000000000024e149

                1. Initial program 100.0%

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
                4. Step-by-step derivation
                  1. Simplified64.3%

                    \[\leadsto \cosh x \cdot \color{blue}{1} \]
                  2. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                  4. Simplified64.3%

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

                    \[\leadsto \color{blue}{\frac{1}{24} \cdot {x}^{4}} \]
                  6. 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. *-lowering-*.f64N/A

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

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

                      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right) \]
                    10. *-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) \]
                    11. 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) \]
                    12. *-lowering-*.f6464.3%

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

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

                  if 4.80000000000000024e149 < x

                  1. Initial program 100.0%

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
                    5. *-lowering-*.f6483.9%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                  5. Simplified83.9%

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

                    \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{1}{2} \cdot {x}^{2}\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                  7. 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}{1}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                    2. *-lowering-*.f64N/A

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                    4. *-lowering-*.f6483.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{12}, \left(y \cdot \color{blue}{y}\right)\right)\right)\right)\right) \]
                    15. *-lowering-*.f6483.9%

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

                    \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(0.5 + -0.08333333333333333 \cdot \left(y \cdot y\right)\right)\right)} \]
                5. Recombined 3 regimes into one program.
                6. Final simplification40.4%

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

                Alternative 14: 56.9% accurate, 9.8× speedup?

                \[\begin{array}{l} \\ \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \end{array} \]
                (FPCore (x y)
                 :precision binary64
                 (*
                  (+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664)))))
                  (+ 1.0 (* (* y y) -0.16666666666666666))))
                double code(double x, double y) {
                	return (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + ((y * y) * -0.16666666666666666));
                }
                
                real(8) function code(x, y)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    code = (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0))))) * (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
                end function
                
                public static double code(double x, double y) {
                	return (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + ((y * y) * -0.16666666666666666));
                }
                
                def code(x, y):
                	return (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + ((y * y) * -0.16666666666666666))
                
                function code(x, y)
                	return Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))) * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)))
                end
                
                function tmp = code(x, y)
                	tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + ((y * y) * -0.16666666666666666));
                end
                
                code[x_, y_] := N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)
                \end{array}
                
                Derivation
                1. Initial program 99.9%

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

                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + {x}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right)\right)}, \mathsf{/.f64}\left(\mathsf{sin.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({x}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{sin.f64}\left(y\right)}, y\right)\right) \]
                  2. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
                  10. *-lowering-*.f6486.8%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
                5. Simplified86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({x}^{2}\right), \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right)}\right)\right)\right) \]
                8. Simplified58.2%

                  \[\leadsto \color{blue}{\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)} \]
                9. Final simplification58.2%

                  \[\leadsto \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \]
                10. Add Preprocessing

                Alternative 15: 55.3% accurate, 11.4× speedup?

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

                  1. Initial program 100.0%

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

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

                      \[\leadsto \cosh x \cdot \color{blue}{1} \]
                    2. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 380 < y

                    1. Initial program 99.9%

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
                      5. *-lowering-*.f6433.3%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                    5. Simplified33.3%

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

                      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{1}{2} \cdot {x}^{2}\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                    7. 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}{1}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                      2. *-lowering-*.f64N/A

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                    8. Simplified30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{12}, \left(y \cdot \color{blue}{y}\right)\right)\right)\right)\right) \]
                      15. *-lowering-*.f6430.8%

                        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right)\right)\right) \]
                    11. Simplified30.8%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 380:\\ \;\;\;\;1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(x \cdot \left(0.5 + \left(y \cdot y\right) \cdot -0.08333333333333333\right)\right)\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 16: 55.1% accurate, 12.8× speedup?

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

                    1. Initial program 100.0%

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

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

                        \[\leadsto \cosh x \cdot \color{blue}{1} \]
                      2. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 380 < y

                      1. Initial program 99.9%

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
                        5. *-lowering-*.f6433.3%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                      5. Simplified33.3%

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

                        \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{1}{2} \cdot {x}^{2}\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                      7. 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}{1}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                        2. *-lowering-*.f64N/A

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                      8. Simplified30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{12}, \left(y \cdot \color{blue}{y}\right)\right)\right)\right)\right) \]
                        15. *-lowering-*.f6430.8%

                          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right)\right)\right) \]
                      11. Simplified30.8%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 380:\\ \;\;\;\;1 + \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(x \cdot \left(0.5 + \left(y \cdot y\right) \cdot -0.08333333333333333\right)\right)\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 17: 44.5% accurate, 14.6× speedup?

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

                      1. Initial program 99.9%

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(y \cdot y\right), \frac{-1}{6}\right)\right)\right) \]
                        5. *-lowering-*.f6458.4%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                      5. Simplified58.4%

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

                        \[\leadsto \color{blue}{1 + \frac{-1}{6} \cdot {y}^{2}} \]
                      7. 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. *-commutativeN/A

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

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

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

                          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right) \]
                      8. Simplified32.4%

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

                      if 1.9499999999999999e77 < x

                      1. Initial program 100.0%

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
                      4. Step-by-step derivation
                        1. Simplified64.4%

                          \[\leadsto \cosh x \cdot \color{blue}{1} \]
                        2. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{1}{24} \cdot {x}^{4}} \]
                        6. 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. *-lowering-*.f64N/A

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

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

                            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right) \]
                          10. *-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) \]
                          11. 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) \]
                          12. *-lowering-*.f6464.4%

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

                          \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
                      5. Recombined 2 regimes into one program.
                      6. Add Preprocessing

                      Alternative 18: 46.4% accurate, 17.1× speedup?

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

                        1. Initial program 99.9%

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
                        4. Step-by-step derivation
                          1. Simplified65.7%

                            \[\leadsto \cosh x \cdot \color{blue}{1} \]
                          2. Taylor expanded in x around 0

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

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

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

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

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

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

                          if 6.6000000000000001e174 < y

                          1. Initial program 99.9%

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right)\right) \]
                          5. Simplified33.1%

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

                            \[\leadsto \color{blue}{1 + \frac{-1}{6} \cdot {y}^{2}} \]
                          7. 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. *-commutativeN/A

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

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

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

                              \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, y\right), \frac{-1}{6}\right)\right) \]
                          8. Simplified33.1%

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

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

                        Alternative 19: 36.4% accurate, 20.5× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.4:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot 0.5\\ \end{array} \end{array} \]
                        (FPCore (x y) :precision binary64 (if (<= x 1.4) 1.0 (* (* x x) 0.5)))
                        double code(double x, double y) {
                        	double tmp;
                        	if (x <= 1.4) {
                        		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 (x <= 1.4d0) 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 (x <= 1.4) {
                        		tmp = 1.0;
                        	} else {
                        		tmp = (x * x) * 0.5;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y):
                        	tmp = 0
                        	if x <= 1.4:
                        		tmp = 1.0
                        	else:
                        		tmp = (x * x) * 0.5
                        	return tmp
                        
                        function code(x, y)
                        	tmp = 0.0
                        	if (x <= 1.4)
                        		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 (x <= 1.4)
                        		tmp = 1.0;
                        	else
                        		tmp = (x * x) * 0.5;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_] := If[LessEqual[x, 1.4], 1.0, N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq 1.4:\\
                        \;\;\;\;1\\
                        
                        \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.3999999999999999

                          1. Initial program 99.9%

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
                          4. Step-by-step derivation
                            1. Simplified57.3%

                              \[\leadsto \cosh x \cdot \color{blue}{1} \]
                            2. Taylor expanded in x around 0

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

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

                              if 1.3999999999999999 < x

                              1. Initial program 100.0%

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
                              4. Step-by-step derivation
                                1. Simplified68.3%

                                  \[\leadsto \cosh x \cdot \color{blue}{1} \]
                                2. Taylor expanded in x around 0

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
                                6. 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-*.f6435.6%

                                    \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
                                7. Simplified35.6%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.4:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot 0.5\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 20: 45.2% accurate, 29.3× speedup?

                              \[\begin{array}{l} \\ 1 + \left(x \cdot x\right) \cdot 0.5 \end{array} \]
                              (FPCore (x y) :precision binary64 (+ 1.0 (* (* x x) 0.5)))
                              double code(double x, double y) {
                              	return 1.0 + ((x * x) * 0.5);
                              }
                              
                              real(8) function code(x, y)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  code = 1.0d0 + ((x * x) * 0.5d0)
                              end function
                              
                              public static double code(double x, double y) {
                              	return 1.0 + ((x * x) * 0.5);
                              }
                              
                              def code(x, y):
                              	return 1.0 + ((x * x) * 0.5)
                              
                              function code(x, y)
                              	return Float64(1.0 + Float64(Float64(x * x) * 0.5))
                              end
                              
                              function tmp = code(x, y)
                              	tmp = 1.0 + ((x * x) * 0.5);
                              end
                              
                              code[x_, y_] := N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              1 + \left(x \cdot x\right) \cdot 0.5
                              \end{array}
                              
                              Derivation
                              1. Initial program 99.9%

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
                              4. Step-by-step derivation
                                1. Simplified59.9%

                                  \[\leadsto \cosh x \cdot \color{blue}{1} \]
                                2. Taylor expanded in x around 0

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

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

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

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

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

                                  \[\leadsto \color{blue}{1 + 0.5 \cdot \left(x \cdot x\right)} \]
                                5. Final simplification42.4%

                                  \[\leadsto 1 + \left(x \cdot x\right) \cdot 0.5 \]
                                6. Add Preprocessing

                                Alternative 21: 27.3% 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 99.9%

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), \color{blue}{1}\right) \]
                                4. Step-by-step derivation
                                  1. Simplified59.9%

                                    \[\leadsto \cosh x \cdot \color{blue}{1} \]
                                  2. Taylor expanded in x around 0

                                    \[\leadsto \color{blue}{1} \]
                                  3. Step-by-step derivation
                                    1. Simplified22.6%

                                      \[\leadsto \color{blue}{1} \]
                                    2. Add Preprocessing

                                    Developer Target 1: 99.9% accurate, 1.0× speedup?

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

                                    Reproduce

                                    ?
                                    herbie shell --seed 2024138 
                                    (FPCore (x y)
                                      :name "Linear.Quaternion:$csinh from linear-1.19.1.3"
                                      :precision binary64
                                    
                                      :alt
                                      (! :herbie-platform default (/ (* (cosh x) (sin y)) y))
                                    
                                      (* (cosh x) (/ (sin y) y)))