Linear.Quaternion:$csinh from linear-1.19.1.3

Percentage Accurate: 99.9% → 99.9%
Time: 11.3s
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{\sin y}{\frac{y}{\cosh x}} \end{array} \]
(FPCore (x y) :precision binary64 (/ (sin y) (/ y (cosh x))))
double code(double x, double y) {
	return sin(y) / (y / cosh(x));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = sin(y) / (y / cosh(x))
end function
public static double code(double x, double y) {
	return Math.sin(y) / (y / Math.cosh(x));
}
def code(x, y):
	return math.sin(y) / (y / math.cosh(x))
function code(x, y)
	return Float64(sin(y) / Float64(y / cosh(x)))
end
function tmp = code(x, y)
	tmp = sin(y) / (y / cosh(x));
end
code[x_, y_] := N[(N[Sin[y], $MachinePrecision] / N[(y / N[Cosh[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sin y}{\frac{y}{\cosh x}}
\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. clear-numN/A

      \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
    4. clear-numN/A

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\sin y}{\frac{y}{\cosh x}}} \]
  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: 94.8% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin y}{y} \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)\\ \mathbf{if}\;x \leq 0.46:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+51}:\\ \;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\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
             (*
              x
              (*
               x
               (+
                0.041666666666666664
                (* (* x x) 0.001388888888888889))))))))))
   (if (<= x 0.46)
     t_0
     (if (<= x 6e+51)
       (* (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 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
	double tmp;
	if (x <= 0.46) {
		tmp = t_0;
	} else if (x <= 6e+51) {
		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 + (x * (x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))))
    if (x <= 0.46d0) then
        tmp = t_0
    else if (x <= 6d+51) 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 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
	double tmp;
	if (x <= 0.46) {
		tmp = t_0;
	} else if (x <= 6e+51) {
		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 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))))
	tmp = 0
	if x <= 0.46:
		tmp = t_0
	elif x <= 6e+51:
		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) * Float64(0.5 + Float64(x * Float64(x * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889))))))))
	tmp = 0.0
	if (x <= 0.46)
		tmp = t_0;
	elseif (x <= 6e+51)
		tmp = Float64(cosh(x) * Float64(1.0 + Float64(y * Float64(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 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
	tmp = 0.0;
	if (x <= 0.46)
		tmp = t_0;
	elseif (x <= 6e+51)
		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] * 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]}, If[LessEqual[x, 0.46], t$95$0, If[LessEqual[x, 6e+51], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $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 \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{if}\;x \leq 0.46:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 6 \cdot 10^{+51}:\\
\;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.46000000000000002 or 6e51 < 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} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\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} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\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} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\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} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\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} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\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({x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\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(\mathsf{sin.f64}\left(y\right), y\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(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      8. *-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 \cdot \left(\left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) \cdot x\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(\left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) \cdot x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      10. *-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, \left(x \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      11. *-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(\mathsf{sin.f64}\left(y\right), y\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}, \left(\frac{1}{720} \cdot {x}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      13. *-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(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      14. *-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(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      15. 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(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
      16. *-lowering-*.f6495.3%

        \[\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(\mathsf{sin.f64}\left(y\right), y\right)\right) \]
    5. Simplified95.3%

      \[\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 \frac{\sin y}{y} \]

    if 0.46000000000000002 < x < 6e51

    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. unpow2N/A

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.46:\\ \;\;\;\;\frac{\sin y}{y} \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)\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+51}:\\ \;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin y}{y} \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} \]
  5. Add Preprocessing

Alternative 4: 92.1% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_0 := 0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\\
\mathbf{if}\;x \leq 0.68:\\
\;\;\;\;\frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot t\_0\right)\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{+74}:\\
\;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\sin y}{\frac{y}{1 + x \cdot \left(x \cdot t\_0\right)}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 0.680000000000000049

    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-*.f6493.4%

        \[\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. Simplified93.4%

      \[\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.680000000000000049 < x < 1.4500000000000001e74

    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. unpow2N/A

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

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

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

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

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

    if 1.4500000000000001e74 < x

    1. Initial program 100.0%

      \[\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. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
      4. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right)\right)\right)\right) \]
    7. Simplified98.0%

      \[\leadsto \frac{\sin y}{\frac{y}{\color{blue}{1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification93.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.68:\\ \;\;\;\;\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 1.45 \cdot 10^{+74}:\\ \;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin y}{\frac{y}{1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 92.2% 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 \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\ \mathbf{if}\;x \leq 0.31:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+77}:\\ \;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\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 (* x (* x 0.041666666666666664))))))))
   (if (<= x 0.31)
     t_0
     (if (<= x 4e+77)
       (* (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 + (x * (x * 0.041666666666666664)))));
	double tmp;
	if (x <= 0.31) {
		tmp = t_0;
	} else if (x <= 4e+77) {
		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 + (x * (x * 0.041666666666666664d0)))))
    if (x <= 0.31d0) then
        tmp = t_0
    else if (x <= 4d+77) 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 + (x * (x * 0.041666666666666664)))));
	double tmp;
	if (x <= 0.31) {
		tmp = t_0;
	} else if (x <= 4e+77) {
		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 + (x * (x * 0.041666666666666664)))))
	tmp = 0
	if x <= 0.31:
		tmp = t_0
	elif x <= 4e+77:
		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) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))))
	tmp = 0.0
	if (x <= 0.31)
		tmp = t_0;
	elseif (x <= 4e+77)
		tmp = Float64(cosh(x) * Float64(1.0 + Float64(y * Float64(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 + (x * (x * 0.041666666666666664)))));
	tmp = 0.0;
	if (x <= 0.31)
		tmp = t_0;
	elseif (x <= 4e+77)
		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] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.31], t$95$0, If[LessEqual[x, 4e+77], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $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 \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{if}\;x \leq 0.31:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 4 \cdot 10^{+77}:\\
\;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.309999999999999998 or 3.99999999999999993e77 < 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-*.f6494.6%

        \[\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. Simplified94.6%

      \[\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.309999999999999998 < x < 3.99999999999999993e77

    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. unpow2N/A

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.31:\\ \;\;\;\;\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 4 \cdot 10^{+77}:\\ \;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\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} \]
  5. Add Preprocessing

Alternative 6: 93.4% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \frac{\sin y}{\frac{y}{1 + x \cdot \left(x \cdot \left(0.5 + \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
 (/
  (sin y)
  (/
   y
   (+
    1.0
    (*
     x
     (*
      x
      (+
       0.5
       (*
        (* x x)
        (+ 0.041666666666666664 (* (* x x) 0.001388888888888889))))))))))
double code(double x, double y) {
	return sin(y) / (y / (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 = sin(y) / (y / (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 Math.sin(y) / (y / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))));
}
def code(x, y):
	return math.sin(y) / (y / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))))
function code(x, y)
	return Float64(sin(y) / Float64(y / Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889)))))))))
end
function tmp = code(x, y)
	tmp = sin(y) / (y / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))));
end
code[x_, y_] := N[(N[Sin[y], $MachinePrecision] / N[(y / N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sin y}{\frac{y}{1 + x \cdot \left(x \cdot \left(0.5 + \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. Step-by-step derivation
    1. associate-*r/N/A

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

      \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
    4. clear-numN/A

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

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

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

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

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

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

    \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)}\right)\right) \]
  6. Step-by-step derivation
    1. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    3. associate-*l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    6. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    8. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
    12. *-lowering-*.f64N/A

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
    14. *-lowering-*.f6495.3%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
  7. Simplified95.3%

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

Alternative 7: 84.9% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin y}{y} \cdot \left(1 + 0.5 \cdot \left(x \cdot x\right)\right)\\ \mathbf{if}\;x \leq 0.3:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{+154}:\\ \;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (/ (sin y) y) (+ 1.0 (* 0.5 (* x x))))))
   (if (<= x 0.3)
     t_0
     (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 + (0.5 * (x * x)));
	double tmp;
	if (x <= 0.3) {
		tmp = t_0;
	} 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 + (0.5d0 * (x * x)))
    if (x <= 0.3d0) then
        tmp = t_0
    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 + (0.5 * (x * x)));
	double tmp;
	if (x <= 0.3) {
		tmp = t_0;
	} 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 + (0.5 * (x * x)))
	tmp = 0
	if x <= 0.3:
		tmp = t_0
	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(0.5 * Float64(x * x))))
	tmp = 0.0
	if (x <= 0.3)
		tmp = t_0;
	elseif (x <= 1.32e+154)
		tmp = Float64(cosh(x) * Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (sin(y) / y) * (1.0 + (0.5 * (x * x)));
	tmp = 0.0;
	if (x <= 0.3)
		tmp = t_0;
	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[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.3], t$95$0, If[LessEqual[x, 1.32e+154], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sin y}{y} \cdot \left(1 + 0.5 \cdot \left(x \cdot x\right)\right)\\
\mathbf{if}\;x \leq 0.3:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.299999999999999989 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. *-commutativeN/A

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

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

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

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

        \[\leadsto \left(1 + \frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{\color{blue}{\sin y}}{y} \]
      7. *-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) \]
      8. +-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) \]
      9. *-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) \]
      10. 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) \]
      11. *-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) \]
      12. /-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) \]
      13. sin-lowering-sin.f6488.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. Simplified88.8%

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

    if 0.299999999999999989 < 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. unpow2N/A

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

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

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

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

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

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

Alternative 8: 69.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.3:\\ \;\;\;\;\frac{\sin y}{y}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+130}:\\ \;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \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 0.3)
   (/ (sin y) y)
   (if (<= x 4.5e+130)
     (* (cosh x) (+ 1.0 (* y (* y -0.16666666666666666))))
     (* x (* x (* (* x x) 0.041666666666666664))))))
double code(double x, double y) {
	double tmp;
	if (x <= 0.3) {
		tmp = sin(y) / y;
	} else if (x <= 4.5e+130) {
		tmp = cosh(x) * (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 <= 0.3d0) then
        tmp = sin(y) / y
    else if (x <= 4.5d+130) then
        tmp = cosh(x) * (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 <= 0.3) {
		tmp = Math.sin(y) / y;
	} else if (x <= 4.5e+130) {
		tmp = Math.cosh(x) * (1.0 + (y * (y * -0.16666666666666666)));
	} else {
		tmp = x * (x * ((x * x) * 0.041666666666666664));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 0.3:
		tmp = math.sin(y) / y
	elif x <= 4.5e+130:
		tmp = math.cosh(x) * (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 <= 0.3)
		tmp = Float64(sin(y) / y);
	elseif (x <= 4.5e+130)
		tmp = Float64(cosh(x) * Float64(1.0 + Float64(y * Float64(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 <= 0.3)
		tmp = sin(y) / y;
	elseif (x <= 4.5e+130)
		tmp = cosh(x) * (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, 0.3], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 4.5e+130], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $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 0.3:\\
\;\;\;\;\frac{\sin y}{y}\\

\mathbf{elif}\;x \leq 4.5 \cdot 10^{+130}:\\
\;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\

\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 3 regimes
  2. if x < 0.299999999999999989

    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.f6472.3%

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

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

    if 0.299999999999999989 < x < 4.50000000000000039e130

    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. unpow2N/A

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

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

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

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

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

    if 4.50000000000000039e130 < x

    1. Initial program 100.0%

      \[\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. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
      4. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right)\right)\right)\right) \]
    7. Simplified100.0%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{y}, \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. Simplified83.3%

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

        \[\leadsto \color{blue}{\frac{1}{24} \cdot {x}^{4}} \]
      3. 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-*.f6483.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) \]
      4. Simplified83.3%

        \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)} \]
    10. Recombined 3 regimes into one program.
    11. Add Preprocessing

    Alternative 9: 69.1% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.3:\\ \;\;\;\;\frac{\sin y}{y}\\ \mathbf{else}:\\ \;\;\;\;\cosh x\\ \end{array} \end{array} \]
    (FPCore (x y) :precision binary64 (if (<= x 0.3) (/ (sin y) y) (cosh x)))
    double code(double x, double y) {
    	double tmp;
    	if (x <= 0.3) {
    		tmp = sin(y) / y;
    	} else {
    		tmp = cosh(x);
    	}
    	return tmp;
    }
    
    real(8) function code(x, y)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: tmp
        if (x <= 0.3d0) then
            tmp = sin(y) / y
        else
            tmp = cosh(x)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double tmp;
    	if (x <= 0.3) {
    		tmp = Math.sin(y) / y;
    	} else {
    		tmp = Math.cosh(x);
    	}
    	return tmp;
    }
    
    def code(x, y):
    	tmp = 0
    	if x <= 0.3:
    		tmp = math.sin(y) / y
    	else:
    		tmp = math.cosh(x)
    	return tmp
    
    function code(x, y)
    	tmp = 0.0
    	if (x <= 0.3)
    		tmp = Float64(sin(y) / y);
    	else
    		tmp = cosh(x);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	tmp = 0.0;
    	if (x <= 0.3)
    		tmp = sin(y) / y;
    	else
    		tmp = cosh(x);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := If[LessEqual[x, 0.3], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], N[Cosh[x], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq 0.3:\\
    \;\;\;\;\frac{\sin y}{y}\\
    
    \mathbf{else}:\\
    \;\;\;\;\cosh x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 0.299999999999999989

      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.f6472.3%

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

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

      if 0.299999999999999989 < 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. Simplified76.4%

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

            \[\leadsto \cosh x \]
          2. cosh-lowering-cosh.f6476.4%

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

          \[\leadsto \color{blue}{\cosh x} \]
      5. Recombined 2 regimes into one program.
      6. Add Preprocessing

      Alternative 10: 62.8% accurate, 2.0× speedup?

      \[\begin{array}{l} \\ \cosh x \end{array} \]
      (FPCore (x y) :precision binary64 (cosh x))
      double code(double x, double y) {
      	return cosh(x);
      }
      
      real(8) function code(x, y)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          code = cosh(x)
      end function
      
      public static double code(double x, double y) {
      	return Math.cosh(x);
      }
      
      def code(x, y):
      	return math.cosh(x)
      
      function code(x, y)
      	return cosh(x)
      end
      
      function tmp = code(x, y)
      	tmp = cosh(x);
      end
      
      code[x_, y_] := N[Cosh[x], $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \cosh x
      \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. Simplified63.0%

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

            \[\leadsto \cosh x \]
          2. cosh-lowering-cosh.f6463.0%

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

          \[\leadsto \color{blue}{\cosh x} \]
        4. Add Preprocessing

        Alternative 11: 53.8% accurate, 8.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.2 \cdot 10^{+49}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \frac{y \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\\ \end{array} \end{array} \]
        (FPCore (x y)
         :precision binary64
         (if (<= x 2.2e+49)
           (*
            (+ 1.0 (* 0.5 (* x x)))
            (/ (* y (+ 1.0 (* y (* y -0.16666666666666666)))) y))
           (+ 1.0 (* x (* x (* (* x x) (* (* x x) 0.001388888888888889)))))))
        double code(double x, double y) {
        	double tmp;
        	if (x <= 2.2e+49) {
        		tmp = (1.0 + (0.5 * (x * x))) * ((y * (1.0 + (y * (y * -0.16666666666666666)))) / y);
        	} else {
        		tmp = 1.0 + (x * (x * ((x * x) * ((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 <= 2.2d+49) then
                tmp = (1.0d0 + (0.5d0 * (x * x))) * ((y * (1.0d0 + (y * (y * (-0.16666666666666666d0))))) / y)
            else
                tmp = 1.0d0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889d0))))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y) {
        	double tmp;
        	if (x <= 2.2e+49) {
        		tmp = (1.0 + (0.5 * (x * x))) * ((y * (1.0 + (y * (y * -0.16666666666666666)))) / y);
        	} else {
        		tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889))));
        	}
        	return tmp;
        }
        
        def code(x, y):
        	tmp = 0
        	if x <= 2.2e+49:
        		tmp = (1.0 + (0.5 * (x * x))) * ((y * (1.0 + (y * (y * -0.16666666666666666)))) / y)
        	else:
        		tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889))))
        	return tmp
        
        function code(x, y)
        	tmp = 0.0
        	if (x <= 2.2e+49)
        		tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(x * x))) * Float64(Float64(y * Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666)))) / y));
        	else
        		tmp = Float64(1.0 + Float64(x * Float64(x * Float64(Float64(x * x) * Float64(Float64(x * x) * 0.001388888888888889)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y)
        	tmp = 0.0;
        	if (x <= 2.2e+49)
        		tmp = (1.0 + (0.5 * (x * x))) * ((y * (1.0 + (y * (y * -0.16666666666666666)))) / y);
        	else
        		tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889))));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_] := If[LessEqual[x, 2.2e+49], N[(N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(y * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 2.2 \cdot 10^{+49}:\\
        \;\;\;\;\left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \frac{y \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)}{y}\\
        
        \mathbf{else}:\\
        \;\;\;\;1 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 2.2000000000000001e49

          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. *-commutativeN/A

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

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

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

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

              \[\leadsto \left(1 + \frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{\color{blue}{\sin y}}{y} \]
            7. *-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) \]
            8. +-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) \]
            9. *-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) \]
            10. 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) \]
            11. *-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) \]
            12. /-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) \]
            13. sin-lowering-sin.f6484.1%

              \[\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. Simplified84.1%

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

            \[\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(\color{blue}{\left(y \cdot \left(1 + \frac{-1}{6} \cdot {y}^{2}\right)\right)}, y\right)\right) \]
          7. Step-by-step derivation
            1. *-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(\mathsf{*.f64}\left(y, \left(1 + \frac{-1}{6} \cdot {y}^{2}\right)\right), y\right)\right) \]
            2. +-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(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\frac{-1}{6} \cdot {y}^{2}\right)\right)\right), y\right)\right) \]
            3. *-commutativeN/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(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left({y}^{2} \cdot \frac{-1}{6}\right)\right)\right), y\right)\right) \]
            4. unpow2N/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(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(\left(y \cdot y\right) \cdot \frac{-1}{6}\right)\right)\right), y\right)\right) \]
            5. associate-*l*N/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(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \left(y \cdot \left(y \cdot \frac{-1}{6}\right)\right)\right)\right), y\right)\right) \]
            6. *-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(\mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(y \cdot \frac{-1}{6}\right)\right)\right)\right), y\right)\right) \]
            7. *-lowering-*.f6448.3%

              \[\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{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(y, \frac{-1}{6}\right)\right)\right)\right), y\right)\right) \]
          8. Simplified48.3%

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

          if 2.2000000000000001e49 < 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. Simplified84.6%

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

                \[\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(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right) \]
            4. Simplified83.0%

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right) \]
              11. *-lowering-*.f6483.0%

                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right) \]
            7. Simplified83.0%

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

          Alternative 12: 58.6% accurate, 8.9× speedup?

          \[\begin{array}{l} \\ \frac{y}{\frac{y}{1 + x \cdot \left(x \cdot \left(0.5 + \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
           (/
            y
            (/
             y
             (+
              1.0
              (*
               x
               (*
                x
                (+
                 0.5
                 (*
                  (* x x)
                  (+ 0.041666666666666664 (* (* x x) 0.001388888888888889))))))))))
          double code(double x, double y) {
          	return y / (y / (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 = y / (y / (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 y / (y / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))));
          }
          
          def code(x, y):
          	return y / (y / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))))
          
          function code(x, y)
          	return Float64(y / Float64(y / Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889)))))))))
          end
          
          function tmp = code(x, y)
          	tmp = y / (y / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))));
          end
          
          code[x_, y_] := N[(y / N[(y / N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{y}{\frac{y}{1 + x \cdot \left(x \cdot \left(0.5 + \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. Step-by-step derivation
            1. associate-*r/N/A

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

              \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
            3. associate-/r*N/A

              \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
            4. clear-numN/A

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)}\right)\right) \]
          6. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            2. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            8. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            10. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            11. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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)\right)\right) \]
            12. *-lowering-*.f64N/A

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
            14. *-lowering-*.f6495.3%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \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(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
          7. Simplified95.3%

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

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{y}, \mathsf{/.f64}\left(y, \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(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
          9. Step-by-step derivation
            1. Simplified61.7%

              \[\leadsto \frac{\color{blue}{y}}{\frac{y}{1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)}} \]
            2. Add Preprocessing

            Alternative 13: 46.1% accurate, 10.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 9.5 \cdot 10^{+49}:\\ \;\;\;\;\frac{y \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\\ \end{array} \end{array} \]
            (FPCore (x y)
             :precision binary64
             (if (<= x 9.5e+49)
               (/ (* y (+ 1.0 (* -0.16666666666666666 (* y y)))) y)
               (+ 1.0 (* x (* x (* (* x x) (* (* x x) 0.001388888888888889)))))))
            double code(double x, double y) {
            	double tmp;
            	if (x <= 9.5e+49) {
            		tmp = (y * (1.0 + (-0.16666666666666666 * (y * y)))) / y;
            	} else {
            		tmp = 1.0 + (x * (x * ((x * x) * ((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 <= 9.5d+49) then
                    tmp = (y * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))) / y
                else
                    tmp = 1.0d0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889d0))))
                end if
                code = tmp
            end function
            
            public static double code(double x, double y) {
            	double tmp;
            	if (x <= 9.5e+49) {
            		tmp = (y * (1.0 + (-0.16666666666666666 * (y * y)))) / y;
            	} else {
            		tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889))));
            	}
            	return tmp;
            }
            
            def code(x, y):
            	tmp = 0
            	if x <= 9.5e+49:
            		tmp = (y * (1.0 + (-0.16666666666666666 * (y * y)))) / y
            	else:
            		tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889))))
            	return tmp
            
            function code(x, y)
            	tmp = 0.0
            	if (x <= 9.5e+49)
            		tmp = Float64(Float64(y * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))) / y);
            	else
            		tmp = Float64(1.0 + Float64(x * Float64(x * Float64(Float64(x * x) * Float64(Float64(x * x) * 0.001388888888888889)))));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y)
            	tmp = 0.0;
            	if (x <= 9.5e+49)
            		tmp = (y * (1.0 + (-0.16666666666666666 * (y * y)))) / y;
            	else
            		tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889))));
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_] := If[LessEqual[x, 9.5e+49], N[(N[(y * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(1.0 + N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq 9.5 \cdot 10^{+49}:\\
            \;\;\;\;\frac{y \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)}{y}\\
            
            \mathbf{else}:\\
            \;\;\;\;1 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < 9.49999999999999969e49

              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.f6469.9%

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

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

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

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

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

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

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

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

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

              if 9.49999999999999969e49 < 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. Simplified84.6%

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

                    \[\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(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right) \]
                4. Simplified83.0%

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right) \]
                  11. *-lowering-*.f6483.0%

                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right) \]
                7. Simplified83.0%

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

              Alternative 14: 45.4% accurate, 11.4× speedup?

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

                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.f6469.9%

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

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

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

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

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

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

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

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

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

                if 2.99999999999999987e44 < x

                1. Initial program 100.0%

                  \[\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. clear-numN/A

                    \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
                  3. associate-/r*N/A

                    \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
                  4. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{y}, \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right)\right)\right)\right) \]
                9. Step-by-step derivation
                  1. Simplified75.7%

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

                    \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(24 \cdot \frac{y}{{x}^{4}}\right)}\right) \]
                  3. Step-by-step derivation
                    1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, 24\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
                    11. *-lowering-*.f6475.7%

                      \[\leadsto \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, 24\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
                  4. Simplified75.7%

                    \[\leadsto \frac{y}{\color{blue}{\frac{y \cdot 24}{\left(x \cdot x\right) \cdot \left(x \cdot x\right)}}} \]
                10. Recombined 2 regimes into one program.
                11. Add Preprocessing

                Alternative 15: 44.7% accurate, 12.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.36 \cdot 10^{+51}:\\ \;\;\;\;\frac{y \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)}{y}\\ \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.36e+51)
                   (/ (* y (+ 1.0 (* -0.16666666666666666 (* y y)))) y)
                   (* x (* x (* (* x x) 0.041666666666666664)))))
                double code(double x, double y) {
                	double tmp;
                	if (x <= 1.36e+51) {
                		tmp = (y * (1.0 + (-0.16666666666666666 * (y * y)))) / y;
                	} 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.36d+51) then
                        tmp = (y * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))) / y
                    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.36e+51) {
                		tmp = (y * (1.0 + (-0.16666666666666666 * (y * y)))) / y;
                	} else {
                		tmp = x * (x * ((x * x) * 0.041666666666666664));
                	}
                	return tmp;
                }
                
                def code(x, y):
                	tmp = 0
                	if x <= 1.36e+51:
                		tmp = (y * (1.0 + (-0.16666666666666666 * (y * y)))) / y
                	else:
                		tmp = x * (x * ((x * x) * 0.041666666666666664))
                	return tmp
                
                function code(x, y)
                	tmp = 0.0
                	if (x <= 1.36e+51)
                		tmp = Float64(Float64(y * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))) / y);
                	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.36e+51)
                		tmp = (y * (1.0 + (-0.16666666666666666 * (y * y)))) / y;
                	else
                		tmp = x * (x * ((x * x) * 0.041666666666666664));
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_] := If[LessEqual[x, 1.36e+51], N[(N[(y * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $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.36 \cdot 10^{+51}:\\
                \;\;\;\;\frac{y \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)}{y}\\
                
                \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.3599999999999999e51

                  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.f6469.9%

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

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

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

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

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

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

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

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

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

                  if 1.3599999999999999e51 < x

                  1. Initial program 100.0%

                    \[\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. clear-numN/A

                      \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
                    3. associate-/r*N/A

                      \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
                    4. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\color{blue}{y}, \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right)\right)\right)\right) \]
                  9. Step-by-step derivation
                    1. Simplified75.7%

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

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

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

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

                  Alternative 16: 52.7% accurate, 12.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.9 \cdot 10^{+81}:\\ \;\;\;\;\frac{y}{\frac{y}{1 + x \cdot \left(x \cdot 0.5\right)}}\\ \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 2.9e+81)
                     (/ y (/ y (+ 1.0 (* x (* x 0.5)))))
                     (* x (* x (* (* x x) 0.041666666666666664)))))
                  double code(double x, double y) {
                  	double tmp;
                  	if (x <= 2.9e+81) {
                  		tmp = y / (y / (1.0 + (x * (x * 0.5))));
                  	} 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 <= 2.9d+81) then
                          tmp = y / (y / (1.0d0 + (x * (x * 0.5d0))))
                      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 <= 2.9e+81) {
                  		tmp = y / (y / (1.0 + (x * (x * 0.5))));
                  	} else {
                  		tmp = x * (x * ((x * x) * 0.041666666666666664));
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y):
                  	tmp = 0
                  	if x <= 2.9e+81:
                  		tmp = y / (y / (1.0 + (x * (x * 0.5))))
                  	else:
                  		tmp = x * (x * ((x * x) * 0.041666666666666664))
                  	return tmp
                  
                  function code(x, y)
                  	tmp = 0.0
                  	if (x <= 2.9e+81)
                  		tmp = Float64(y / Float64(y / Float64(1.0 + Float64(x * Float64(x * 0.5)))));
                  	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 <= 2.9e+81)
                  		tmp = y / (y / (1.0 + (x * (x * 0.5))));
                  	else
                  		tmp = x * (x * ((x * x) * 0.041666666666666664));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_] := If[LessEqual[x, 2.9e+81], N[(y / N[(y / N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 2.9 \cdot 10^{+81}:\\
                  \;\;\;\;\frac{y}{\frac{y}{1 + x \cdot \left(x \cdot 0.5\right)}}\\
                  
                  \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 < 2.9e81

                    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. clear-numN/A

                        \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
                      3. associate-/r*N/A

                        \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
                      4. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{/.f64}\left(\color{blue}{y}, \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right)\right)\right)\right) \]
                    9. Step-by-step derivation
                      1. Simplified53.9%

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

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

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

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

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

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

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

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

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

                      if 2.9e81 < x

                      1. Initial program 100.0%

                        \[\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. clear-numN/A

                          \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
                        3. associate-/r*N/A

                          \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
                        4. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right)\right)\right)\right) \]
                      7. Simplified100.0%

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

                        \[\leadsto \mathsf{/.f64}\left(\color{blue}{y}, \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right)\right)\right)\right) \]
                      9. Step-by-step derivation
                        1. Simplified81.8%

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

                          \[\leadsto \color{blue}{\frac{1}{24} \cdot {x}^{4}} \]
                        3. 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-*.f6481.8%

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

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

                      Alternative 17: 43.6% accurate, 14.6× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.36 \cdot 10^{+51}:\\ \;\;\;\;1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\\ \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.36e+51)
                         (+ 1.0 (* -0.16666666666666666 (* y y)))
                         (* x (* x (* (* x x) 0.041666666666666664)))))
                      double code(double x, double y) {
                      	double tmp;
                      	if (x <= 1.36e+51) {
                      		tmp = 1.0 + (-0.16666666666666666 * (y * y));
                      	} 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.36d+51) then
                              tmp = 1.0d0 + ((-0.16666666666666666d0) * (y * y))
                          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.36e+51) {
                      		tmp = 1.0 + (-0.16666666666666666 * (y * y));
                      	} else {
                      		tmp = x * (x * ((x * x) * 0.041666666666666664));
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y):
                      	tmp = 0
                      	if x <= 1.36e+51:
                      		tmp = 1.0 + (-0.16666666666666666 * (y * y))
                      	else:
                      		tmp = x * (x * ((x * x) * 0.041666666666666664))
                      	return tmp
                      
                      function code(x, y)
                      	tmp = 0.0
                      	if (x <= 1.36e+51)
                      		tmp = Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)));
                      	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.36e+51)
                      		tmp = 1.0 + (-0.16666666666666666 * (y * y));
                      	else
                      		tmp = x * (x * ((x * x) * 0.041666666666666664));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_] := If[LessEqual[x, 1.36e+51], N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $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.36 \cdot 10^{+51}:\\
                      \;\;\;\;1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\\
                      
                      \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.3599999999999999e51

                        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.f6469.9%

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

                          \[\leadsto \color{blue}{\frac{\sin y}{y}} \]
                        6. Taylor expanded in y 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. *-lowering-*.f64N/A

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

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

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

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

                        if 1.3599999999999999e51 < x

                        1. Initial program 100.0%

                          \[\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. clear-numN/A

                            \[\leadsto \frac{1}{\color{blue}{\frac{y}{\cosh x \cdot \sin y}}} \]
                          3. associate-/r*N/A

                            \[\leadsto \frac{1}{\frac{\frac{y}{\cosh x}}{\color{blue}{\sin y}}} \]
                          4. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(\color{blue}{y}, \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right)\right)\right)\right) \]
                        9. Step-by-step derivation
                          1. Simplified75.7%

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

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

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

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

                        Alternative 18: 39.9% accurate, 17.1× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 7.2 \cdot 10^{+136}:\\ \;\;\;\;1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;1 + 0.5 \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
                        (FPCore (x y)
                         :precision binary64
                         (if (<= x 7.2e+136)
                           (+ 1.0 (* -0.16666666666666666 (* y y)))
                           (+ 1.0 (* 0.5 (* x x)))))
                        double code(double x, double y) {
                        	double tmp;
                        	if (x <= 7.2e+136) {
                        		tmp = 1.0 + (-0.16666666666666666 * (y * y));
                        	} else {
                        		tmp = 1.0 + (0.5 * (x * x));
                        	}
                        	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+136) then
                                tmp = 1.0d0 + ((-0.16666666666666666d0) * (y * y))
                            else
                                tmp = 1.0d0 + (0.5d0 * (x * x))
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y) {
                        	double tmp;
                        	if (x <= 7.2e+136) {
                        		tmp = 1.0 + (-0.16666666666666666 * (y * y));
                        	} else {
                        		tmp = 1.0 + (0.5 * (x * x));
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y):
                        	tmp = 0
                        	if x <= 7.2e+136:
                        		tmp = 1.0 + (-0.16666666666666666 * (y * y))
                        	else:
                        		tmp = 1.0 + (0.5 * (x * x))
                        	return tmp
                        
                        function code(x, y)
                        	tmp = 0.0
                        	if (x <= 7.2e+136)
                        		tmp = Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)));
                        	else
                        		tmp = Float64(1.0 + Float64(0.5 * Float64(x * x)));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y)
                        	tmp = 0.0;
                        	if (x <= 7.2e+136)
                        		tmp = 1.0 + (-0.16666666666666666 * (y * y));
                        	else
                        		tmp = 1.0 + (0.5 * (x * x));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_] := If[LessEqual[x, 7.2e+136], N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq 7.2 \cdot 10^{+136}:\\
                        \;\;\;\;1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;1 + 0.5 \cdot \left(x \cdot x\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x < 7.20000000000000011e136

                          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.f6465.0%

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

                            \[\leadsto \color{blue}{\frac{\sin y}{y}} \]
                          6. Taylor expanded in y 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. *-lowering-*.f64N/A

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

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

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

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

                          if 7.20000000000000011e136 < 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. Simplified83.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-*.f6475.8%

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

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

                          Alternative 19: 30.0% accurate, 20.5× speedup?

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

                            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. Simplified71.8%

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

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

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

                                if 2.9199999999999999e110 < y

                                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.f6452.0%

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

                                  \[\leadsto \color{blue}{\frac{\sin y}{y}} \]
                                6. Taylor expanded in y 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right) \]
                                11. Simplified21.6%

                                  \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot y\right)} \]
                              4. Recombined 2 regimes into one program.
                              5. Add Preprocessing

                              Alternative 20: 32.8% accurate, 29.3× speedup?

                              \[\begin{array}{l} \\ 1 + -0.16666666666666666 \cdot \left(y \cdot y\right) \end{array} \]
                              (FPCore (x y) :precision binary64 (+ 1.0 (* -0.16666666666666666 (* y y))))
                              double code(double x, double y) {
                              	return 1.0 + (-0.16666666666666666 * (y * y));
                              }
                              
                              real(8) function code(x, y)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  code = 1.0d0 + ((-0.16666666666666666d0) * (y * y))
                              end function
                              
                              public static double code(double x, double y) {
                              	return 1.0 + (-0.16666666666666666 * (y * y));
                              }
                              
                              def code(x, y):
                              	return 1.0 + (-0.16666666666666666 * (y * y))
                              
                              function code(x, y)
                              	return Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))
                              end
                              
                              function tmp = code(x, y)
                              	tmp = 1.0 + (-0.16666666666666666 * (y * y));
                              end
                              
                              code[x_, y_] := N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              1 + -0.16666666666666666 \cdot \left(y \cdot y\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 \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.f6456.3%

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

                                \[\leadsto \color{blue}{\frac{\sin y}{y}} \]
                              6. Taylor expanded in y 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. *-lowering-*.f64N/A

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

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

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

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

                              Alternative 21: 27.2% 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. Simplified63.0%

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

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

                                    \[\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 2024155 
                                  (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)))