Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 89.0% → 99.8%
Time: 6.7s
Alternatives: 20
Speedup: 1.4×

Specification

?
\[\begin{array}{l} \\ \frac{\sin x \cdot \sinh y}{x} \end{array} \]
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
	return (sin(x) * sinh(y)) / x;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
	return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y):
	return (math.sin(x) * math.sinh(y)) / x
function code(x, y)
	return Float64(Float64(sin(x) * sinh(y)) / x)
end
function tmp = code(x, y)
	tmp = (sin(x) * sinh(y)) / x;
end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}

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

\[\begin{array}{l} \\ \frac{\sin x \cdot \sinh y}{x} \end{array} \]
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
	return (sin(x) * sinh(y)) / x;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
	return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y):
	return (math.sin(x) * math.sinh(y)) / x
function code(x, y)
	return Float64(Float64(sin(x) * sinh(y)) / x)
end
function tmp = code(x, y)
	tmp = (sin(x) * sinh(y)) / x;
end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\sinh y}{x} \cdot \sin x \end{array} \]
(FPCore (x y) :precision binary64 (* (/ (sinh y) x) (sin x)))
double code(double x, double y) {
	return (sinh(y) / x) * sin(x);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (sinh(y) / x) * sin(x)
end function
public static double code(double x, double y) {
	return (Math.sinh(y) / x) * Math.sin(x);
}
def code(x, y):
	return (math.sinh(y) / x) * math.sin(x)
function code(x, y)
	return Float64(Float64(sinh(y) / x) * sin(x))
end
function tmp = code(x, y)
	tmp = (sinh(y) / x) * sin(x);
end
code[x_, y_] := N[(N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
    2. lift-*.f64N/A

      \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
    3. lift-sin.f64N/A

      \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
    4. lift-sinh.f64N/A

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

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    6. *-commutativeN/A

      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
    7. lower-*.f64N/A

      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
    8. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
    9. lift-sinh.f64N/A

      \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
    10. lift-sin.f6499.9

      \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
  4. Applied rewrites99.9%

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

Alternative 2: 89.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y}{x}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\ \mathbf{elif}\;t\_0 \leq 10:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{else}:\\ \;\;\;\;{\left(y \cdot y\right)}^{3.5} \cdot 0.0001984126984126984\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (* (sin x) (sinh y)) x)))
   (if (<= t_0 (- INFINITY))
     (* (* 2.0 (sinh y)) 0.5)
     (if (<= t_0 10.0)
       (* (/ (sin x) x) y)
       (* (pow (* y y) 3.5) 0.0001984126984126984)))))
double code(double x, double y) {
	double t_0 = (sin(x) * sinh(y)) / x;
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = (2.0 * sinh(y)) * 0.5;
	} else if (t_0 <= 10.0) {
		tmp = (sin(x) / x) * y;
	} else {
		tmp = pow((y * y), 3.5) * 0.0001984126984126984;
	}
	return tmp;
}
public static double code(double x, double y) {
	double t_0 = (Math.sin(x) * Math.sinh(y)) / x;
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = (2.0 * Math.sinh(y)) * 0.5;
	} else if (t_0 <= 10.0) {
		tmp = (Math.sin(x) / x) * y;
	} else {
		tmp = Math.pow((y * y), 3.5) * 0.0001984126984126984;
	}
	return tmp;
}
def code(x, y):
	t_0 = (math.sin(x) * math.sinh(y)) / x
	tmp = 0
	if t_0 <= -math.inf:
		tmp = (2.0 * math.sinh(y)) * 0.5
	elif t_0 <= 10.0:
		tmp = (math.sin(x) / x) * y
	else:
		tmp = math.pow((y * y), 3.5) * 0.0001984126984126984
	return tmp
function code(x, y)
	t_0 = Float64(Float64(sin(x) * sinh(y)) / x)
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(2.0 * sinh(y)) * 0.5);
	elseif (t_0 <= 10.0)
		tmp = Float64(Float64(sin(x) / x) * y);
	else
		tmp = Float64((Float64(y * y) ^ 3.5) * 0.0001984126984126984);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (sin(x) * sinh(y)) / x;
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = (2.0 * sinh(y)) * 0.5;
	elseif (t_0 <= 10.0)
		tmp = (sin(x) / x) * y;
	else
		tmp = ((y * y) ^ 3.5) * 0.0001984126984126984;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[t$95$0, 10.0], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], N[(N[Power[N[(y * y), $MachinePrecision], 3.5], $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sin x \cdot \sinh y}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\

\mathbf{elif}\;t\_0 \leq 10:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\\

\mathbf{else}:\\
\;\;\;\;{\left(y \cdot y\right)}^{3.5} \cdot 0.0001984126984126984\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
    4. Step-by-step derivation
      1. Applied rewrites79.7%

        \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]

      if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 10

      1. Initial program 77.1%

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

        \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
      4. Step-by-step derivation
        1. Applied rewrites98.1%

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

        if 10 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
        4. Step-by-step derivation
          1. Applied rewrites71.2%

            \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
          2. Taylor expanded in y around 0

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

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot \color{blue}{y} \]
            2. Taylor expanded in y around inf

              \[\leadsto \frac{1}{5040} \cdot {y}^{\color{blue}{7}} \]
            3. Step-by-step derivation
              1. Applied rewrites62.2%

                \[\leadsto {y}^{7} \cdot 0.0001984126984126984 \]
              2. Step-by-step derivation
                1. Applied rewrites88.3%

                  \[\leadsto {\left(y \cdot y\right)}^{3.5} \cdot 0.0001984126984126984 \]
              3. Recombined 3 regimes into one program.
              4. Add Preprocessing

              Alternative 3: 77.3% accurate, 0.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y}{x}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-319}:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\ \mathbf{elif}\;t\_0 \leq 10:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot x\\ \mathbf{else}:\\ \;\;\;\;{\left(y \cdot y\right)}^{3.5} \cdot 0.0001984126984126984\\ \end{array} \end{array} \]
              (FPCore (x y)
               :precision binary64
               (let* ((t_0 (/ (* (sin x) (sinh y)) x)))
                 (if (<= t_0 -1e-319)
                   (* (* 2.0 (sinh y)) 0.5)
                   (if (<= t_0 10.0)
                     (*
                      (/
                       (*
                        (fma
                         (fma (* y y) 0.008333333333333333 0.16666666666666666)
                         (* y y)
                         1.0)
                        y)
                       x)
                      x)
                     (* (pow (* y y) 3.5) 0.0001984126984126984)))))
              double code(double x, double y) {
              	double t_0 = (sin(x) * sinh(y)) / x;
              	double tmp;
              	if (t_0 <= -1e-319) {
              		tmp = (2.0 * sinh(y)) * 0.5;
              	} else if (t_0 <= 10.0) {
              		tmp = ((fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y) / x) * x;
              	} else {
              		tmp = pow((y * y), 3.5) * 0.0001984126984126984;
              	}
              	return tmp;
              }
              
              function code(x, y)
              	t_0 = Float64(Float64(sin(x) * sinh(y)) / x)
              	tmp = 0.0
              	if (t_0 <= -1e-319)
              		tmp = Float64(Float64(2.0 * sinh(y)) * 0.5);
              	elseif (t_0 <= 10.0)
              		tmp = Float64(Float64(Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y) / x) * x);
              	else
              		tmp = Float64((Float64(y * y) ^ 3.5) * 0.0001984126984126984);
              	end
              	return tmp
              end
              
              code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-319], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[t$95$0, 10.0], N[(N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision] * x), $MachinePrecision], N[(N[Power[N[(y * y), $MachinePrecision], 3.5], $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \frac{\sin x \cdot \sinh y}{x}\\
              \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-319}:\\
              \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\
              
              \mathbf{elif}\;t\_0 \leq 10:\\
              \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot x\\
              
              \mathbf{else}:\\
              \;\;\;\;{\left(y \cdot y\right)}^{3.5} \cdot 0.0001984126984126984\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.99989e-320

                1. Initial program 99.8%

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

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                4. Step-by-step derivation
                  1. Applied rewrites72.6%

                    \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]

                  if -9.99989e-320 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 10

                  1. Initial program 65.2%

                    \[\frac{\sin x \cdot \sinh y}{x} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                    3. lift-sin.f64N/A

                      \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                    4. lift-sinh.f64N/A

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

                      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                    6. *-commutativeN/A

                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                    7. lower-*.f64N/A

                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                    8. lower-/.f64N/A

                      \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                    9. lift-sinh.f64N/A

                      \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                    10. lift-sin.f6499.7

                      \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                  4. Applied rewrites99.7%

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

                    \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                  6. Step-by-step derivation
                    1. Applied rewrites98.4%

                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                    2. Taylor expanded in x around 0

                      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]
                    3. Step-by-step derivation
                      1. Applied rewrites78.9%

                        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]

                      if 10 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                      1. Initial program 100.0%

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

                        \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                      4. Step-by-step derivation
                        1. Applied rewrites71.2%

                          \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                        2. Taylor expanded in y around 0

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

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot \color{blue}{y} \]
                          2. Taylor expanded in y around inf

                            \[\leadsto \frac{1}{5040} \cdot {y}^{\color{blue}{7}} \]
                          3. Step-by-step derivation
                            1. Applied rewrites62.2%

                              \[\leadsto {y}^{7} \cdot 0.0001984126984126984 \]
                            2. Step-by-step derivation
                              1. Applied rewrites88.3%

                                \[\leadsto {\left(y \cdot y\right)}^{3.5} \cdot 0.0001984126984126984 \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 4: 80.5% accurate, 1.3× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.0112:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin x \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\right)}{x}\\ \end{array} \end{array} \]
                            (FPCore (x y)
                             :precision binary64
                             (if (<= x 0.0112)
                               (* (* 2.0 (sinh y)) 0.5)
                               (/
                                (*
                                 (sin x)
                                 (*
                                  (fma
                                   (fma
                                    (fma 0.0001984126984126984 (* y y) 0.008333333333333333)
                                    (* y y)
                                    0.16666666666666666)
                                   (* y y)
                                   1.0)
                                  y))
                                x)))
                            double code(double x, double y) {
                            	double tmp;
                            	if (x <= 0.0112) {
                            		tmp = (2.0 * sinh(y)) * 0.5;
                            	} else {
                            		tmp = (sin(x) * (fma(fma(fma(0.0001984126984126984, (y * y), 0.008333333333333333), (y * y), 0.16666666666666666), (y * y), 1.0) * y)) / x;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y)
                            	tmp = 0.0
                            	if (x <= 0.0112)
                            		tmp = Float64(Float64(2.0 * sinh(y)) * 0.5);
                            	else
                            		tmp = Float64(Float64(sin(x) * Float64(fma(fma(fma(0.0001984126984126984, Float64(y * y), 0.008333333333333333), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * y)) / x);
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_] := If[LessEqual[x, 0.0112], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[Sin[x], $MachinePrecision] * N[(N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;x \leq 0.0112:\\
                            \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\sin x \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\right)}{x}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x < 0.0111999999999999999

                              1. Initial program 85.6%

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

                                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                              4. Step-by-step derivation
                                1. Applied rewrites77.3%

                                  \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]

                                if 0.0111999999999999999 < x

                                1. Initial program 99.9%

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

                                  \[\leadsto \frac{\sin x \cdot \color{blue}{\left(y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)\right)}}{x} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites89.4%

                                    \[\leadsto \frac{\sin x \cdot \color{blue}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\right)}}{x} \]
                                5. Recombined 2 regimes into one program.
                                6. Add Preprocessing

                                Alternative 5: 93.0% accurate, 1.4× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \sinh y\\ t_1 := \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{+153}:\\ \;\;\;\;\left(\frac{t\_1}{x} \cdot y\right) \cdot \sin x\\ \mathbf{elif}\;y \leq -1550000000:\\ \;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\ \mathbf{elif}\;y \leq 0.56:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+101}:\\ \;\;\;\;t\_0 \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin x \cdot \left(t\_1 \cdot y\right)}{x}\\ \end{array} \end{array} \]
                                (FPCore (x y)
                                 :precision binary64
                                 (let* ((t_0 (* 2.0 (sinh y))) (t_1 (fma (* y y) 0.16666666666666666 1.0)))
                                   (if (<= y -1.8e+153)
                                     (* (* (/ t_1 x) y) (sin x))
                                     (if (<= y -1550000000.0)
                                       (* t_0 (fma (* x x) -0.08333333333333333 0.5))
                                       (if (<= y 0.56)
                                         (* (/ (sin x) x) y)
                                         (if (<= y 1.7e+101) (* t_0 0.5) (/ (* (sin x) (* t_1 y)) x)))))))
                                double code(double x, double y) {
                                	double t_0 = 2.0 * sinh(y);
                                	double t_1 = fma((y * y), 0.16666666666666666, 1.0);
                                	double tmp;
                                	if (y <= -1.8e+153) {
                                		tmp = ((t_1 / x) * y) * sin(x);
                                	} else if (y <= -1550000000.0) {
                                		tmp = t_0 * fma((x * x), -0.08333333333333333, 0.5);
                                	} else if (y <= 0.56) {
                                		tmp = (sin(x) / x) * y;
                                	} else if (y <= 1.7e+101) {
                                		tmp = t_0 * 0.5;
                                	} else {
                                		tmp = (sin(x) * (t_1 * y)) / x;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y)
                                	t_0 = Float64(2.0 * sinh(y))
                                	t_1 = fma(Float64(y * y), 0.16666666666666666, 1.0)
                                	tmp = 0.0
                                	if (y <= -1.8e+153)
                                		tmp = Float64(Float64(Float64(t_1 / x) * y) * sin(x));
                                	elseif (y <= -1550000000.0)
                                		tmp = Float64(t_0 * fma(Float64(x * x), -0.08333333333333333, 0.5));
                                	elseif (y <= 0.56)
                                		tmp = Float64(Float64(sin(x) / x) * y);
                                	elseif (y <= 1.7e+101)
                                		tmp = Float64(t_0 * 0.5);
                                	else
                                		tmp = Float64(Float64(sin(x) * Float64(t_1 * y)) / x);
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_] := Block[{t$95$0 = N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]}, If[LessEqual[y, -1.8e+153], N[(N[(N[(t$95$1 / x), $MachinePrecision] * y), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1550000000.0], N[(t$95$0 * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.56], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.7e+101], N[(t$95$0 * 0.5), $MachinePrecision], N[(N[(N[Sin[x], $MachinePrecision] * N[(t$95$1 * y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := 2 \cdot \sinh y\\
                                t_1 := \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
                                \mathbf{if}\;y \leq -1.8 \cdot 10^{+153}:\\
                                \;\;\;\;\left(\frac{t\_1}{x} \cdot y\right) \cdot \sin x\\
                                
                                \mathbf{elif}\;y \leq -1550000000:\\
                                \;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\
                                
                                \mathbf{elif}\;y \leq 0.56:\\
                                \;\;\;\;\frac{\sin x}{x} \cdot y\\
                                
                                \mathbf{elif}\;y \leq 1.7 \cdot 10^{+101}:\\
                                \;\;\;\;t\_0 \cdot 0.5\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{\sin x \cdot \left(t\_1 \cdot y\right)}{x}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 5 regimes
                                2. if y < -1.8e153

                                  1. Initial program 100.0%

                                    \[\frac{\sin x \cdot \sinh y}{x} \]
                                  2. Add Preprocessing
                                  3. Step-by-step derivation
                                    1. lift-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                    2. lift-*.f64N/A

                                      \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                    3. lift-sin.f64N/A

                                      \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                    4. lift-sinh.f64N/A

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

                                      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                    6. *-commutativeN/A

                                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                    7. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                    8. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                    9. lift-sinh.f64N/A

                                      \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                    10. lift-sin.f64100.0

                                      \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                  4. Applied rewrites100.0%

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

                                    \[\leadsto \color{blue}{\left(y \cdot \left(\frac{1}{6} \cdot \frac{{y}^{2}}{x} + \frac{1}{x}\right)\right)} \cdot \sin x \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites100.0%

                                      \[\leadsto \color{blue}{\left(\frac{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)}{x} \cdot y\right)} \cdot \sin x \]

                                    if -1.8e153 < y < -1.55e9

                                    1. Initial program 100.0%

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

                                      \[\leadsto \color{blue}{\frac{-1}{12} \cdot \left({x}^{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)\right) + \frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites87.5%

                                        \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)} \]

                                      if -1.55e9 < y < 0.56000000000000005

                                      1. Initial program 77.1%

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

                                        \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
                                      4. Step-by-step derivation
                                        1. Applied rewrites98.0%

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

                                        if 0.56000000000000005 < y < 1.70000000000000009e101

                                        1. Initial program 100.0%

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

                                          \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites73.7%

                                            \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]

                                          if 1.70000000000000009e101 < y

                                          1. Initial program 100.0%

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

                                            \[\leadsto \frac{\sin x \cdot \color{blue}{\left(y \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right)}}{x} \]
                                          4. Step-by-step derivation
                                            1. Applied rewrites97.9%

                                              \[\leadsto \frac{\sin x \cdot \color{blue}{\left(\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot y\right)}}{x} \]
                                          5. Recombined 5 regimes into one program.
                                          6. Add Preprocessing

                                          Alternative 6: 91.7% accurate, 1.4× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \sinh y\\ t_1 := \left(\frac{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)}{x} \cdot y\right) \cdot \sin x\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{+153}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1550000000:\\ \;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\ \mathbf{elif}\;y \leq 0.56:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+109}:\\ \;\;\;\;t\_0 \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                          (FPCore (x y)
                                           :precision binary64
                                           (let* ((t_0 (* 2.0 (sinh y)))
                                                  (t_1 (* (* (/ (fma (* y y) 0.16666666666666666 1.0) x) y) (sin x))))
                                             (if (<= y -1.8e+153)
                                               t_1
                                               (if (<= y -1550000000.0)
                                                 (* t_0 (fma (* x x) -0.08333333333333333 0.5))
                                                 (if (<= y 0.56)
                                                   (* (/ (sin x) x) y)
                                                   (if (<= y 2.3e+109) (* t_0 0.5) t_1))))))
                                          double code(double x, double y) {
                                          	double t_0 = 2.0 * sinh(y);
                                          	double t_1 = ((fma((y * y), 0.16666666666666666, 1.0) / x) * y) * sin(x);
                                          	double tmp;
                                          	if (y <= -1.8e+153) {
                                          		tmp = t_1;
                                          	} else if (y <= -1550000000.0) {
                                          		tmp = t_0 * fma((x * x), -0.08333333333333333, 0.5);
                                          	} else if (y <= 0.56) {
                                          		tmp = (sin(x) / x) * y;
                                          	} else if (y <= 2.3e+109) {
                                          		tmp = t_0 * 0.5;
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x, y)
                                          	t_0 = Float64(2.0 * sinh(y))
                                          	t_1 = Float64(Float64(Float64(fma(Float64(y * y), 0.16666666666666666, 1.0) / x) * y) * sin(x))
                                          	tmp = 0.0
                                          	if (y <= -1.8e+153)
                                          		tmp = t_1;
                                          	elseif (y <= -1550000000.0)
                                          		tmp = Float64(t_0 * fma(Float64(x * x), -0.08333333333333333, 0.5));
                                          	elseif (y <= 0.56)
                                          		tmp = Float64(Float64(sin(x) / x) * y);
                                          	elseif (y <= 2.3e+109)
                                          		tmp = Float64(t_0 * 0.5);
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x_, y_] := Block[{t$95$0 = N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+153], t$95$1, If[LessEqual[y, -1550000000.0], N[(t$95$0 * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.56], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 2.3e+109], N[(t$95$0 * 0.5), $MachinePrecision], t$95$1]]]]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_0 := 2 \cdot \sinh y\\
                                          t_1 := \left(\frac{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)}{x} \cdot y\right) \cdot \sin x\\
                                          \mathbf{if}\;y \leq -1.8 \cdot 10^{+153}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;y \leq -1550000000:\\
                                          \;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\
                                          
                                          \mathbf{elif}\;y \leq 0.56:\\
                                          \;\;\;\;\frac{\sin x}{x} \cdot y\\
                                          
                                          \mathbf{elif}\;y \leq 2.3 \cdot 10^{+109}:\\
                                          \;\;\;\;t\_0 \cdot 0.5\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 4 regimes
                                          2. if y < -1.8e153 or 2.3000000000000001e109 < y

                                            1. Initial program 100.0%

                                              \[\frac{\sin x \cdot \sinh y}{x} \]
                                            2. Add Preprocessing
                                            3. Step-by-step derivation
                                              1. lift-/.f64N/A

                                                \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                              2. lift-*.f64N/A

                                                \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                              3. lift-sin.f64N/A

                                                \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                              4. lift-sinh.f64N/A

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

                                                \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                              6. *-commutativeN/A

                                                \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                              7. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                              8. lower-/.f64N/A

                                                \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                              9. lift-sinh.f64N/A

                                                \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                              10. lift-sin.f64100.0

                                                \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                            4. Applied rewrites100.0%

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

                                              \[\leadsto \color{blue}{\left(y \cdot \left(\frac{1}{6} \cdot \frac{{y}^{2}}{x} + \frac{1}{x}\right)\right)} \cdot \sin x \]
                                            6. Step-by-step derivation
                                              1. Applied rewrites100.0%

                                                \[\leadsto \color{blue}{\left(\frac{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)}{x} \cdot y\right)} \cdot \sin x \]

                                              if -1.8e153 < y < -1.55e9

                                              1. Initial program 100.0%

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

                                                \[\leadsto \color{blue}{\frac{-1}{12} \cdot \left({x}^{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)\right) + \frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites87.5%

                                                  \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)} \]

                                                if -1.55e9 < y < 0.56000000000000005

                                                1. Initial program 77.1%

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

                                                  \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
                                                4. Step-by-step derivation
                                                  1. Applied rewrites98.0%

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

                                                  if 0.56000000000000005 < y < 2.3000000000000001e109

                                                  1. Initial program 100.0%

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

                                                    \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                  4. Step-by-step derivation
                                                    1. Applied rewrites75.0%

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

                                                  Alternative 7: 79.8% accurate, 1.4× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.0112:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin x \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\right)}{x}\\ \end{array} \end{array} \]
                                                  (FPCore (x y)
                                                   :precision binary64
                                                   (if (<= x 0.0112)
                                                     (* (* 2.0 (sinh y)) 0.5)
                                                     (/
                                                      (*
                                                       (sin x)
                                                       (*
                                                        (fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0)
                                                        y))
                                                      x)))
                                                  double code(double x, double y) {
                                                  	double tmp;
                                                  	if (x <= 0.0112) {
                                                  		tmp = (2.0 * sinh(y)) * 0.5;
                                                  	} else {
                                                  		tmp = (sin(x) * (fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y)) / x;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x, y)
                                                  	tmp = 0.0
                                                  	if (x <= 0.0112)
                                                  		tmp = Float64(Float64(2.0 * sinh(y)) * 0.5);
                                                  	else
                                                  		tmp = Float64(Float64(sin(x) * Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y)) / x);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x_, y_] := If[LessEqual[x, 0.0112], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[Sin[x], $MachinePrecision] * N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;x \leq 0.0112:\\
                                                  \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\frac{\sin x \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\right)}{x}\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if x < 0.0111999999999999999

                                                    1. Initial program 85.6%

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

                                                      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                    4. Step-by-step derivation
                                                      1. Applied rewrites77.3%

                                                        \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]

                                                      if 0.0111999999999999999 < x

                                                      1. Initial program 99.9%

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

                                                        \[\leadsto \frac{\sin x \cdot \color{blue}{\left(y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)}}{x} \]
                                                      4. Step-by-step derivation
                                                        1. Applied rewrites85.6%

                                                          \[\leadsto \frac{\sin x \cdot \color{blue}{\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\right)}}{x} \]
                                                      5. Recombined 2 regimes into one program.
                                                      6. Add Preprocessing

                                                      Alternative 8: 79.8% accurate, 1.4× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.0112:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right) \cdot y\right) \cdot y, y, y\right)}{x} \cdot \sin x\\ \end{array} \end{array} \]
                                                      (FPCore (x y)
                                                       :precision binary64
                                                       (if (<= x 0.0112)
                                                         (* (* 2.0 (sinh y)) 0.5)
                                                         (*
                                                          (/
                                                           (fma
                                                            (* (* (fma (* y y) 0.008333333333333333 0.16666666666666666) y) y)
                                                            y
                                                            y)
                                                           x)
                                                          (sin x))))
                                                      double code(double x, double y) {
                                                      	double tmp;
                                                      	if (x <= 0.0112) {
                                                      		tmp = (2.0 * sinh(y)) * 0.5;
                                                      	} else {
                                                      		tmp = (fma(((fma((y * y), 0.008333333333333333, 0.16666666666666666) * y) * y), y, y) / x) * sin(x);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(x, y)
                                                      	tmp = 0.0
                                                      	if (x <= 0.0112)
                                                      		tmp = Float64(Float64(2.0 * sinh(y)) * 0.5);
                                                      	else
                                                      		tmp = Float64(Float64(fma(Float64(Float64(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666) * y) * y), y, y) / x) * sin(x));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[x_, y_] := If[LessEqual[x, 0.0112], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision] * y), $MachinePrecision] * y + y), $MachinePrecision] / x), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;x \leq 0.0112:\\
                                                      \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\frac{\mathsf{fma}\left(\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right) \cdot y\right) \cdot y, y, y\right)}{x} \cdot \sin x\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if x < 0.0111999999999999999

                                                        1. Initial program 85.6%

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

                                                          \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites77.3%

                                                            \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]

                                                          if 0.0111999999999999999 < x

                                                          1. Initial program 99.9%

                                                            \[\frac{\sin x \cdot \sinh y}{x} \]
                                                          2. Add Preprocessing
                                                          3. Step-by-step derivation
                                                            1. lift-/.f64N/A

                                                              \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                                            2. lift-*.f64N/A

                                                              \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                                            3. lift-sin.f64N/A

                                                              \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                                            4. lift-sinh.f64N/A

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

                                                              \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                                            6. *-commutativeN/A

                                                              \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                            7. lower-*.f64N/A

                                                              \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                            8. lower-/.f64N/A

                                                              \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                                            9. lift-sinh.f64N/A

                                                              \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                                            10. lift-sin.f6499.8

                                                              \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                                          4. Applied rewrites99.8%

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

                                                            \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                                                          6. Step-by-step derivation
                                                            1. Applied rewrites85.5%

                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                                                            2. Step-by-step derivation
                                                              1. Applied rewrites85.5%

                                                                \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{1}, y \cdot \left(\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right) \cdot y\right) \cdot y\right)\right)}{x} \cdot \sin x \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites85.5%

                                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right) \cdot y\right) \cdot y, y, y\right)}{x} \cdot \sin x} \]
                                                              3. Recombined 2 regimes into one program.
                                                              4. Add Preprocessing

                                                              Alternative 9: 79.8% accurate, 1.4× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.0112:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \sin x\\ \end{array} \end{array} \]
                                                              (FPCore (x y)
                                                               :precision binary64
                                                               (if (<= x 0.0112)
                                                                 (* (* 2.0 (sinh y)) 0.5)
                                                                 (*
                                                                  (/
                                                                   (*
                                                                    (fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0)
                                                                    y)
                                                                   x)
                                                                  (sin x))))
                                                              double code(double x, double y) {
                                                              	double tmp;
                                                              	if (x <= 0.0112) {
                                                              		tmp = (2.0 * sinh(y)) * 0.5;
                                                              	} else {
                                                              		tmp = ((fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y) / x) * sin(x);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(x, y)
                                                              	tmp = 0.0
                                                              	if (x <= 0.0112)
                                                              		tmp = Float64(Float64(2.0 * sinh(y)) * 0.5);
                                                              	else
                                                              		tmp = Float64(Float64(Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y) / x) * sin(x));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[x_, y_] := If[LessEqual[x, 0.0112], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;x \leq 0.0112:\\
                                                              \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \sin x\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if x < 0.0111999999999999999

                                                                1. Initial program 85.6%

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

                                                                  \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                4. Step-by-step derivation
                                                                  1. Applied rewrites77.3%

                                                                    \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]

                                                                  if 0.0111999999999999999 < x

                                                                  1. Initial program 99.9%

                                                                    \[\frac{\sin x \cdot \sinh y}{x} \]
                                                                  2. Add Preprocessing
                                                                  3. Step-by-step derivation
                                                                    1. lift-/.f64N/A

                                                                      \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                                                    2. lift-*.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                                                    3. lift-sin.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                                                    4. lift-sinh.f64N/A

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

                                                                      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                                                    6. *-commutativeN/A

                                                                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                    7. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                    8. lower-/.f64N/A

                                                                      \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                                                    9. lift-sinh.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                                                    10. lift-sin.f6499.8

                                                                      \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                                                  4. Applied rewrites99.8%

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

                                                                    \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                                                                  6. Step-by-step derivation
                                                                    1. Applied rewrites85.5%

                                                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                                                                  7. Recombined 2 regimes into one program.
                                                                  8. Add Preprocessing

                                                                  Alternative 10: 72.9% accurate, 1.8× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x}\\ \mathbf{if}\;y \leq -1550000000:\\ \;\;\;\;t\_0 \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right)\\ \mathbf{elif}\;y \leq 0.56:\\ \;\;\;\;t\_0 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\ \end{array} \end{array} \]
                                                                  (FPCore (x y)
                                                                   :precision binary64
                                                                   (let* ((t_0
                                                                           (/
                                                                            (*
                                                                             (fma
                                                                              (fma (* y y) 0.008333333333333333 0.16666666666666666)
                                                                              (* y y)
                                                                              1.0)
                                                                             y)
                                                                            x)))
                                                                     (if (<= y -1550000000.0)
                                                                       (* t_0 (* (fma -0.16666666666666666 (* x x) 1.0) x))
                                                                       (if (<= y 0.56) (* t_0 x) (* (* 2.0 (sinh y)) 0.5)))))
                                                                  double code(double x, double y) {
                                                                  	double t_0 = (fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y) / x;
                                                                  	double tmp;
                                                                  	if (y <= -1550000000.0) {
                                                                  		tmp = t_0 * (fma(-0.16666666666666666, (x * x), 1.0) * x);
                                                                  	} else if (y <= 0.56) {
                                                                  		tmp = t_0 * x;
                                                                  	} else {
                                                                  		tmp = (2.0 * sinh(y)) * 0.5;
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(x, y)
                                                                  	t_0 = Float64(Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y) / x)
                                                                  	tmp = 0.0
                                                                  	if (y <= -1550000000.0)
                                                                  		tmp = Float64(t_0 * Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * x));
                                                                  	elseif (y <= 0.56)
                                                                  		tmp = Float64(t_0 * x);
                                                                  	else
                                                                  		tmp = Float64(Float64(2.0 * sinh(y)) * 0.5);
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  code[x_, y_] := Block[{t$95$0 = N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[y, -1550000000.0], N[(t$95$0 * N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.56], N[(t$95$0 * x), $MachinePrecision], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x}\\
                                                                  \mathbf{if}\;y \leq -1550000000:\\
                                                                  \;\;\;\;t\_0 \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right)\\
                                                                  
                                                                  \mathbf{elif}\;y \leq 0.56:\\
                                                                  \;\;\;\;t\_0 \cdot x\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\left(2 \cdot \sinh y\right) \cdot 0.5\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if y < -1.55e9

                                                                    1. Initial program 100.0%

                                                                      \[\frac{\sin x \cdot \sinh y}{x} \]
                                                                    2. Add Preprocessing
                                                                    3. Step-by-step derivation
                                                                      1. lift-/.f64N/A

                                                                        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                                                      2. lift-*.f64N/A

                                                                        \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                                                      3. lift-sin.f64N/A

                                                                        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                                                      4. lift-sinh.f64N/A

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

                                                                        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                                                      6. *-commutativeN/A

                                                                        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                      7. lower-*.f64N/A

                                                                        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                      8. lower-/.f64N/A

                                                                        \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                                                      9. lift-sinh.f64N/A

                                                                        \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                                                      10. lift-sin.f64100.0

                                                                        \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                                                    4. Applied rewrites100.0%

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

                                                                      \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                                                                    6. Step-by-step derivation
                                                                      1. Applied rewrites90.0%

                                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                                                                      2. Taylor expanded in x around 0

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites76.4%

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right)} \]

                                                                        if -1.55e9 < y < 0.56000000000000005

                                                                        1. Initial program 77.1%

                                                                          \[\frac{\sin x \cdot \sinh y}{x} \]
                                                                        2. Add Preprocessing
                                                                        3. Step-by-step derivation
                                                                          1. lift-/.f64N/A

                                                                            \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                                                          2. lift-*.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                                                          3. lift-sin.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                                                          4. lift-sinh.f64N/A

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

                                                                            \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                                                          6. *-commutativeN/A

                                                                            \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                          7. lower-*.f64N/A

                                                                            \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                          8. lower-/.f64N/A

                                                                            \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                                                          9. lift-sinh.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                                                          10. lift-sin.f6499.7

                                                                            \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                                                        4. Applied rewrites99.7%

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

                                                                          \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                                                                        6. Step-by-step derivation
                                                                          1. Applied rewrites98.3%

                                                                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                                                                          2. Taylor expanded in x around 0

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites73.2%

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]

                                                                            if 0.56000000000000005 < y

                                                                            1. Initial program 100.0%

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

                                                                              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                            4. Step-by-step derivation
                                                                              1. Applied rewrites81.5%

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

                                                                            Alternative 11: 70.6% accurate, 3.3× speedup?

                                                                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x}\\ \mathbf{if}\;y \leq -1550000000:\\ \;\;\;\;t\_0 \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot x\\ \end{array} \end{array} \]
                                                                            (FPCore (x y)
                                                                             :precision binary64
                                                                             (let* ((t_0
                                                                                     (/
                                                                                      (*
                                                                                       (fma
                                                                                        (fma (* y y) 0.008333333333333333 0.16666666666666666)
                                                                                        (* y y)
                                                                                        1.0)
                                                                                       y)
                                                                                      x)))
                                                                               (if (<= y -1550000000.0)
                                                                                 (* t_0 (* (fma -0.16666666666666666 (* x x) 1.0) x))
                                                                                 (* t_0 x))))
                                                                            double code(double x, double y) {
                                                                            	double t_0 = (fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y) / x;
                                                                            	double tmp;
                                                                            	if (y <= -1550000000.0) {
                                                                            		tmp = t_0 * (fma(-0.16666666666666666, (x * x), 1.0) * x);
                                                                            	} else {
                                                                            		tmp = t_0 * x;
                                                                            	}
                                                                            	return tmp;
                                                                            }
                                                                            
                                                                            function code(x, y)
                                                                            	t_0 = Float64(Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y) / x)
                                                                            	tmp = 0.0
                                                                            	if (y <= -1550000000.0)
                                                                            		tmp = Float64(t_0 * Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * x));
                                                                            	else
                                                                            		tmp = Float64(t_0 * x);
                                                                            	end
                                                                            	return tmp
                                                                            end
                                                                            
                                                                            code[x_, y_] := Block[{t$95$0 = N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[y, -1550000000.0], N[(t$95$0 * N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * x), $MachinePrecision]]]
                                                                            
                                                                            \begin{array}{l}
                                                                            
                                                                            \\
                                                                            \begin{array}{l}
                                                                            t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x}\\
                                                                            \mathbf{if}\;y \leq -1550000000:\\
                                                                            \;\;\;\;t\_0 \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right)\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;t\_0 \cdot x\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 2 regimes
                                                                            2. if y < -1.55e9

                                                                              1. Initial program 100.0%

                                                                                \[\frac{\sin x \cdot \sinh y}{x} \]
                                                                              2. Add Preprocessing
                                                                              3. Step-by-step derivation
                                                                                1. lift-/.f64N/A

                                                                                  \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                                                                2. lift-*.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                                                                3. lift-sin.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                                                                4. lift-sinh.f64N/A

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

                                                                                  \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                                                                6. *-commutativeN/A

                                                                                  \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                                7. lower-*.f64N/A

                                                                                  \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                                8. lower-/.f64N/A

                                                                                  \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                                                                9. lift-sinh.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                                                                10. lift-sin.f64100.0

                                                                                  \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                                                              4. Applied rewrites100.0%

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

                                                                                \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                                                                              6. Step-by-step derivation
                                                                                1. Applied rewrites90.0%

                                                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                                                                                2. Taylor expanded in x around 0

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites76.4%

                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right)} \]

                                                                                  if -1.55e9 < y

                                                                                  1. Initial program 85.0%

                                                                                    \[\frac{\sin x \cdot \sinh y}{x} \]
                                                                                  2. Add Preprocessing
                                                                                  3. Step-by-step derivation
                                                                                    1. lift-/.f64N/A

                                                                                      \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                                                                    2. lift-*.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                                                                    3. lift-sin.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                                                                    4. lift-sinh.f64N/A

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

                                                                                      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                                                                    6. *-commutativeN/A

                                                                                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                                    7. lower-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                                    8. lower-/.f64N/A

                                                                                      \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                                                                    9. lift-sinh.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                                                                    10. lift-sin.f6499.8

                                                                                      \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                                                                  4. Applied rewrites99.8%

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

                                                                                    \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                                                                                  6. Step-by-step derivation
                                                                                    1. Applied rewrites93.4%

                                                                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                                                                                    2. Taylor expanded in x around 0

                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]
                                                                                    3. Step-by-step derivation
                                                                                      1. Applied rewrites72.1%

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]
                                                                                    4. Recombined 2 regimes into one program.
                                                                                    5. Add Preprocessing

                                                                                    Alternative 12: 69.8% accurate, 3.9× speedup?

                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{+103}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \left(\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot y\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot x\\ \end{array} \end{array} \]
                                                                                    (FPCore (x y)
                                                                                     :precision binary64
                                                                                     (if (<= y -2.05e+103)
                                                                                       (/
                                                                                        (*
                                                                                         (* (fma -0.16666666666666666 (* x x) 1.0) x)
                                                                                         (* (fma (* y y) 0.16666666666666666 1.0) y))
                                                                                        x)
                                                                                       (*
                                                                                        (/
                                                                                         (*
                                                                                          (fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0)
                                                                                          y)
                                                                                         x)
                                                                                        x)))
                                                                                    double code(double x, double y) {
                                                                                    	double tmp;
                                                                                    	if (y <= -2.05e+103) {
                                                                                    		tmp = ((fma(-0.16666666666666666, (x * x), 1.0) * x) * (fma((y * y), 0.16666666666666666, 1.0) * y)) / x;
                                                                                    	} else {
                                                                                    		tmp = ((fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y) / x) * x;
                                                                                    	}
                                                                                    	return tmp;
                                                                                    }
                                                                                    
                                                                                    function code(x, y)
                                                                                    	tmp = 0.0
                                                                                    	if (y <= -2.05e+103)
                                                                                    		tmp = Float64(Float64(Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * x) * Float64(fma(Float64(y * y), 0.16666666666666666, 1.0) * y)) / x);
                                                                                    	else
                                                                                    		tmp = Float64(Float64(Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y) / x) * x);
                                                                                    	end
                                                                                    	return tmp
                                                                                    end
                                                                                    
                                                                                    code[x_, y_] := If[LessEqual[y, -2.05e+103], N[(N[(N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision] * x), $MachinePrecision]]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    
                                                                                    \\
                                                                                    \begin{array}{l}
                                                                                    \mathbf{if}\;y \leq -2.05 \cdot 10^{+103}:\\
                                                                                    \;\;\;\;\frac{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \left(\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot y\right)}{x}\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot x\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 2 regimes
                                                                                    2. if y < -2.0500000000000001e103

                                                                                      1. Initial program 100.0%

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

                                                                                        \[\leadsto \frac{\sin x \cdot \color{blue}{\left(y \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right)}}{x} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. Applied rewrites100.0%

                                                                                          \[\leadsto \frac{\sin x \cdot \color{blue}{\left(\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot y\right)}}{x} \]
                                                                                        2. Taylor expanded in x around 0

                                                                                          \[\leadsto \frac{\color{blue}{\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \cdot y\right)}{x} \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites79.5%

                                                                                            \[\leadsto \frac{\color{blue}{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right)} \cdot \left(\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot y\right)}{x} \]

                                                                                          if -2.0500000000000001e103 < y

                                                                                          1. Initial program 86.6%

                                                                                            \[\frac{\sin x \cdot \sinh y}{x} \]
                                                                                          2. Add Preprocessing
                                                                                          3. Step-by-step derivation
                                                                                            1. lift-/.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                                                                            2. lift-*.f64N/A

                                                                                              \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                                                                            3. lift-sin.f64N/A

                                                                                              \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                                                                            4. lift-sinh.f64N/A

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

                                                                                              \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                                                                            6. *-commutativeN/A

                                                                                              \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                                            7. lower-*.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                                            8. lower-/.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                                                                            9. lift-sinh.f64N/A

                                                                                              \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                                                                            10. lift-sin.f6499.8

                                                                                              \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                                                                          4. Applied rewrites99.8%

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

                                                                                            \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                                                                                          6. Step-by-step derivation
                                                                                            1. Applied rewrites90.9%

                                                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                                                                                            2. Taylor expanded in x around 0

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites71.0%

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]
                                                                                            4. Recombined 2 regimes into one program.
                                                                                            5. Add Preprocessing

                                                                                            Alternative 13: 63.2% accurate, 4.8× speedup?

                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.75 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right) \cdot y, y, 1\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\ \end{array} \end{array} \]
                                                                                            (FPCore (x y)
                                                                                             :precision binary64
                                                                                             (if (<= x 1.75e+87)
                                                                                               (*
                                                                                                (fma
                                                                                                 (*
                                                                                                  (fma
                                                                                                   (fma (* y y) 0.0001984126984126984 0.008333333333333333)
                                                                                                   (* y y)
                                                                                                   0.16666666666666666)
                                                                                                  y)
                                                                                                 y
                                                                                                 1.0)
                                                                                                y)
                                                                                               (* (* (* y y) 0.16666666666666666) y)))
                                                                                            double code(double x, double y) {
                                                                                            	double tmp;
                                                                                            	if (x <= 1.75e+87) {
                                                                                            		tmp = fma((fma(fma((y * y), 0.0001984126984126984, 0.008333333333333333), (y * y), 0.16666666666666666) * y), y, 1.0) * y;
                                                                                            	} else {
                                                                                            		tmp = ((y * y) * 0.16666666666666666) * y;
                                                                                            	}
                                                                                            	return tmp;
                                                                                            }
                                                                                            
                                                                                            function code(x, y)
                                                                                            	tmp = 0.0
                                                                                            	if (x <= 1.75e+87)
                                                                                            		tmp = Float64(fma(Float64(fma(fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), Float64(y * y), 0.16666666666666666) * y), y, 1.0) * y);
                                                                                            	else
                                                                                            		tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * y);
                                                                                            	end
                                                                                            	return tmp
                                                                                            end
                                                                                            
                                                                                            code[x_, y_] := If[LessEqual[x, 1.75e+87], N[(N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision] * y + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision]]
                                                                                            
                                                                                            \begin{array}{l}
                                                                                            
                                                                                            \\
                                                                                            \begin{array}{l}
                                                                                            \mathbf{if}\;x \leq 1.75 \cdot 10^{+87}:\\
                                                                                            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right) \cdot y, y, 1\right) \cdot y\\
                                                                                            
                                                                                            \mathbf{else}:\\
                                                                                            \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\
                                                                                            
                                                                                            
                                                                                            \end{array}
                                                                                            \end{array}
                                                                                            
                                                                                            Derivation
                                                                                            1. Split input into 2 regimes
                                                                                            2. if x < 1.74999999999999993e87

                                                                                              1. Initial program 86.6%

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

                                                                                                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                              4. Step-by-step derivation
                                                                                                1. Applied rewrites74.2%

                                                                                                  \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                2. Taylor expanded in y around 0

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

                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot \color{blue}{y} \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. Applied rewrites68.1%

                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right) \cdot y, y, 1\right) \cdot y \]

                                                                                                    if 1.74999999999999993e87 < x

                                                                                                    1. Initial program 99.9%

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

                                                                                                      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. Applied rewrites33.7%

                                                                                                        \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                      2. Taylor expanded in y around 0

                                                                                                        \[\leadsto y \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites27.2%

                                                                                                          \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \color{blue}{y} \]
                                                                                                        2. Taylor expanded in y around inf

                                                                                                          \[\leadsto \left(\frac{1}{6} \cdot {y}^{2}\right) \cdot y \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites44.5%

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

                                                                                                        Alternative 14: 63.2% accurate, 4.9× speedup?

                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.75 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.0001984126984126984, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\ \end{array} \end{array} \]
                                                                                                        (FPCore (x y)
                                                                                                         :precision binary64
                                                                                                         (if (<= x 1.75e+87)
                                                                                                           (*
                                                                                                            (fma
                                                                                                             (fma (* (* y y) 0.0001984126984126984) (* y y) 0.16666666666666666)
                                                                                                             (* y y)
                                                                                                             1.0)
                                                                                                            y)
                                                                                                           (* (* (* y y) 0.16666666666666666) y)))
                                                                                                        double code(double x, double y) {
                                                                                                        	double tmp;
                                                                                                        	if (x <= 1.75e+87) {
                                                                                                        		tmp = fma(fma(((y * y) * 0.0001984126984126984), (y * y), 0.16666666666666666), (y * y), 1.0) * y;
                                                                                                        	} else {
                                                                                                        		tmp = ((y * y) * 0.16666666666666666) * y;
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        function code(x, y)
                                                                                                        	tmp = 0.0
                                                                                                        	if (x <= 1.75e+87)
                                                                                                        		tmp = Float64(fma(fma(Float64(Float64(y * y) * 0.0001984126984126984), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * y);
                                                                                                        	else
                                                                                                        		tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * y);
                                                                                                        	end
                                                                                                        	return tmp
                                                                                                        end
                                                                                                        
                                                                                                        code[x_, y_] := If[LessEqual[x, 1.75e+87], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision]]
                                                                                                        
                                                                                                        \begin{array}{l}
                                                                                                        
                                                                                                        \\
                                                                                                        \begin{array}{l}
                                                                                                        \mathbf{if}\;x \leq 1.75 \cdot 10^{+87}:\\
                                                                                                        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.0001984126984126984, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\\
                                                                                                        
                                                                                                        \mathbf{else}:\\
                                                                                                        \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\
                                                                                                        
                                                                                                        
                                                                                                        \end{array}
                                                                                                        \end{array}
                                                                                                        
                                                                                                        Derivation
                                                                                                        1. Split input into 2 regimes
                                                                                                        2. if x < 1.74999999999999993e87

                                                                                                          1. Initial program 86.6%

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

                                                                                                            \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. Applied rewrites74.2%

                                                                                                              \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                            2. Taylor expanded in y around 0

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

                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot \color{blue}{y} \]
                                                                                                              2. Taylor expanded in y around inf

                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{5040} \cdot {y}^{2}, y \cdot y, \frac{1}{6}\right), y \cdot y, 1\right) \cdot y \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites68.0%

                                                                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.0001984126984126984, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y \]

                                                                                                                if 1.74999999999999993e87 < x

                                                                                                                1. Initial program 99.9%

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

                                                                                                                  \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. Applied rewrites33.7%

                                                                                                                    \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                  2. Taylor expanded in y around 0

                                                                                                                    \[\leadsto y \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites27.2%

                                                                                                                      \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \color{blue}{y} \]
                                                                                                                    2. Taylor expanded in y around inf

                                                                                                                      \[\leadsto \left(\frac{1}{6} \cdot {y}^{2}\right) \cdot y \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites44.5%

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

                                                                                                                    Alternative 15: 69.4% accurate, 4.9× speedup?

                                                                                                                    \[\begin{array}{l} \\ \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot x \end{array} \]
                                                                                                                    (FPCore (x y)
                                                                                                                     :precision binary64
                                                                                                                     (*
                                                                                                                      (/
                                                                                                                       (*
                                                                                                                        (fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0)
                                                                                                                        y)
                                                                                                                       x)
                                                                                                                      x))
                                                                                                                    double code(double x, double y) {
                                                                                                                    	return ((fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y) / x) * x;
                                                                                                                    }
                                                                                                                    
                                                                                                                    function code(x, y)
                                                                                                                    	return Float64(Float64(Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y) / x) * x)
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[x_, y_] := N[(N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision] * x), $MachinePrecision]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    
                                                                                                                    \\
                                                                                                                    \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot x
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Initial program 88.9%

                                                                                                                      \[\frac{\sin x \cdot \sinh y}{x} \]
                                                                                                                    2. Add Preprocessing
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lift-/.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
                                                                                                                      2. lift-*.f64N/A

                                                                                                                        \[\leadsto \frac{\color{blue}{\sin x \cdot \sinh y}}{x} \]
                                                                                                                      3. lift-sin.f64N/A

                                                                                                                        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
                                                                                                                      4. lift-sinh.f64N/A

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

                                                                                                                        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
                                                                                                                      6. *-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                                                                      7. lower-*.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
                                                                                                                      8. lower-/.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\sinh y}{x}} \cdot \sin x \]
                                                                                                                      9. lift-sinh.f64N/A

                                                                                                                        \[\leadsto \frac{\color{blue}{\sinh y}}{x} \cdot \sin x \]
                                                                                                                      10. lift-sin.f6499.9

                                                                                                                        \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{\sin x} \]
                                                                                                                    4. Applied rewrites99.9%

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

                                                                                                                      \[\leadsto \frac{\color{blue}{y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}}{x} \cdot \sin x \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. Applied rewrites92.5%

                                                                                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}}{x} \cdot \sin x \]
                                                                                                                      2. Taylor expanded in x around 0

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites69.7%

                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{x} \cdot \color{blue}{x} \]
                                                                                                                        2. Add Preprocessing

                                                                                                                        Alternative 16: 61.4% accurate, 6.4× speedup?

                                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.75 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right) \cdot y, y, 1\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\ \end{array} \end{array} \]
                                                                                                                        (FPCore (x y)
                                                                                                                         :precision binary64
                                                                                                                         (if (<= x 1.75e+87)
                                                                                                                           (*
                                                                                                                            (fma (* (fma (* y y) 0.008333333333333333 0.16666666666666666) y) y 1.0)
                                                                                                                            y)
                                                                                                                           (* (* (* y y) 0.16666666666666666) y)))
                                                                                                                        double code(double x, double y) {
                                                                                                                        	double tmp;
                                                                                                                        	if (x <= 1.75e+87) {
                                                                                                                        		tmp = fma((fma((y * y), 0.008333333333333333, 0.16666666666666666) * y), y, 1.0) * y;
                                                                                                                        	} else {
                                                                                                                        		tmp = ((y * y) * 0.16666666666666666) * y;
                                                                                                                        	}
                                                                                                                        	return tmp;
                                                                                                                        }
                                                                                                                        
                                                                                                                        function code(x, y)
                                                                                                                        	tmp = 0.0
                                                                                                                        	if (x <= 1.75e+87)
                                                                                                                        		tmp = Float64(fma(Float64(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666) * y), y, 1.0) * y);
                                                                                                                        	else
                                                                                                                        		tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * y);
                                                                                                                        	end
                                                                                                                        	return tmp
                                                                                                                        end
                                                                                                                        
                                                                                                                        code[x_, y_] := If[LessEqual[x, 1.75e+87], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision] * y + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision]]
                                                                                                                        
                                                                                                                        \begin{array}{l}
                                                                                                                        
                                                                                                                        \\
                                                                                                                        \begin{array}{l}
                                                                                                                        \mathbf{if}\;x \leq 1.75 \cdot 10^{+87}:\\
                                                                                                                        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right) \cdot y, y, 1\right) \cdot y\\
                                                                                                                        
                                                                                                                        \mathbf{else}:\\
                                                                                                                        \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\
                                                                                                                        
                                                                                                                        
                                                                                                                        \end{array}
                                                                                                                        \end{array}
                                                                                                                        
                                                                                                                        Derivation
                                                                                                                        1. Split input into 2 regimes
                                                                                                                        2. if x < 1.74999999999999993e87

                                                                                                                          1. Initial program 86.6%

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

                                                                                                                            \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                          4. Step-by-step derivation
                                                                                                                            1. Applied rewrites74.2%

                                                                                                                              \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                            2. Taylor expanded in y around 0

                                                                                                                              \[\leadsto y \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
                                                                                                                            3. Step-by-step derivation
                                                                                                                              1. Applied rewrites65.8%

                                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot \color{blue}{y} \]
                                                                                                                              2. Step-by-step derivation
                                                                                                                                1. Applied rewrites65.8%

                                                                                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right) \cdot y, y, 1\right) \cdot y \]

                                                                                                                                if 1.74999999999999993e87 < x

                                                                                                                                1. Initial program 99.9%

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

                                                                                                                                  \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                                4. Step-by-step derivation
                                                                                                                                  1. Applied rewrites33.7%

                                                                                                                                    \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                                  2. Taylor expanded in y around 0

                                                                                                                                    \[\leadsto y \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                                                                                                                                  3. Step-by-step derivation
                                                                                                                                    1. Applied rewrites27.2%

                                                                                                                                      \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \color{blue}{y} \]
                                                                                                                                    2. Taylor expanded in y around inf

                                                                                                                                      \[\leadsto \left(\frac{1}{6} \cdot {y}^{2}\right) \cdot y \]
                                                                                                                                    3. Step-by-step derivation
                                                                                                                                      1. Applied rewrites44.5%

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

                                                                                                                                    Alternative 17: 61.2% accurate, 6.6× speedup?

                                                                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.75 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\ \end{array} \end{array} \]
                                                                                                                                    (FPCore (x y)
                                                                                                                                     :precision binary64
                                                                                                                                     (if (<= x 1.75e+87)
                                                                                                                                       (* (fma (* (* y y) 0.008333333333333333) (* y y) 1.0) y)
                                                                                                                                       (* (* (* y y) 0.16666666666666666) y)))
                                                                                                                                    double code(double x, double y) {
                                                                                                                                    	double tmp;
                                                                                                                                    	if (x <= 1.75e+87) {
                                                                                                                                    		tmp = fma(((y * y) * 0.008333333333333333), (y * y), 1.0) * y;
                                                                                                                                    	} else {
                                                                                                                                    		tmp = ((y * y) * 0.16666666666666666) * y;
                                                                                                                                    	}
                                                                                                                                    	return tmp;
                                                                                                                                    }
                                                                                                                                    
                                                                                                                                    function code(x, y)
                                                                                                                                    	tmp = 0.0
                                                                                                                                    	if (x <= 1.75e+87)
                                                                                                                                    		tmp = Float64(fma(Float64(Float64(y * y) * 0.008333333333333333), Float64(y * y), 1.0) * y);
                                                                                                                                    	else
                                                                                                                                    		tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * y);
                                                                                                                                    	end
                                                                                                                                    	return tmp
                                                                                                                                    end
                                                                                                                                    
                                                                                                                                    code[x_, y_] := If[LessEqual[x, 1.75e+87], N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision]]
                                                                                                                                    
                                                                                                                                    \begin{array}{l}
                                                                                                                                    
                                                                                                                                    \\
                                                                                                                                    \begin{array}{l}
                                                                                                                                    \mathbf{if}\;x \leq 1.75 \cdot 10^{+87}:\\
                                                                                                                                    \;\;\;\;\mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right) \cdot y\\
                                                                                                                                    
                                                                                                                                    \mathbf{else}:\\
                                                                                                                                    \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    \end{array}
                                                                                                                                    \end{array}
                                                                                                                                    
                                                                                                                                    Derivation
                                                                                                                                    1. Split input into 2 regimes
                                                                                                                                    2. if x < 1.74999999999999993e87

                                                                                                                                      1. Initial program 86.6%

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

                                                                                                                                        \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                                      4. Step-by-step derivation
                                                                                                                                        1. Applied rewrites74.2%

                                                                                                                                          \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                                        2. Taylor expanded in y around 0

                                                                                                                                          \[\leadsto y \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
                                                                                                                                        3. Step-by-step derivation
                                                                                                                                          1. Applied rewrites65.8%

                                                                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot \color{blue}{y} \]
                                                                                                                                          2. Taylor expanded in y around inf

                                                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{1}{120} \cdot {y}^{2}, y \cdot y, 1\right) \cdot y \]
                                                                                                                                          3. Step-by-step derivation
                                                                                                                                            1. Applied rewrites65.8%

                                                                                                                                              \[\leadsto \mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right) \cdot y \]

                                                                                                                                            if 1.74999999999999993e87 < x

                                                                                                                                            1. Initial program 99.9%

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

                                                                                                                                              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                                            4. Step-by-step derivation
                                                                                                                                              1. Applied rewrites33.7%

                                                                                                                                                \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                                              2. Taylor expanded in y around 0

                                                                                                                                                \[\leadsto y \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                1. Applied rewrites27.2%

                                                                                                                                                  \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \color{blue}{y} \]
                                                                                                                                                2. Taylor expanded in y around inf

                                                                                                                                                  \[\leadsto \left(\frac{1}{6} \cdot {y}^{2}\right) \cdot y \]
                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                  1. Applied rewrites44.5%

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

                                                                                                                                                Alternative 18: 50.2% accurate, 7.7× speedup?

                                                                                                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{-18} \lor \neg \left(y \leq 6.6 \cdot 10^{-46}\right):\\ \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                                                                                                                                                (FPCore (x y)
                                                                                                                                                 :precision binary64
                                                                                                                                                 (if (or (<= y -2.25e-18) (not (<= y 6.6e-46)))
                                                                                                                                                   (* (* (* y y) 0.16666666666666666) y)
                                                                                                                                                   y))
                                                                                                                                                double code(double x, double y) {
                                                                                                                                                	double tmp;
                                                                                                                                                	if ((y <= -2.25e-18) || !(y <= 6.6e-46)) {
                                                                                                                                                		tmp = ((y * y) * 0.16666666666666666) * y;
                                                                                                                                                	} else {
                                                                                                                                                		tmp = y;
                                                                                                                                                	}
                                                                                                                                                	return tmp;
                                                                                                                                                }
                                                                                                                                                
                                                                                                                                                module fmin_fmax_functions
                                                                                                                                                    implicit none
                                                                                                                                                    private
                                                                                                                                                    public fmax
                                                                                                                                                    public fmin
                                                                                                                                                
                                                                                                                                                    interface fmax
                                                                                                                                                        module procedure fmax88
                                                                                                                                                        module procedure fmax44
                                                                                                                                                        module procedure fmax84
                                                                                                                                                        module procedure fmax48
                                                                                                                                                    end interface
                                                                                                                                                    interface fmin
                                                                                                                                                        module procedure fmin88
                                                                                                                                                        module procedure fmin44
                                                                                                                                                        module procedure fmin84
                                                                                                                                                        module procedure fmin48
                                                                                                                                                    end interface
                                                                                                                                                contains
                                                                                                                                                    real(8) function fmax88(x, y) result (res)
                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(4) function fmax44(x, y) result (res)
                                                                                                                                                        real(4), intent (in) :: x
                                                                                                                                                        real(4), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmax84(x, y) result(res)
                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                        real(4), intent (in) :: y
                                                                                                                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmax48(x, y) result(res)
                                                                                                                                                        real(4), intent (in) :: x
                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmin88(x, y) result (res)
                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(4) function fmin44(x, y) result (res)
                                                                                                                                                        real(4), intent (in) :: x
                                                                                                                                                        real(4), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmin84(x, y) result(res)
                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                        real(4), intent (in) :: y
                                                                                                                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmin48(x, y) result(res)
                                                                                                                                                        real(4), intent (in) :: x
                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                end module
                                                                                                                                                
                                                                                                                                                real(8) function code(x, y)
                                                                                                                                                use fmin_fmax_functions
                                                                                                                                                    real(8), intent (in) :: x
                                                                                                                                                    real(8), intent (in) :: y
                                                                                                                                                    real(8) :: tmp
                                                                                                                                                    if ((y <= (-2.25d-18)) .or. (.not. (y <= 6.6d-46))) then
                                                                                                                                                        tmp = ((y * y) * 0.16666666666666666d0) * y
                                                                                                                                                    else
                                                                                                                                                        tmp = y
                                                                                                                                                    end if
                                                                                                                                                    code = tmp
                                                                                                                                                end function
                                                                                                                                                
                                                                                                                                                public static double code(double x, double y) {
                                                                                                                                                	double tmp;
                                                                                                                                                	if ((y <= -2.25e-18) || !(y <= 6.6e-46)) {
                                                                                                                                                		tmp = ((y * y) * 0.16666666666666666) * y;
                                                                                                                                                	} else {
                                                                                                                                                		tmp = y;
                                                                                                                                                	}
                                                                                                                                                	return tmp;
                                                                                                                                                }
                                                                                                                                                
                                                                                                                                                def code(x, y):
                                                                                                                                                	tmp = 0
                                                                                                                                                	if (y <= -2.25e-18) or not (y <= 6.6e-46):
                                                                                                                                                		tmp = ((y * y) * 0.16666666666666666) * y
                                                                                                                                                	else:
                                                                                                                                                		tmp = y
                                                                                                                                                	return tmp
                                                                                                                                                
                                                                                                                                                function code(x, y)
                                                                                                                                                	tmp = 0.0
                                                                                                                                                	if ((y <= -2.25e-18) || !(y <= 6.6e-46))
                                                                                                                                                		tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * y);
                                                                                                                                                	else
                                                                                                                                                		tmp = y;
                                                                                                                                                	end
                                                                                                                                                	return tmp
                                                                                                                                                end
                                                                                                                                                
                                                                                                                                                function tmp_2 = code(x, y)
                                                                                                                                                	tmp = 0.0;
                                                                                                                                                	if ((y <= -2.25e-18) || ~((y <= 6.6e-46)))
                                                                                                                                                		tmp = ((y * y) * 0.16666666666666666) * y;
                                                                                                                                                	else
                                                                                                                                                		tmp = y;
                                                                                                                                                	end
                                                                                                                                                	tmp_2 = tmp;
                                                                                                                                                end
                                                                                                                                                
                                                                                                                                                code[x_, y_] := If[Or[LessEqual[y, -2.25e-18], N[Not[LessEqual[y, 6.6e-46]], $MachinePrecision]], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision], y]
                                                                                                                                                
                                                                                                                                                \begin{array}{l}
                                                                                                                                                
                                                                                                                                                \\
                                                                                                                                                \begin{array}{l}
                                                                                                                                                \mathbf{if}\;y \leq -2.25 \cdot 10^{-18} \lor \neg \left(y \leq 6.6 \cdot 10^{-46}\right):\\
                                                                                                                                                \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\
                                                                                                                                                
                                                                                                                                                \mathbf{else}:\\
                                                                                                                                                \;\;\;\;y\\
                                                                                                                                                
                                                                                                                                                
                                                                                                                                                \end{array}
                                                                                                                                                \end{array}
                                                                                                                                                
                                                                                                                                                Derivation
                                                                                                                                                1. Split input into 2 regimes
                                                                                                                                                2. if y < -2.24999999999999997e-18 or 6.60000000000000027e-46 < y

                                                                                                                                                  1. Initial program 100.0%

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

                                                                                                                                                    \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                                                  4. Step-by-step derivation
                                                                                                                                                    1. Applied rewrites71.6%

                                                                                                                                                      \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                                                    2. Taylor expanded in y around 0

                                                                                                                                                      \[\leadsto y \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                      1. Applied rewrites49.4%

                                                                                                                                                        \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \color{blue}{y} \]
                                                                                                                                                      2. Taylor expanded in y around inf

                                                                                                                                                        \[\leadsto \left(\frac{1}{6} \cdot {y}^{2}\right) \cdot y \]
                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                        1. Applied rewrites49.4%

                                                                                                                                                          \[\leadsto \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y \]

                                                                                                                                                        if -2.24999999999999997e-18 < y < 6.60000000000000027e-46

                                                                                                                                                        1. Initial program 75.6%

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

                                                                                                                                                          \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                                                        4. Step-by-step derivation
                                                                                                                                                          1. Applied rewrites61.9%

                                                                                                                                                            \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                                                          2. Taylor expanded in y around 0

                                                                                                                                                            \[\leadsto y \]
                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                            1. Applied rewrites61.9%

                                                                                                                                                              \[\leadsto y \]
                                                                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                                                                          5. Final simplification55.1%

                                                                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{-18} \lor \neg \left(y \leq 6.6 \cdot 10^{-46}\right):\\ \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
                                                                                                                                                          6. Add Preprocessing

                                                                                                                                                          Alternative 19: 57.5% accurate, 9.4× speedup?

                                                                                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.3 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(y, 0.16666666666666666 \cdot y, 1\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\ \end{array} \end{array} \]
                                                                                                                                                          (FPCore (x y)
                                                                                                                                                           :precision binary64
                                                                                                                                                           (if (<= x 2.3e+24)
                                                                                                                                                             (* (fma y (* 0.16666666666666666 y) 1.0) y)
                                                                                                                                                             (* (* (* y y) 0.16666666666666666) y)))
                                                                                                                                                          double code(double x, double y) {
                                                                                                                                                          	double tmp;
                                                                                                                                                          	if (x <= 2.3e+24) {
                                                                                                                                                          		tmp = fma(y, (0.16666666666666666 * y), 1.0) * y;
                                                                                                                                                          	} else {
                                                                                                                                                          		tmp = ((y * y) * 0.16666666666666666) * y;
                                                                                                                                                          	}
                                                                                                                                                          	return tmp;
                                                                                                                                                          }
                                                                                                                                                          
                                                                                                                                                          function code(x, y)
                                                                                                                                                          	tmp = 0.0
                                                                                                                                                          	if (x <= 2.3e+24)
                                                                                                                                                          		tmp = Float64(fma(y, Float64(0.16666666666666666 * y), 1.0) * y);
                                                                                                                                                          	else
                                                                                                                                                          		tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * y);
                                                                                                                                                          	end
                                                                                                                                                          	return tmp
                                                                                                                                                          end
                                                                                                                                                          
                                                                                                                                                          code[x_, y_] := If[LessEqual[x, 2.3e+24], N[(N[(y * N[(0.16666666666666666 * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * y), $MachinePrecision]]
                                                                                                                                                          
                                                                                                                                                          \begin{array}{l}
                                                                                                                                                          
                                                                                                                                                          \\
                                                                                                                                                          \begin{array}{l}
                                                                                                                                                          \mathbf{if}\;x \leq 2.3 \cdot 10^{+24}:\\
                                                                                                                                                          \;\;\;\;\mathsf{fma}\left(y, 0.16666666666666666 \cdot y, 1\right) \cdot y\\
                                                                                                                                                          
                                                                                                                                                          \mathbf{else}:\\
                                                                                                                                                          \;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot y\\
                                                                                                                                                          
                                                                                                                                                          
                                                                                                                                                          \end{array}
                                                                                                                                                          \end{array}
                                                                                                                                                          
                                                                                                                                                          Derivation
                                                                                                                                                          1. Split input into 2 regimes
                                                                                                                                                          2. if x < 2.2999999999999999e24

                                                                                                                                                            1. Initial program 86.0%

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

                                                                                                                                                              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                              1. Applied rewrites76.7%

                                                                                                                                                                \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                                                              2. Taylor expanded in y around 0

                                                                                                                                                                \[\leadsto y \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                                1. Applied rewrites63.2%

                                                                                                                                                                  \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \color{blue}{y} \]
                                                                                                                                                                2. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites63.2%

                                                                                                                                                                    \[\leadsto \mathsf{fma}\left(y, 0.16666666666666666 \cdot y, 1\right) \cdot y \]

                                                                                                                                                                  if 2.2999999999999999e24 < x

                                                                                                                                                                  1. Initial program 99.9%

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

                                                                                                                                                                    \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                                                                  4. Step-by-step derivation
                                                                                                                                                                    1. Applied rewrites31.7%

                                                                                                                                                                      \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                                                                    2. Taylor expanded in y around 0

                                                                                                                                                                      \[\leadsto y \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                      1. Applied rewrites24.6%

                                                                                                                                                                        \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \color{blue}{y} \]
                                                                                                                                                                      2. Taylor expanded in y around inf

                                                                                                                                                                        \[\leadsto \left(\frac{1}{6} \cdot {y}^{2}\right) \cdot y \]
                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                        1. Applied rewrites38.8%

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

                                                                                                                                                                      Alternative 20: 28.5% accurate, 217.0× speedup?

                                                                                                                                                                      \[\begin{array}{l} \\ y \end{array} \]
                                                                                                                                                                      (FPCore (x y) :precision binary64 y)
                                                                                                                                                                      double code(double x, double y) {
                                                                                                                                                                      	return y;
                                                                                                                                                                      }
                                                                                                                                                                      
                                                                                                                                                                      module fmin_fmax_functions
                                                                                                                                                                          implicit none
                                                                                                                                                                          private
                                                                                                                                                                          public fmax
                                                                                                                                                                          public fmin
                                                                                                                                                                      
                                                                                                                                                                          interface fmax
                                                                                                                                                                              module procedure fmax88
                                                                                                                                                                              module procedure fmax44
                                                                                                                                                                              module procedure fmax84
                                                                                                                                                                              module procedure fmax48
                                                                                                                                                                          end interface
                                                                                                                                                                          interface fmin
                                                                                                                                                                              module procedure fmin88
                                                                                                                                                                              module procedure fmin44
                                                                                                                                                                              module procedure fmin84
                                                                                                                                                                              module procedure fmin48
                                                                                                                                                                          end interface
                                                                                                                                                                      contains
                                                                                                                                                                          real(8) function fmax88(x, y) result (res)
                                                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                          end function
                                                                                                                                                                          real(4) function fmax44(x, y) result (res)
                                                                                                                                                                              real(4), intent (in) :: x
                                                                                                                                                                              real(4), intent (in) :: y
                                                                                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                          end function
                                                                                                                                                                          real(8) function fmax84(x, y) result(res)
                                                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                                                              real(4), intent (in) :: y
                                                                                                                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                          end function
                                                                                                                                                                          real(8) function fmax48(x, y) result(res)
                                                                                                                                                                              real(4), intent (in) :: x
                                                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                                          end function
                                                                                                                                                                          real(8) function fmin88(x, y) result (res)
                                                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                          end function
                                                                                                                                                                          real(4) function fmin44(x, y) result (res)
                                                                                                                                                                              real(4), intent (in) :: x
                                                                                                                                                                              real(4), intent (in) :: y
                                                                                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                          end function
                                                                                                                                                                          real(8) function fmin84(x, y) result(res)
                                                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                                                              real(4), intent (in) :: y
                                                                                                                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                          end function
                                                                                                                                                                          real(8) function fmin48(x, y) result(res)
                                                                                                                                                                              real(4), intent (in) :: x
                                                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                                          end function
                                                                                                                                                                      end module
                                                                                                                                                                      
                                                                                                                                                                      real(8) function code(x, y)
                                                                                                                                                                      use fmin_fmax_functions
                                                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                                                          code = y
                                                                                                                                                                      end function
                                                                                                                                                                      
                                                                                                                                                                      public static double code(double x, double y) {
                                                                                                                                                                      	return y;
                                                                                                                                                                      }
                                                                                                                                                                      
                                                                                                                                                                      def code(x, y):
                                                                                                                                                                      	return y
                                                                                                                                                                      
                                                                                                                                                                      function code(x, y)
                                                                                                                                                                      	return y
                                                                                                                                                                      end
                                                                                                                                                                      
                                                                                                                                                                      function tmp = code(x, y)
                                                                                                                                                                      	tmp = y;
                                                                                                                                                                      end
                                                                                                                                                                      
                                                                                                                                                                      code[x_, y_] := y
                                                                                                                                                                      
                                                                                                                                                                      \begin{array}{l}
                                                                                                                                                                      
                                                                                                                                                                      \\
                                                                                                                                                                      y
                                                                                                                                                                      \end{array}
                                                                                                                                                                      
                                                                                                                                                                      Derivation
                                                                                                                                                                      1. Initial program 88.9%

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

                                                                                                                                                                        \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                                                                                                                                                      4. Step-by-step derivation
                                                                                                                                                                        1. Applied rewrites67.2%

                                                                                                                                                                          \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot 0.5} \]
                                                                                                                                                                        2. Taylor expanded in y around 0

                                                                                                                                                                          \[\leadsto y \]
                                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                                          1. Applied rewrites30.4%

                                                                                                                                                                            \[\leadsto y \]
                                                                                                                                                                          2. Add Preprocessing

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

                                                                                                                                                                          \[\begin{array}{l} \\ \sin x \cdot \frac{\sinh y}{x} \end{array} \]
                                                                                                                                                                          (FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) x)))
                                                                                                                                                                          double code(double x, double y) {
                                                                                                                                                                          	return sin(x) * (sinh(y) / x);
                                                                                                                                                                          }
                                                                                                                                                                          
                                                                                                                                                                          module fmin_fmax_functions
                                                                                                                                                                              implicit none
                                                                                                                                                                              private
                                                                                                                                                                              public fmax
                                                                                                                                                                              public fmin
                                                                                                                                                                          
                                                                                                                                                                              interface fmax
                                                                                                                                                                                  module procedure fmax88
                                                                                                                                                                                  module procedure fmax44
                                                                                                                                                                                  module procedure fmax84
                                                                                                                                                                                  module procedure fmax48
                                                                                                                                                                              end interface
                                                                                                                                                                              interface fmin
                                                                                                                                                                                  module procedure fmin88
                                                                                                                                                                                  module procedure fmin44
                                                                                                                                                                                  module procedure fmin84
                                                                                                                                                                                  module procedure fmin48
                                                                                                                                                                              end interface
                                                                                                                                                                          contains
                                                                                                                                                                              real(8) function fmax88(x, y) result (res)
                                                                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                              end function
                                                                                                                                                                              real(4) function fmax44(x, y) result (res)
                                                                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                              end function
                                                                                                                                                                              real(8) function fmax84(x, y) result(res)
                                                                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                              end function
                                                                                                                                                                              real(8) function fmax48(x, y) result(res)
                                                                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                                              end function
                                                                                                                                                                              real(8) function fmin88(x, y) result (res)
                                                                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                              end function
                                                                                                                                                                              real(4) function fmin44(x, y) result (res)
                                                                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                              end function
                                                                                                                                                                              real(8) function fmin84(x, y) result(res)
                                                                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                              end function
                                                                                                                                                                              real(8) function fmin48(x, y) result(res)
                                                                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                                              end function
                                                                                                                                                                          end module
                                                                                                                                                                          
                                                                                                                                                                          real(8) function code(x, y)
                                                                                                                                                                          use fmin_fmax_functions
                                                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                                                              code = sin(x) * (sinh(y) / x)
                                                                                                                                                                          end function
                                                                                                                                                                          
                                                                                                                                                                          public static double code(double x, double y) {
                                                                                                                                                                          	return Math.sin(x) * (Math.sinh(y) / x);
                                                                                                                                                                          }
                                                                                                                                                                          
                                                                                                                                                                          def code(x, y):
                                                                                                                                                                          	return math.sin(x) * (math.sinh(y) / x)
                                                                                                                                                                          
                                                                                                                                                                          function code(x, y)
                                                                                                                                                                          	return Float64(sin(x) * Float64(sinh(y) / x))
                                                                                                                                                                          end
                                                                                                                                                                          
                                                                                                                                                                          function tmp = code(x, y)
                                                                                                                                                                          	tmp = sin(x) * (sinh(y) / x);
                                                                                                                                                                          end
                                                                                                                                                                          
                                                                                                                                                                          code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                                          
                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                          
                                                                                                                                                                          \\
                                                                                                                                                                          \sin x \cdot \frac{\sinh y}{x}
                                                                                                                                                                          \end{array}
                                                                                                                                                                          

                                                                                                                                                                          Reproduce

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