Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 88.6% → 99.8%
Time: 3.9s
Alternatives: 14
Speedup: 1.0×

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}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 88.6% 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, 0.3× speedup?

\[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\ y\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(\left(\left(y\_m \cdot y\_m\right) \cdot 0.3333333333333333\right) \cdot y\_m\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-87}:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(0.008333333333333333 \cdot \left(x \cdot x\right) - 0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y\_m}{x}\\ \end{array} \end{array} \end{array} \]
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
 :precision binary64
 (let* ((t_0 (/ (* (sin x) (sinh y_m)) x)))
   (*
    y_s
    (if (<= t_0 (- INFINITY))
      (*
       (* (* (* y_m y_m) 0.3333333333333333) y_m)
       (fma (* x x) -0.08333333333333333 0.5))
      (if (<= t_0 2e-87)
        (* (/ (sin x) x) y_m)
        (/
         (*
          (*
           (fma
            (- (* 0.008333333333333333 (* x x)) 0.16666666666666666)
            (* x x)
            1.0)
           x)
          (sinh y_m))
         x))))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
	double t_0 = (sin(x) * sinh(y_m)) / x;
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = (((y_m * y_m) * 0.3333333333333333) * y_m) * fma((x * x), -0.08333333333333333, 0.5);
	} else if (t_0 <= 2e-87) {
		tmp = (sin(x) / x) * y_m;
	} else {
		tmp = ((fma(((0.008333333333333333 * (x * x)) - 0.16666666666666666), (x * x), 1.0) * x) * sinh(y_m)) / x;
	}
	return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0, y)
function code(y_s, x, y_m)
	t_0 = Float64(Float64(sin(x) * sinh(y_m)) / x)
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(Float64(y_m * y_m) * 0.3333333333333333) * y_m) * fma(Float64(x * x), -0.08333333333333333, 0.5));
	elseif (t_0 <= 2e-87)
		tmp = Float64(Float64(sin(x) / x) * y_m);
	else
		tmp = Float64(Float64(Float64(fma(Float64(Float64(0.008333333333333333 * Float64(x * x)) - 0.16666666666666666), Float64(x * x), 1.0) * x) * sinh(y_m)) / x);
	end
	return Float64(y_s * tmp)
end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] * y$95$m), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-87], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(N[(N[(N[(N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision] - 0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)

\\
\begin{array}{l}
t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\left(\left(y\_m \cdot y\_m\right) \cdot 0.3333333333333333\right) \cdot y\_m\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-87}:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\_m\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(\mathsf{fma}\left(0.008333333333333333 \cdot \left(x \cdot x\right) - 0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y\_m}{x}\\


\end{array}
\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 99.9%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. 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)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{12} \cdot {x}^{2}\right) \cdot \left(e^{y} - \frac{1}{e^{y}}\right) + \color{blue}{\frac{1}{2}} \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
      2. distribute-rgt-outN/A

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

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

        \[\leadsto \left(e^{y} - e^{\mathsf{neg}\left(y\right)}\right) \cdot \left(\frac{-1}{12} \cdot \color{blue}{{x}^{2}} + \frac{1}{2}\right) \]
      5. sinh-undefN/A

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

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left(\color{blue}{\frac{-1}{12} \cdot {x}^{2}} + \frac{1}{2}\right) \]
      7. lift-sinh.f64N/A

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

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left({x}^{2} \cdot \frac{-1}{12} + \frac{1}{2}\right) \]
      9. lower-fma.f64N/A

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left({x}^{2}, \color{blue}{\frac{-1}{12}}, \frac{1}{2}\right) \]
      10. unpow2N/A

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      11. lower-*.f6499.9

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
    4. Applied rewrites99.9%

      \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)} \]
    5. Taylor expanded in y around 0

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

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

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

        \[\leadsto \left(\left(\frac{1}{3} \cdot {y}^{2} + 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{fma}\left(\frac{1}{3}, {y}^{2}, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      5. unpow2N/A

        \[\leadsto \left(\mathsf{fma}\left(\frac{1}{3}, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      6. lower-*.f6493.0

        \[\leadsto \left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
    7. Applied rewrites93.0%

      \[\leadsto \left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, -0.08333333333333333, 0.5\right) \]
    8. Taylor expanded in y around inf

      \[\leadsto \left(\left(\frac{1}{3} \cdot {y}^{2}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\left({y}^{2} \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left({y}^{2} \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      3. pow2N/A

        \[\leadsto \left(\left(\left(y \cdot y\right) \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      4. lift-*.f6493.0

        \[\leadsto \left(\left(\left(y \cdot y\right) \cdot 0.3333333333333333\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
    10. Applied rewrites93.0%

      \[\leadsto \left(\left(\left(y \cdot y\right) \cdot 0.3333333333333333\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]

    if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000004e-87

    1. Initial program 74.0%

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

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

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

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

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

        \[\leadsto \frac{\sin x}{x} \cdot y \]
      5. lift-sin.f6498.9

        \[\leadsto \frac{\sin x}{x} \cdot y \]
    4. Applied rewrites98.9%

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

    if 2.00000000000000004e-87 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto \frac{\left(\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot {x}^{2} + 1\right) \cdot x\right) \cdot \sinh y}{x} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
      6. lower--.f64N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
      8. unpow2N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{1}{120} \cdot \left(x \cdot x\right) - \frac{1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{1}{120} \cdot \left(x \cdot x\right) - \frac{1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
      10. unpow2N/A

        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{1}{120} \cdot \left(x \cdot x\right) - \frac{1}{6}, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
      11. lower-*.f6498.7

        \[\leadsto \frac{\left(\mathsf{fma}\left(0.008333333333333333 \cdot \left(x \cdot x\right) - 0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
    4. Applied rewrites98.7%

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

Alternative 2: 98.1% accurate, 1.0× speedup?

\[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot \left(\frac{\sinh y\_m}{x} \cdot \sin x\right) \end{array} \]
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m) :precision binary64 (* y_s (* (/ (sinh y_m) x) (sin x))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
	return y_s * ((sinh(y_m) / x) * sin(x));
}
y\_m =     private
y\_s =     private
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(y_s, x, y_m)
use fmin_fmax_functions
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y_m
    code = y_s * ((sinh(y_m) / x) * sin(x))
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m) {
	return y_s * ((Math.sinh(y_m) / x) * Math.sin(x));
}
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
def code(y_s, x, y_m):
	return y_s * ((math.sinh(y_m) / x) * math.sin(x))
y\_m = abs(y)
y\_s = copysign(1.0, y)
function code(y_s, x, y_m)
	return Float64(y_s * Float64(Float64(sinh(y_m) / x) * sin(x)))
end
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
function tmp = code(y_s, x, y_m)
	tmp = y_s * ((sinh(y_m) / x) * sin(x));
end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * N[(N[(N[Sinh[y$95$m], $MachinePrecision] / x), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)

\\
y\_s \cdot \left(\frac{\sinh y\_m}{x} \cdot \sin x\right)
\end{array}
Derivation
  1. Initial program 88.6%

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. 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} \]
  3. Applied rewrites99.8%

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

Alternative 3: 86.1% accurate, 0.6× speedup?

\[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -1 \cdot 10^{-300}:\\ \;\;\;\;\left(\left(\left(y\_m \cdot y\_m\right) \cdot 0.3333333333333333\right) \cdot y\_m\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{2 \cdot \sinh y\_m}{x} \cdot 0.5\right) \cdot x\\ \end{array} \end{array} \]
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
 :precision binary64
 (*
  y_s
  (if (<= (/ (* (sin x) (sinh y_m)) x) -1e-300)
    (*
     (* (* (* y_m y_m) 0.3333333333333333) y_m)
     (fma (* x x) -0.08333333333333333 0.5))
    (* (* (/ (* 2.0 (sinh y_m)) x) 0.5) x))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
	double tmp;
	if (((sin(x) * sinh(y_m)) / x) <= -1e-300) {
		tmp = (((y_m * y_m) * 0.3333333333333333) * y_m) * fma((x * x), -0.08333333333333333, 0.5);
	} else {
		tmp = (((2.0 * sinh(y_m)) / x) * 0.5) * x;
	}
	return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0, y)
function code(y_s, x, y_m)
	tmp = 0.0
	if (Float64(Float64(sin(x) * sinh(y_m)) / x) <= -1e-300)
		tmp = Float64(Float64(Float64(Float64(y_m * y_m) * 0.3333333333333333) * y_m) * fma(Float64(x * x), -0.08333333333333333, 0.5));
	else
		tmp = Float64(Float64(Float64(Float64(2.0 * sinh(y_m)) / x) * 0.5) * x);
	end
	return Float64(y_s * tmp)
end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-300], N[(N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] * y$95$m), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] * 0.5), $MachinePrecision] * x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)

\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -1 \cdot 10^{-300}:\\
\;\;\;\;\left(\left(\left(y\_m \cdot y\_m\right) \cdot 0.3333333333333333\right) \cdot y\_m\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{2 \cdot \sinh y\_m}{x} \cdot 0.5\right) \cdot x\\


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

    1. Initial program 99.8%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. 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)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{12} \cdot {x}^{2}\right) \cdot \left(e^{y} - \frac{1}{e^{y}}\right) + \color{blue}{\frac{1}{2}} \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
      2. distribute-rgt-outN/A

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

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

        \[\leadsto \left(e^{y} - e^{\mathsf{neg}\left(y\right)}\right) \cdot \left(\frac{-1}{12} \cdot \color{blue}{{x}^{2}} + \frac{1}{2}\right) \]
      5. sinh-undefN/A

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

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left(\color{blue}{\frac{-1}{12} \cdot {x}^{2}} + \frac{1}{2}\right) \]
      7. lift-sinh.f64N/A

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

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left({x}^{2} \cdot \frac{-1}{12} + \frac{1}{2}\right) \]
      9. lower-fma.f64N/A

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left({x}^{2}, \color{blue}{\frac{-1}{12}}, \frac{1}{2}\right) \]
      10. unpow2N/A

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      11. lower-*.f6468.0

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
    4. Applied rewrites68.0%

      \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)} \]
    5. Taylor expanded in y around 0

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

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

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

        \[\leadsto \left(\left(\frac{1}{3} \cdot {y}^{2} + 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \left(\mathsf{fma}\left(\frac{1}{3}, {y}^{2}, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      5. unpow2N/A

        \[\leadsto \left(\mathsf{fma}\left(\frac{1}{3}, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      6. lower-*.f6463.4

        \[\leadsto \left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
    7. Applied rewrites63.4%

      \[\leadsto \left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, -0.08333333333333333, 0.5\right) \]
    8. Taylor expanded in y around inf

      \[\leadsto \left(\left(\frac{1}{3} \cdot {y}^{2}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\left({y}^{2} \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left({y}^{2} \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      3. pow2N/A

        \[\leadsto \left(\left(\left(y \cdot y\right) \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      4. lift-*.f6463.8

        \[\leadsto \left(\left(\left(y \cdot y\right) \cdot 0.3333333333333333\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
    10. Applied rewrites63.8%

      \[\leadsto \left(\left(\left(y \cdot y\right) \cdot 0.3333333333333333\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]

    if -1.00000000000000003e-300 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 86.2%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. 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} \]
    3. Applied rewrites99.8%

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

      \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
    5. Step-by-step derivation
      1. Applied rewrites91.1%

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

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

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

          \[\leadsto \left(\frac{e^{y} - \frac{1}{e^{y}}}{x} \cdot \color{blue}{\frac{1}{2}}\right) \cdot x \]
        3. lower-/.f64N/A

          \[\leadsto \left(\frac{e^{y} - \frac{1}{e^{y}}}{x} \cdot \frac{1}{2}\right) \cdot x \]
        4. rec-expN/A

          \[\leadsto \left(\frac{e^{y} - e^{\mathsf{neg}\left(y\right)}}{x} \cdot \frac{1}{2}\right) \cdot x \]
        5. sinh-undefN/A

          \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot \frac{1}{2}\right) \cdot x \]
        6. lower-*.f64N/A

          \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot \frac{1}{2}\right) \cdot x \]
        7. lift-sinh.f6491.1

          \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot 0.5\right) \cdot x \]
      4. Applied rewrites91.1%

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

    Alternative 4: 86.1% accurate, 0.7× speedup?

    \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -1 \cdot 10^{-300}:\\ \;\;\;\;\left(\left(\left(y\_m \cdot y\_m\right) \cdot 0.3333333333333333\right) \cdot y\_m\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sinh y\_m}{x} \cdot x\\ \end{array} \end{array} \]
    y\_m = (fabs.f64 y)
    y\_s = (copysign.f64 #s(literal 1 binary64) y)
    (FPCore (y_s x y_m)
     :precision binary64
     (*
      y_s
      (if (<= (/ (* (sin x) (sinh y_m)) x) -1e-300)
        (*
         (* (* (* y_m y_m) 0.3333333333333333) y_m)
         (fma (* x x) -0.08333333333333333 0.5))
        (* (/ (sinh y_m) x) x))))
    y\_m = fabs(y);
    y\_s = copysign(1.0, y);
    double code(double y_s, double x, double y_m) {
    	double tmp;
    	if (((sin(x) * sinh(y_m)) / x) <= -1e-300) {
    		tmp = (((y_m * y_m) * 0.3333333333333333) * y_m) * fma((x * x), -0.08333333333333333, 0.5);
    	} else {
    		tmp = (sinh(y_m) / x) * x;
    	}
    	return y_s * tmp;
    }
    
    y\_m = abs(y)
    y\_s = copysign(1.0, y)
    function code(y_s, x, y_m)
    	tmp = 0.0
    	if (Float64(Float64(sin(x) * sinh(y_m)) / x) <= -1e-300)
    		tmp = Float64(Float64(Float64(Float64(y_m * y_m) * 0.3333333333333333) * y_m) * fma(Float64(x * x), -0.08333333333333333, 0.5));
    	else
    		tmp = Float64(Float64(sinh(y_m) / x) * x);
    	end
    	return Float64(y_s * tmp)
    end
    
    y\_m = N[Abs[y], $MachinePrecision]
    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[y$95$s_, x_, y$95$m_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-300], N[(N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] * y$95$m), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y$95$m], $MachinePrecision] / x), $MachinePrecision] * x), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    y\_m = \left|y\right|
    \\
    y\_s = \mathsf{copysign}\left(1, y\right)
    
    \\
    y\_s \cdot \begin{array}{l}
    \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -1 \cdot 10^{-300}:\\
    \;\;\;\;\left(\left(\left(y\_m \cdot y\_m\right) \cdot 0.3333333333333333\right) \cdot y\_m\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\sinh y\_m}{x} \cdot x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.00000000000000003e-300

      1. Initial program 99.8%

        \[\frac{\sin x \cdot \sinh y}{x} \]
      2. 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)} \]
      3. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{12} \cdot {x}^{2}\right) \cdot \left(e^{y} - \frac{1}{e^{y}}\right) + \color{blue}{\frac{1}{2}} \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
        2. distribute-rgt-outN/A

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

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

          \[\leadsto \left(e^{y} - e^{\mathsf{neg}\left(y\right)}\right) \cdot \left(\frac{-1}{12} \cdot \color{blue}{{x}^{2}} + \frac{1}{2}\right) \]
        5. sinh-undefN/A

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

          \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left(\color{blue}{\frac{-1}{12} \cdot {x}^{2}} + \frac{1}{2}\right) \]
        7. lift-sinh.f64N/A

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

          \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left({x}^{2} \cdot \frac{-1}{12} + \frac{1}{2}\right) \]
        9. lower-fma.f64N/A

          \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left({x}^{2}, \color{blue}{\frac{-1}{12}}, \frac{1}{2}\right) \]
        10. unpow2N/A

          \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
        11. lower-*.f6468.0

          \[\leadsto \left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
      4. Applied rewrites68.0%

        \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right)} \]
      5. Taylor expanded in y around 0

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

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

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

          \[\leadsto \left(\left(\frac{1}{3} \cdot {y}^{2} + 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
        4. lower-fma.f64N/A

          \[\leadsto \left(\mathsf{fma}\left(\frac{1}{3}, {y}^{2}, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
        5. unpow2N/A

          \[\leadsto \left(\mathsf{fma}\left(\frac{1}{3}, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
        6. lower-*.f6463.4

          \[\leadsto \left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
      7. Applied rewrites63.4%

        \[\leadsto \left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, -0.08333333333333333, 0.5\right) \]
      8. Taylor expanded in y around inf

        \[\leadsto \left(\left(\frac{1}{3} \cdot {y}^{2}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
      9. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left(\left({y}^{2} \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
        2. lower-*.f64N/A

          \[\leadsto \left(\left({y}^{2} \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
        3. pow2N/A

          \[\leadsto \left(\left(\left(y \cdot y\right) \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, \frac{-1}{12}, \frac{1}{2}\right) \]
        4. lift-*.f6463.8

          \[\leadsto \left(\left(\left(y \cdot y\right) \cdot 0.3333333333333333\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]
      10. Applied rewrites63.8%

        \[\leadsto \left(\left(\left(y \cdot y\right) \cdot 0.3333333333333333\right) \cdot y\right) \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, 0.5\right) \]

      if -1.00000000000000003e-300 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

      1. Initial program 86.2%

        \[\frac{\sin x \cdot \sinh y}{x} \]
      2. 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} \]
      3. Applied rewrites99.8%

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

        \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
      5. Step-by-step derivation
        1. Applied rewrites91.1%

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

      Alternative 5: 84.9% accurate, 0.4× speedup?

      \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\ y\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\ \;\;\;\;\frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y\_m}{x}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\left(\frac{y\_m + y\_m}{x} \cdot 0.5\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sinh y\_m\right) \cdot 0.5\\ \end{array} \end{array} \end{array} \]
      y\_m = (fabs.f64 y)
      y\_s = (copysign.f64 #s(literal 1 binary64) y)
      (FPCore (y_s x y_m)
       :precision binary64
       (let* ((t_0 (/ (* (sin x) (sinh y_m)) x)))
         (*
          y_s
          (if (<= t_0 -2e-213)
            (/ (* (* (* (* x x) -0.16666666666666666) x) y_m) x)
            (if (<= t_0 0.0)
              (* (* (/ (+ y_m y_m) x) 0.5) x)
              (* (* 2.0 (sinh y_m)) 0.5))))))
      y\_m = fabs(y);
      y\_s = copysign(1.0, y);
      double code(double y_s, double x, double y_m) {
      	double t_0 = (sin(x) * sinh(y_m)) / x;
      	double tmp;
      	if (t_0 <= -2e-213) {
      		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x;
      	} else if (t_0 <= 0.0) {
      		tmp = (((y_m + y_m) / x) * 0.5) * x;
      	} else {
      		tmp = (2.0 * sinh(y_m)) * 0.5;
      	}
      	return y_s * tmp;
      }
      
      y\_m =     private
      y\_s =     private
      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(y_s, x, y_m)
      use fmin_fmax_functions
          real(8), intent (in) :: y_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y_m
          real(8) :: t_0
          real(8) :: tmp
          t_0 = (sin(x) * sinh(y_m)) / x
          if (t_0 <= (-2d-213)) then
              tmp = ((((x * x) * (-0.16666666666666666d0)) * x) * y_m) / x
          else if (t_0 <= 0.0d0) then
              tmp = (((y_m + y_m) / x) * 0.5d0) * x
          else
              tmp = (2.0d0 * sinh(y_m)) * 0.5d0
          end if
          code = y_s * tmp
      end function
      
      y\_m = Math.abs(y);
      y\_s = Math.copySign(1.0, y);
      public static double code(double y_s, double x, double y_m) {
      	double t_0 = (Math.sin(x) * Math.sinh(y_m)) / x;
      	double tmp;
      	if (t_0 <= -2e-213) {
      		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x;
      	} else if (t_0 <= 0.0) {
      		tmp = (((y_m + y_m) / x) * 0.5) * x;
      	} else {
      		tmp = (2.0 * Math.sinh(y_m)) * 0.5;
      	}
      	return y_s * tmp;
      }
      
      y\_m = math.fabs(y)
      y\_s = math.copysign(1.0, y)
      def code(y_s, x, y_m):
      	t_0 = (math.sin(x) * math.sinh(y_m)) / x
      	tmp = 0
      	if t_0 <= -2e-213:
      		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x
      	elif t_0 <= 0.0:
      		tmp = (((y_m + y_m) / x) * 0.5) * x
      	else:
      		tmp = (2.0 * math.sinh(y_m)) * 0.5
      	return y_s * tmp
      
      y\_m = abs(y)
      y\_s = copysign(1.0, y)
      function code(y_s, x, y_m)
      	t_0 = Float64(Float64(sin(x) * sinh(y_m)) / x)
      	tmp = 0.0
      	if (t_0 <= -2e-213)
      		tmp = Float64(Float64(Float64(Float64(Float64(x * x) * -0.16666666666666666) * x) * y_m) / x);
      	elseif (t_0 <= 0.0)
      		tmp = Float64(Float64(Float64(Float64(y_m + y_m) / x) * 0.5) * x);
      	else
      		tmp = Float64(Float64(2.0 * sinh(y_m)) * 0.5);
      	end
      	return Float64(y_s * tmp)
      end
      
      y\_m = abs(y);
      y\_s = sign(y) * abs(1.0);
      function tmp_2 = code(y_s, x, y_m)
      	t_0 = (sin(x) * sinh(y_m)) / x;
      	tmp = 0.0;
      	if (t_0 <= -2e-213)
      		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x;
      	elseif (t_0 <= 0.0)
      		tmp = (((y_m + y_m) / x) * 0.5) * x;
      	else
      		tmp = (2.0 * sinh(y_m)) * 0.5;
      	end
      	tmp_2 = y_s * tmp;
      end
      
      y\_m = N[Abs[y], $MachinePrecision]
      y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -2e-213], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x), $MachinePrecision] * y$95$m), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[(N[(y$95$m + y$95$m), $MachinePrecision] / x), $MachinePrecision] * 0.5), $MachinePrecision] * x), $MachinePrecision], N[(N[(2.0 * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]]), $MachinePrecision]]
      
      \begin{array}{l}
      y\_m = \left|y\right|
      \\
      y\_s = \mathsf{copysign}\left(1, y\right)
      
      \\
      \begin{array}{l}
      t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\
      y\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\
      \;\;\;\;\frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y\_m}{x}\\
      
      \mathbf{elif}\;t\_0 \leq 0:\\
      \;\;\;\;\left(\frac{y\_m + y\_m}{x} \cdot 0.5\right) \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(2 \cdot \sinh y\_m\right) \cdot 0.5\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213

        1. Initial program 99.8%

          \[\frac{\sin x \cdot \sinh y}{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 \sinh y}{x} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

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

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

            \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot x\right) \cdot \sinh y}{x} \]
          4. lower-fma.f64N/A

            \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{-1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
          5. unpow2N/A

            \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
          6. lower-*.f6481.8

            \[\leadsto \frac{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
        4. Applied rewrites81.8%

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

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

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

            \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x\right) \cdot y}{x} \]
          3. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \frac{\left(\left({x}^{2} \cdot \frac{-1}{6}\right) \cdot x\right) \cdot y}{x} \]
            3. pow2N/A

              \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot x\right) \cdot y}{x} \]
            4. lift-*.f6468.1

              \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
          4. Applied rewrites68.1%

            \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]

          if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0

          1. Initial program 59.8%

            \[\frac{\sin x \cdot \sinh y}{x} \]
          2. 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} \]
          3. Applied rewrites99.9%

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

            \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
          5. Step-by-step derivation
            1. Applied rewrites84.8%

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

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

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

                \[\leadsto \left(\frac{e^{y} - \frac{1}{e^{y}}}{x} \cdot \color{blue}{\frac{1}{2}}\right) \cdot x \]
              3. lower-/.f64N/A

                \[\leadsto \left(\frac{e^{y} - \frac{1}{e^{y}}}{x} \cdot \frac{1}{2}\right) \cdot x \]
              4. rec-expN/A

                \[\leadsto \left(\frac{e^{y} - e^{\mathsf{neg}\left(y\right)}}{x} \cdot \frac{1}{2}\right) \cdot x \]
              5. sinh-undefN/A

                \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot \frac{1}{2}\right) \cdot x \]
              6. lower-*.f64N/A

                \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot \frac{1}{2}\right) \cdot x \]
              7. lift-sinh.f6484.9

                \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot 0.5\right) \cdot x \]
            4. Applied rewrites84.9%

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

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

                \[\leadsto \left(\frac{2 \cdot y}{x} \cdot \frac{1}{2}\right) \cdot x \]
              2. lower-/.f64N/A

                \[\leadsto \left(\frac{2 \cdot y}{x} \cdot \frac{1}{2}\right) \cdot x \]
              3. count-2-revN/A

                \[\leadsto \left(\frac{y + y}{x} \cdot \frac{1}{2}\right) \cdot x \]
              4. lift-+.f6484.9

                \[\leadsto \left(\frac{y + y}{x} \cdot 0.5\right) \cdot x \]
            7. Applied rewrites84.9%

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

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

            1. Initial program 98.9%

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

              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
            3. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. rec-expN/A

                \[\leadsto \left(e^{y} - e^{\mathsf{neg}\left(y\right)}\right) \cdot \frac{1}{2} \]
              4. sinh-undefN/A

                \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
              5. lower-*.f64N/A

                \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
              6. lift-sinh.f6489.2

                \[\leadsto \left(2 \cdot \sinh y\right) \cdot 0.5 \]
            4. Applied rewrites89.2%

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

          Alternative 6: 84.8% accurate, 0.7× speedup?

          \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\ \;\;\;\;\frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y\_m}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sinh y\_m}{x} \cdot x\\ \end{array} \end{array} \]
          y\_m = (fabs.f64 y)
          y\_s = (copysign.f64 #s(literal 1 binary64) y)
          (FPCore (y_s x y_m)
           :precision binary64
           (*
            y_s
            (if (<= (/ (* (sin x) (sinh y_m)) x) -2e-213)
              (/ (* (* (* (* x x) -0.16666666666666666) x) y_m) x)
              (* (/ (sinh y_m) x) x))))
          y\_m = fabs(y);
          y\_s = copysign(1.0, y);
          double code(double y_s, double x, double y_m) {
          	double tmp;
          	if (((sin(x) * sinh(y_m)) / x) <= -2e-213) {
          		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x;
          	} else {
          		tmp = (sinh(y_m) / x) * x;
          	}
          	return y_s * tmp;
          }
          
          y\_m =     private
          y\_s =     private
          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(y_s, x, y_m)
          use fmin_fmax_functions
              real(8), intent (in) :: y_s
              real(8), intent (in) :: x
              real(8), intent (in) :: y_m
              real(8) :: tmp
              if (((sin(x) * sinh(y_m)) / x) <= (-2d-213)) then
                  tmp = ((((x * x) * (-0.16666666666666666d0)) * x) * y_m) / x
              else
                  tmp = (sinh(y_m) / x) * x
              end if
              code = y_s * tmp
          end function
          
          y\_m = Math.abs(y);
          y\_s = Math.copySign(1.0, y);
          public static double code(double y_s, double x, double y_m) {
          	double tmp;
          	if (((Math.sin(x) * Math.sinh(y_m)) / x) <= -2e-213) {
          		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x;
          	} else {
          		tmp = (Math.sinh(y_m) / x) * x;
          	}
          	return y_s * tmp;
          }
          
          y\_m = math.fabs(y)
          y\_s = math.copysign(1.0, y)
          def code(y_s, x, y_m):
          	tmp = 0
          	if ((math.sin(x) * math.sinh(y_m)) / x) <= -2e-213:
          		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x
          	else:
          		tmp = (math.sinh(y_m) / x) * x
          	return y_s * tmp
          
          y\_m = abs(y)
          y\_s = copysign(1.0, y)
          function code(y_s, x, y_m)
          	tmp = 0.0
          	if (Float64(Float64(sin(x) * sinh(y_m)) / x) <= -2e-213)
          		tmp = Float64(Float64(Float64(Float64(Float64(x * x) * -0.16666666666666666) * x) * y_m) / x);
          	else
          		tmp = Float64(Float64(sinh(y_m) / x) * x);
          	end
          	return Float64(y_s * tmp)
          end
          
          y\_m = abs(y);
          y\_s = sign(y) * abs(1.0);
          function tmp_2 = code(y_s, x, y_m)
          	tmp = 0.0;
          	if (((sin(x) * sinh(y_m)) / x) <= -2e-213)
          		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x;
          	else
          		tmp = (sinh(y_m) / x) * x;
          	end
          	tmp_2 = y_s * tmp;
          end
          
          y\_m = N[Abs[y], $MachinePrecision]
          y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[y$95$s_, x_, y$95$m_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-213], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x), $MachinePrecision] * y$95$m), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[Sinh[y$95$m], $MachinePrecision] / x), $MachinePrecision] * x), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          y\_m = \left|y\right|
          \\
          y\_s = \mathsf{copysign}\left(1, y\right)
          
          \\
          y\_s \cdot \begin{array}{l}
          \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\
          \;\;\;\;\frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y\_m}{x}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\sinh y\_m}{x} \cdot x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213

            1. Initial program 99.8%

              \[\frac{\sin x \cdot \sinh y}{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 \sinh y}{x} \]
            3. Step-by-step derivation
              1. *-commutativeN/A

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

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

                \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot x\right) \cdot \sinh y}{x} \]
              4. lower-fma.f64N/A

                \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{-1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
              5. unpow2N/A

                \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
              6. lower-*.f6481.8

                \[\leadsto \frac{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
            4. Applied rewrites81.8%

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

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

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

                \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x\right) \cdot y}{x} \]
              3. Step-by-step derivation
                1. *-commutativeN/A

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

                  \[\leadsto \frac{\left(\left({x}^{2} \cdot \frac{-1}{6}\right) \cdot x\right) \cdot y}{x} \]
                3. pow2N/A

                  \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot x\right) \cdot y}{x} \]
                4. lift-*.f6468.1

                  \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
              4. Applied rewrites68.1%

                \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]

              if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

              1. Initial program 86.7%

                \[\frac{\sin x \cdot \sinh y}{x} \]
              2. 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} \]
              3. Applied rewrites99.8%

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

                \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
              5. Step-by-step derivation
                1. Applied rewrites87.7%

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

              Alternative 7: 76.7% accurate, 0.7× speedup?

              \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\ \;\;\;\;\frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y\_m}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right)}{x} \cdot y\_m\right) \cdot x\\ \end{array} \end{array} \]
              y\_m = (fabs.f64 y)
              y\_s = (copysign.f64 #s(literal 1 binary64) y)
              (FPCore (y_s x y_m)
               :precision binary64
               (*
                y_s
                (if (<= (/ (* (sin x) (sinh y_m)) x) -2e-213)
                  (/ (* (* (* (* x x) -0.16666666666666666) x) y_m) x)
                  (* (* (/ (fma (* y_m y_m) 0.16666666666666666 1.0) x) y_m) x))))
              y\_m = fabs(y);
              y\_s = copysign(1.0, y);
              double code(double y_s, double x, double y_m) {
              	double tmp;
              	if (((sin(x) * sinh(y_m)) / x) <= -2e-213) {
              		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x;
              	} else {
              		tmp = ((fma((y_m * y_m), 0.16666666666666666, 1.0) / x) * y_m) * x;
              	}
              	return y_s * tmp;
              }
              
              y\_m = abs(y)
              y\_s = copysign(1.0, y)
              function code(y_s, x, y_m)
              	tmp = 0.0
              	if (Float64(Float64(sin(x) * sinh(y_m)) / x) <= -2e-213)
              		tmp = Float64(Float64(Float64(Float64(Float64(x * x) * -0.16666666666666666) * x) * y_m) / x);
              	else
              		tmp = Float64(Float64(Float64(fma(Float64(y_m * y_m), 0.16666666666666666, 1.0) / x) * y_m) * x);
              	end
              	return Float64(y_s * tmp)
              end
              
              y\_m = N[Abs[y], $MachinePrecision]
              y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[y$95$s_, x_, y$95$m_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-213], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x), $MachinePrecision] * y$95$m), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / x), $MachinePrecision] * y$95$m), $MachinePrecision] * x), $MachinePrecision]]), $MachinePrecision]
              
              \begin{array}{l}
              y\_m = \left|y\right|
              \\
              y\_s = \mathsf{copysign}\left(1, y\right)
              
              \\
              y\_s \cdot \begin{array}{l}
              \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\
              \;\;\;\;\frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y\_m}{x}\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(\frac{\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right)}{x} \cdot y\_m\right) \cdot x\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213

                1. Initial program 99.8%

                  \[\frac{\sin x \cdot \sinh y}{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 \sinh y}{x} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

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

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

                    \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot x\right) \cdot \sinh y}{x} \]
                  4. lower-fma.f64N/A

                    \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{-1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
                  5. unpow2N/A

                    \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
                  6. lower-*.f6481.8

                    \[\leadsto \frac{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
                4. Applied rewrites81.8%

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

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

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

                    \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x\right) \cdot y}{x} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

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

                      \[\leadsto \frac{\left(\left({x}^{2} \cdot \frac{-1}{6}\right) \cdot x\right) \cdot y}{x} \]
                    3. pow2N/A

                      \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot x\right) \cdot y}{x} \]
                    4. lift-*.f6468.1

                      \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
                  4. Applied rewrites68.1%

                    \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]

                  if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                  1. Initial program 86.7%

                    \[\frac{\sin x \cdot \sinh y}{x} \]
                  2. 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} \]
                  3. Applied rewrites99.8%

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

                    \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
                  5. Step-by-step derivation
                    1. Applied rewrites87.7%

                      \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
                    2. 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 x \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

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

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

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

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

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

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

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

                        \[\leadsto \left(\frac{{y}^{2} \cdot \frac{1}{6} + 1}{x} \cdot y\right) \cdot x \]
                      9. lower-fma.f64N/A

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

                        \[\leadsto \left(\frac{\mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right)}{x} \cdot y\right) \cdot x \]
                      11. lower-*.f6478.2

                        \[\leadsto \left(\frac{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)}{x} \cdot y\right) \cdot x \]
                    4. Applied rewrites78.2%

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

                  Alternative 8: 72.6% accurate, 0.4× speedup?

                  \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\ y\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\ \;\;\;\;\frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y\_m}{x}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\left(\frac{y\_m + y\_m}{x} \cdot 0.5\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right) \cdot y\_m\\ \end{array} \end{array} \end{array} \]
                  y\_m = (fabs.f64 y)
                  y\_s = (copysign.f64 #s(literal 1 binary64) y)
                  (FPCore (y_s x y_m)
                   :precision binary64
                   (let* ((t_0 (/ (* (sin x) (sinh y_m)) x)))
                     (*
                      y_s
                      (if (<= t_0 -2e-213)
                        (/ (* (* (* (* x x) -0.16666666666666666) x) y_m) x)
                        (if (<= t_0 0.0)
                          (* (* (/ (+ y_m y_m) x) 0.5) x)
                          (* (fma (* y_m y_m) 0.16666666666666666 1.0) y_m))))))
                  y\_m = fabs(y);
                  y\_s = copysign(1.0, y);
                  double code(double y_s, double x, double y_m) {
                  	double t_0 = (sin(x) * sinh(y_m)) / x;
                  	double tmp;
                  	if (t_0 <= -2e-213) {
                  		tmp = ((((x * x) * -0.16666666666666666) * x) * y_m) / x;
                  	} else if (t_0 <= 0.0) {
                  		tmp = (((y_m + y_m) / x) * 0.5) * x;
                  	} else {
                  		tmp = fma((y_m * y_m), 0.16666666666666666, 1.0) * y_m;
                  	}
                  	return y_s * tmp;
                  }
                  
                  y\_m = abs(y)
                  y\_s = copysign(1.0, y)
                  function code(y_s, x, y_m)
                  	t_0 = Float64(Float64(sin(x) * sinh(y_m)) / x)
                  	tmp = 0.0
                  	if (t_0 <= -2e-213)
                  		tmp = Float64(Float64(Float64(Float64(Float64(x * x) * -0.16666666666666666) * x) * y_m) / x);
                  	elseif (t_0 <= 0.0)
                  		tmp = Float64(Float64(Float64(Float64(y_m + y_m) / x) * 0.5) * x);
                  	else
                  		tmp = Float64(fma(Float64(y_m * y_m), 0.16666666666666666, 1.0) * y_m);
                  	end
                  	return Float64(y_s * tmp)
                  end
                  
                  y\_m = N[Abs[y], $MachinePrecision]
                  y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -2e-213], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x), $MachinePrecision] * y$95$m), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[(N[(y$95$m + y$95$m), $MachinePrecision] / x), $MachinePrecision] * 0.5), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] * y$95$m), $MachinePrecision]]]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  y\_m = \left|y\right|
                  \\
                  y\_s = \mathsf{copysign}\left(1, y\right)
                  
                  \\
                  \begin{array}{l}
                  t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\
                  y\_s \cdot \begin{array}{l}
                  \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\
                  \;\;\;\;\frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y\_m}{x}\\
                  
                  \mathbf{elif}\;t\_0 \leq 0:\\
                  \;\;\;\;\left(\frac{y\_m + y\_m}{x} \cdot 0.5\right) \cdot x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right) \cdot y\_m\\
                  
                  
                  \end{array}
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213

                    1. Initial program 99.8%

                      \[\frac{\sin x \cdot \sinh y}{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 \sinh y}{x} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

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

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

                        \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot x\right) \cdot \sinh y}{x} \]
                      4. lower-fma.f64N/A

                        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{-1}{6}, {x}^{2}, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
                      5. unpow2N/A

                        \[\leadsto \frac{\left(\mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
                      6. lower-*.f6481.8

                        \[\leadsto \frac{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \sinh y}{x} \]
                    4. Applied rewrites81.8%

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

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

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

                        \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x\right) \cdot y}{x} \]
                      3. Step-by-step derivation
                        1. *-commutativeN/A

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

                          \[\leadsto \frac{\left(\left({x}^{2} \cdot \frac{-1}{6}\right) \cdot x\right) \cdot y}{x} \]
                        3. pow2N/A

                          \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot x\right) \cdot y}{x} \]
                        4. lift-*.f6468.1

                          \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
                      4. Applied rewrites68.1%

                        \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]

                      if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0

                      1. Initial program 59.8%

                        \[\frac{\sin x \cdot \sinh y}{x} \]
                      2. 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} \]
                      3. Applied rewrites99.9%

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

                        \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
                      5. Step-by-step derivation
                        1. Applied rewrites84.8%

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

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

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

                            \[\leadsto \left(\frac{e^{y} - \frac{1}{e^{y}}}{x} \cdot \color{blue}{\frac{1}{2}}\right) \cdot x \]
                          3. lower-/.f64N/A

                            \[\leadsto \left(\frac{e^{y} - \frac{1}{e^{y}}}{x} \cdot \frac{1}{2}\right) \cdot x \]
                          4. rec-expN/A

                            \[\leadsto \left(\frac{e^{y} - e^{\mathsf{neg}\left(y\right)}}{x} \cdot \frac{1}{2}\right) \cdot x \]
                          5. sinh-undefN/A

                            \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                          6. lower-*.f64N/A

                            \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                          7. lift-sinh.f6484.9

                            \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot 0.5\right) \cdot x \]
                        4. Applied rewrites84.9%

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

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

                            \[\leadsto \left(\frac{2 \cdot y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                          2. lower-/.f64N/A

                            \[\leadsto \left(\frac{2 \cdot y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                          3. count-2-revN/A

                            \[\leadsto \left(\frac{y + y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                          4. lift-+.f6484.9

                            \[\leadsto \left(\frac{y + y}{x} \cdot 0.5\right) \cdot x \]
                        7. Applied rewrites84.9%

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

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

                        1. Initial program 98.9%

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

                          \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                        3. Step-by-step derivation
                          1. *-commutativeN/A

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

                            \[\leadsto \left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}} \]
                          3. rec-expN/A

                            \[\leadsto \left(e^{y} - e^{\mathsf{neg}\left(y\right)}\right) \cdot \frac{1}{2} \]
                          4. sinh-undefN/A

                            \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
                          5. lower-*.f64N/A

                            \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
                          6. lift-sinh.f6489.2

                            \[\leadsto \left(2 \cdot \sinh y\right) \cdot 0.5 \]
                        4. Applied rewrites89.2%

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

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

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

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

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

                            \[\leadsto \left({y}^{2} \cdot \frac{1}{6} + 1\right) \cdot y \]
                          5. lower-fma.f64N/A

                            \[\leadsto \mathsf{fma}\left({y}^{2}, \frac{1}{6}, 1\right) \cdot y \]
                          6. unpow2N/A

                            \[\leadsto \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \cdot y \]
                          7. lower-*.f6468.2

                            \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot y \]
                        7. Applied rewrites68.2%

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

                      Alternative 9: 71.9% accurate, 0.4× speedup?

                      \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\ y\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\ \;\;\;\;\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y\_m\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\left(\frac{y\_m + y\_m}{x} \cdot 0.5\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right) \cdot y\_m\\ \end{array} \end{array} \end{array} \]
                      y\_m = (fabs.f64 y)
                      y\_s = (copysign.f64 #s(literal 1 binary64) y)
                      (FPCore (y_s x y_m)
                       :precision binary64
                       (let* ((t_0 (/ (* (sin x) (sinh y_m)) x)))
                         (*
                          y_s
                          (if (<= t_0 -2e-213)
                            (* (* (* x x) -0.16666666666666666) y_m)
                            (if (<= t_0 0.0)
                              (* (* (/ (+ y_m y_m) x) 0.5) x)
                              (* (fma (* y_m y_m) 0.16666666666666666 1.0) y_m))))))
                      y\_m = fabs(y);
                      y\_s = copysign(1.0, y);
                      double code(double y_s, double x, double y_m) {
                      	double t_0 = (sin(x) * sinh(y_m)) / x;
                      	double tmp;
                      	if (t_0 <= -2e-213) {
                      		tmp = ((x * x) * -0.16666666666666666) * y_m;
                      	} else if (t_0 <= 0.0) {
                      		tmp = (((y_m + y_m) / x) * 0.5) * x;
                      	} else {
                      		tmp = fma((y_m * y_m), 0.16666666666666666, 1.0) * y_m;
                      	}
                      	return y_s * tmp;
                      }
                      
                      y\_m = abs(y)
                      y\_s = copysign(1.0, y)
                      function code(y_s, x, y_m)
                      	t_0 = Float64(Float64(sin(x) * sinh(y_m)) / x)
                      	tmp = 0.0
                      	if (t_0 <= -2e-213)
                      		tmp = Float64(Float64(Float64(x * x) * -0.16666666666666666) * y_m);
                      	elseif (t_0 <= 0.0)
                      		tmp = Float64(Float64(Float64(Float64(y_m + y_m) / x) * 0.5) * x);
                      	else
                      		tmp = Float64(fma(Float64(y_m * y_m), 0.16666666666666666, 1.0) * y_m);
                      	end
                      	return Float64(y_s * tmp)
                      end
                      
                      y\_m = N[Abs[y], $MachinePrecision]
                      y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -2e-213], N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[(N[(y$95$m + y$95$m), $MachinePrecision] / x), $MachinePrecision] * 0.5), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] * y$95$m), $MachinePrecision]]]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      y\_m = \left|y\right|
                      \\
                      y\_s = \mathsf{copysign}\left(1, y\right)
                      
                      \\
                      \begin{array}{l}
                      t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\
                      y\_s \cdot \begin{array}{l}
                      \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\
                      \;\;\;\;\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y\_m\\
                      
                      \mathbf{elif}\;t\_0 \leq 0:\\
                      \;\;\;\;\left(\frac{y\_m + y\_m}{x} \cdot 0.5\right) \cdot x\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right) \cdot y\_m\\
                      
                      
                      \end{array}
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213

                        1. Initial program 99.8%

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

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

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

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

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

                            \[\leadsto \frac{\sin x}{x} \cdot y \]
                          5. lift-sin.f6420.8

                            \[\leadsto \frac{\sin x}{x} \cdot y \]
                        4. Applied rewrites20.8%

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, {x}^{2}, 1\right) \cdot y \]
                          3. pow2N/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot y \]
                          4. lift-*.f6463.2

                            \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y \]
                        7. Applied rewrites63.2%

                          \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y \]
                        8. Taylor expanded in x around inf

                          \[\leadsto \left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot y \]
                        9. Step-by-step derivation
                          1. *-commutativeN/A

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

                            \[\leadsto \left({x}^{2} \cdot \frac{-1}{6}\right) \cdot y \]
                          3. pow2N/A

                            \[\leadsto \left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot y \]
                          4. lift-*.f6463.2

                            \[\leadsto \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y \]
                        10. Applied rewrites63.2%

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

                        if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0

                        1. Initial program 59.8%

                          \[\frac{\sin x \cdot \sinh y}{x} \]
                        2. 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} \]
                        3. Applied rewrites99.9%

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

                          \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
                        5. Step-by-step derivation
                          1. Applied rewrites84.8%

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

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

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

                              \[\leadsto \left(\frac{e^{y} - \frac{1}{e^{y}}}{x} \cdot \color{blue}{\frac{1}{2}}\right) \cdot x \]
                            3. lower-/.f64N/A

                              \[\leadsto \left(\frac{e^{y} - \frac{1}{e^{y}}}{x} \cdot \frac{1}{2}\right) \cdot x \]
                            4. rec-expN/A

                              \[\leadsto \left(\frac{e^{y} - e^{\mathsf{neg}\left(y\right)}}{x} \cdot \frac{1}{2}\right) \cdot x \]
                            5. sinh-undefN/A

                              \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                            6. lower-*.f64N/A

                              \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                            7. lift-sinh.f6484.9

                              \[\leadsto \left(\frac{2 \cdot \sinh y}{x} \cdot 0.5\right) \cdot x \]
                          4. Applied rewrites84.9%

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

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

                              \[\leadsto \left(\frac{2 \cdot y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                            2. lower-/.f64N/A

                              \[\leadsto \left(\frac{2 \cdot y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                            3. count-2-revN/A

                              \[\leadsto \left(\frac{y + y}{x} \cdot \frac{1}{2}\right) \cdot x \]
                            4. lift-+.f6484.9

                              \[\leadsto \left(\frac{y + y}{x} \cdot 0.5\right) \cdot x \]
                          7. Applied rewrites84.9%

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

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

                          1. Initial program 98.9%

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

                            \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                          3. Step-by-step derivation
                            1. *-commutativeN/A

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

                              \[\leadsto \left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}} \]
                            3. rec-expN/A

                              \[\leadsto \left(e^{y} - e^{\mathsf{neg}\left(y\right)}\right) \cdot \frac{1}{2} \]
                            4. sinh-undefN/A

                              \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
                            5. lower-*.f64N/A

                              \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
                            6. lift-sinh.f6489.2

                              \[\leadsto \left(2 \cdot \sinh y\right) \cdot 0.5 \]
                          4. Applied rewrites89.2%

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

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

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

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

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

                              \[\leadsto \left({y}^{2} \cdot \frac{1}{6} + 1\right) \cdot y \]
                            5. lower-fma.f64N/A

                              \[\leadsto \mathsf{fma}\left({y}^{2}, \frac{1}{6}, 1\right) \cdot y \]
                            6. unpow2N/A

                              \[\leadsto \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \cdot y \]
                            7. lower-*.f6468.2

                              \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot y \]
                          7. Applied rewrites68.2%

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

                        Alternative 10: 71.9% accurate, 0.4× speedup?

                        \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\ y\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\ \;\;\;\;\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y\_m\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{y\_m}{x} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right) \cdot y\_m\\ \end{array} \end{array} \end{array} \]
                        y\_m = (fabs.f64 y)
                        y\_s = (copysign.f64 #s(literal 1 binary64) y)
                        (FPCore (y_s x y_m)
                         :precision binary64
                         (let* ((t_0 (/ (* (sin x) (sinh y_m)) x)))
                           (*
                            y_s
                            (if (<= t_0 -2e-213)
                              (* (* (* x x) -0.16666666666666666) y_m)
                              (if (<= t_0 0.0)
                                (* (/ y_m x) x)
                                (* (fma (* y_m y_m) 0.16666666666666666 1.0) y_m))))))
                        y\_m = fabs(y);
                        y\_s = copysign(1.0, y);
                        double code(double y_s, double x, double y_m) {
                        	double t_0 = (sin(x) * sinh(y_m)) / x;
                        	double tmp;
                        	if (t_0 <= -2e-213) {
                        		tmp = ((x * x) * -0.16666666666666666) * y_m;
                        	} else if (t_0 <= 0.0) {
                        		tmp = (y_m / x) * x;
                        	} else {
                        		tmp = fma((y_m * y_m), 0.16666666666666666, 1.0) * y_m;
                        	}
                        	return y_s * tmp;
                        }
                        
                        y\_m = abs(y)
                        y\_s = copysign(1.0, y)
                        function code(y_s, x, y_m)
                        	t_0 = Float64(Float64(sin(x) * sinh(y_m)) / x)
                        	tmp = 0.0
                        	if (t_0 <= -2e-213)
                        		tmp = Float64(Float64(Float64(x * x) * -0.16666666666666666) * y_m);
                        	elseif (t_0 <= 0.0)
                        		tmp = Float64(Float64(y_m / x) * x);
                        	else
                        		tmp = Float64(fma(Float64(y_m * y_m), 0.16666666666666666, 1.0) * y_m);
                        	end
                        	return Float64(y_s * tmp)
                        end
                        
                        y\_m = N[Abs[y], $MachinePrecision]
                        y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                        code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -2e-213], N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(y$95$m / x), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] * y$95$m), $MachinePrecision]]]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        y\_m = \left|y\right|
                        \\
                        y\_s = \mathsf{copysign}\left(1, y\right)
                        
                        \\
                        \begin{array}{l}
                        t_0 := \frac{\sin x \cdot \sinh y\_m}{x}\\
                        y\_s \cdot \begin{array}{l}
                        \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\
                        \;\;\;\;\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y\_m\\
                        
                        \mathbf{elif}\;t\_0 \leq 0:\\
                        \;\;\;\;\frac{y\_m}{x} \cdot x\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right) \cdot y\_m\\
                        
                        
                        \end{array}
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213

                          1. Initial program 99.8%

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

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

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

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

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

                              \[\leadsto \frac{\sin x}{x} \cdot y \]
                            5. lift-sin.f6420.8

                              \[\leadsto \frac{\sin x}{x} \cdot y \]
                          4. Applied rewrites20.8%

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, {x}^{2}, 1\right) \cdot y \]
                            3. pow2N/A

                              \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot y \]
                            4. lift-*.f6463.2

                              \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y \]
                          7. Applied rewrites63.2%

                            \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y \]
                          8. Taylor expanded in x around inf

                            \[\leadsto \left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot y \]
                          9. Step-by-step derivation
                            1. *-commutativeN/A

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

                              \[\leadsto \left({x}^{2} \cdot \frac{-1}{6}\right) \cdot y \]
                            3. pow2N/A

                              \[\leadsto \left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot y \]
                            4. lift-*.f6463.2

                              \[\leadsto \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y \]
                          10. Applied rewrites63.2%

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

                          if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0

                          1. Initial program 59.8%

                            \[\frac{\sin x \cdot \sinh y}{x} \]
                          2. 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} \]
                          3. Applied rewrites99.9%

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

                            \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
                          5. Step-by-step derivation
                            1. Applied rewrites84.8%

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

                              \[\leadsto \frac{\color{blue}{y}}{x} \cdot x \]
                            3. Step-by-step derivation
                              1. Applied rewrites84.8%

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

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

                              1. Initial program 98.9%

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

                                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                              3. Step-by-step derivation
                                1. *-commutativeN/A

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

                                  \[\leadsto \left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}} \]
                                3. rec-expN/A

                                  \[\leadsto \left(e^{y} - e^{\mathsf{neg}\left(y\right)}\right) \cdot \frac{1}{2} \]
                                4. sinh-undefN/A

                                  \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
                                5. lower-*.f64N/A

                                  \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
                                6. lift-sinh.f6489.2

                                  \[\leadsto \left(2 \cdot \sinh y\right) \cdot 0.5 \]
                              4. Applied rewrites89.2%

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

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

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

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

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

                                  \[\leadsto \left({y}^{2} \cdot \frac{1}{6} + 1\right) \cdot y \]
                                5. lower-fma.f64N/A

                                  \[\leadsto \mathsf{fma}\left({y}^{2}, \frac{1}{6}, 1\right) \cdot y \]
                                6. unpow2N/A

                                  \[\leadsto \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \cdot y \]
                                7. lower-*.f6468.2

                                  \[\leadsto \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot y \]
                              7. Applied rewrites68.2%

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

                            Alternative 11: 60.5% accurate, 0.8× speedup?

                            \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\ \;\;\;\;\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{y\_m}{x} \cdot x\\ \end{array} \end{array} \]
                            y\_m = (fabs.f64 y)
                            y\_s = (copysign.f64 #s(literal 1 binary64) y)
                            (FPCore (y_s x y_m)
                             :precision binary64
                             (*
                              y_s
                              (if (<= (/ (* (sin x) (sinh y_m)) x) -2e-213)
                                (* (* (* x x) -0.16666666666666666) y_m)
                                (* (/ y_m x) x))))
                            y\_m = fabs(y);
                            y\_s = copysign(1.0, y);
                            double code(double y_s, double x, double y_m) {
                            	double tmp;
                            	if (((sin(x) * sinh(y_m)) / x) <= -2e-213) {
                            		tmp = ((x * x) * -0.16666666666666666) * y_m;
                            	} else {
                            		tmp = (y_m / x) * x;
                            	}
                            	return y_s * tmp;
                            }
                            
                            y\_m =     private
                            y\_s =     private
                            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(y_s, x, y_m)
                            use fmin_fmax_functions
                                real(8), intent (in) :: y_s
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y_m
                                real(8) :: tmp
                                if (((sin(x) * sinh(y_m)) / x) <= (-2d-213)) then
                                    tmp = ((x * x) * (-0.16666666666666666d0)) * y_m
                                else
                                    tmp = (y_m / x) * x
                                end if
                                code = y_s * tmp
                            end function
                            
                            y\_m = Math.abs(y);
                            y\_s = Math.copySign(1.0, y);
                            public static double code(double y_s, double x, double y_m) {
                            	double tmp;
                            	if (((Math.sin(x) * Math.sinh(y_m)) / x) <= -2e-213) {
                            		tmp = ((x * x) * -0.16666666666666666) * y_m;
                            	} else {
                            		tmp = (y_m / x) * x;
                            	}
                            	return y_s * tmp;
                            }
                            
                            y\_m = math.fabs(y)
                            y\_s = math.copysign(1.0, y)
                            def code(y_s, x, y_m):
                            	tmp = 0
                            	if ((math.sin(x) * math.sinh(y_m)) / x) <= -2e-213:
                            		tmp = ((x * x) * -0.16666666666666666) * y_m
                            	else:
                            		tmp = (y_m / x) * x
                            	return y_s * tmp
                            
                            y\_m = abs(y)
                            y\_s = copysign(1.0, y)
                            function code(y_s, x, y_m)
                            	tmp = 0.0
                            	if (Float64(Float64(sin(x) * sinh(y_m)) / x) <= -2e-213)
                            		tmp = Float64(Float64(Float64(x * x) * -0.16666666666666666) * y_m);
                            	else
                            		tmp = Float64(Float64(y_m / x) * x);
                            	end
                            	return Float64(y_s * tmp)
                            end
                            
                            y\_m = abs(y);
                            y\_s = sign(y) * abs(1.0);
                            function tmp_2 = code(y_s, x, y_m)
                            	tmp = 0.0;
                            	if (((sin(x) * sinh(y_m)) / x) <= -2e-213)
                            		tmp = ((x * x) * -0.16666666666666666) * y_m;
                            	else
                            		tmp = (y_m / x) * x;
                            	end
                            	tmp_2 = y_s * tmp;
                            end
                            
                            y\_m = N[Abs[y], $MachinePrecision]
                            y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                            code[y$95$s_, x_, y$95$m_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-213], N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(y$95$m / x), $MachinePrecision] * x), $MachinePrecision]]), $MachinePrecision]
                            
                            \begin{array}{l}
                            y\_m = \left|y\right|
                            \\
                            y\_s = \mathsf{copysign}\left(1, y\right)
                            
                            \\
                            y\_s \cdot \begin{array}{l}
                            \mathbf{if}\;\frac{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\
                            \;\;\;\;\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y\_m\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{y\_m}{x} \cdot x\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213

                              1. Initial program 99.8%

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

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

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

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

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

                                  \[\leadsto \frac{\sin x}{x} \cdot y \]
                                5. lift-sin.f6420.8

                                  \[\leadsto \frac{\sin x}{x} \cdot y \]
                              4. Applied rewrites20.8%

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, {x}^{2}, 1\right) \cdot y \]
                                3. pow2N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot y \]
                                4. lift-*.f6463.2

                                  \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y \]
                              7. Applied rewrites63.2%

                                \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y \]
                              8. Taylor expanded in x around inf

                                \[\leadsto \left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot y \]
                              9. Step-by-step derivation
                                1. *-commutativeN/A

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

                                  \[\leadsto \left({x}^{2} \cdot \frac{-1}{6}\right) \cdot y \]
                                3. pow2N/A

                                  \[\leadsto \left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot y \]
                                4. lift-*.f6463.2

                                  \[\leadsto \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot y \]
                              10. Applied rewrites63.2%

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

                              if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                              1. Initial program 86.7%

                                \[\frac{\sin x \cdot \sinh y}{x} \]
                              2. 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} \]
                              3. Applied rewrites99.8%

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

                                \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
                              5. Step-by-step derivation
                                1. Applied rewrites87.7%

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

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

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

                                Alternative 12: 51.1% accurate, 7.0× speedup?

                                \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot \left(\frac{y\_m}{x} \cdot x\right) \end{array} \]
                                y\_m = (fabs.f64 y)
                                y\_s = (copysign.f64 #s(literal 1 binary64) y)
                                (FPCore (y_s x y_m) :precision binary64 (* y_s (* (/ y_m x) x)))
                                y\_m = fabs(y);
                                y\_s = copysign(1.0, y);
                                double code(double y_s, double x, double y_m) {
                                	return y_s * ((y_m / x) * x);
                                }
                                
                                y\_m =     private
                                y\_s =     private
                                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(y_s, x, y_m)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: y_s
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y_m
                                    code = y_s * ((y_m / x) * x)
                                end function
                                
                                y\_m = Math.abs(y);
                                y\_s = Math.copySign(1.0, y);
                                public static double code(double y_s, double x, double y_m) {
                                	return y_s * ((y_m / x) * x);
                                }
                                
                                y\_m = math.fabs(y)
                                y\_s = math.copysign(1.0, y)
                                def code(y_s, x, y_m):
                                	return y_s * ((y_m / x) * x)
                                
                                y\_m = abs(y)
                                y\_s = copysign(1.0, y)
                                function code(y_s, x, y_m)
                                	return Float64(y_s * Float64(Float64(y_m / x) * x))
                                end
                                
                                y\_m = abs(y);
                                y\_s = sign(y) * abs(1.0);
                                function tmp = code(y_s, x, y_m)
                                	tmp = y_s * ((y_m / x) * x);
                                end
                                
                                y\_m = N[Abs[y], $MachinePrecision]
                                y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                code[y$95$s_, x_, y$95$m_] := N[(y$95$s * N[(N[(y$95$m / x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]
                                
                                \begin{array}{l}
                                y\_m = \left|y\right|
                                \\
                                y\_s = \mathsf{copysign}\left(1, y\right)
                                
                                \\
                                y\_s \cdot \left(\frac{y\_m}{x} \cdot x\right)
                                \end{array}
                                
                                Derivation
                                1. Initial program 88.6%

                                  \[\frac{\sin x \cdot \sinh y}{x} \]
                                2. 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} \]
                                3. Applied rewrites99.8%

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

                                  \[\leadsto \frac{\sinh y}{x} \cdot \color{blue}{x} \]
                                5. Step-by-step derivation
                                  1. Applied rewrites74.6%

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

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

                                      \[\leadsto \frac{\color{blue}{y}}{x} \cdot x \]
                                    2. Add Preprocessing

                                    Alternative 13: 28.7% accurate, 7.7× speedup?

                                    \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot \left(\left(y\_m + y\_m\right) \cdot 0.5\right) \end{array} \]
                                    y\_m = (fabs.f64 y)
                                    y\_s = (copysign.f64 #s(literal 1 binary64) y)
                                    (FPCore (y_s x y_m) :precision binary64 (* y_s (* (+ y_m y_m) 0.5)))
                                    y\_m = fabs(y);
                                    y\_s = copysign(1.0, y);
                                    double code(double y_s, double x, double y_m) {
                                    	return y_s * ((y_m + y_m) * 0.5);
                                    }
                                    
                                    y\_m =     private
                                    y\_s =     private
                                    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(y_s, x, y_m)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: y_s
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y_m
                                        code = y_s * ((y_m + y_m) * 0.5d0)
                                    end function
                                    
                                    y\_m = Math.abs(y);
                                    y\_s = Math.copySign(1.0, y);
                                    public static double code(double y_s, double x, double y_m) {
                                    	return y_s * ((y_m + y_m) * 0.5);
                                    }
                                    
                                    y\_m = math.fabs(y)
                                    y\_s = math.copysign(1.0, y)
                                    def code(y_s, x, y_m):
                                    	return y_s * ((y_m + y_m) * 0.5)
                                    
                                    y\_m = abs(y)
                                    y\_s = copysign(1.0, y)
                                    function code(y_s, x, y_m)
                                    	return Float64(y_s * Float64(Float64(y_m + y_m) * 0.5))
                                    end
                                    
                                    y\_m = abs(y);
                                    y\_s = sign(y) * abs(1.0);
                                    function tmp = code(y_s, x, y_m)
                                    	tmp = y_s * ((y_m + y_m) * 0.5);
                                    end
                                    
                                    y\_m = N[Abs[y], $MachinePrecision]
                                    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                    code[y$95$s_, x_, y$95$m_] := N[(y$95$s * N[(N[(y$95$m + y$95$m), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    y\_m = \left|y\right|
                                    \\
                                    y\_s = \mathsf{copysign}\left(1, y\right)
                                    
                                    \\
                                    y\_s \cdot \left(\left(y\_m + y\_m\right) \cdot 0.5\right)
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 88.6%

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

                                      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                    3. Step-by-step derivation
                                      1. *-commutativeN/A

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

                                        \[\leadsto \left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}} \]
                                      3. rec-expN/A

                                        \[\leadsto \left(e^{y} - e^{\mathsf{neg}\left(y\right)}\right) \cdot \frac{1}{2} \]
                                      4. sinh-undefN/A

                                        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
                                      5. lower-*.f64N/A

                                        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \frac{1}{2} \]
                                      6. lift-sinh.f6464.4

                                        \[\leadsto \left(2 \cdot \sinh y\right) \cdot 0.5 \]
                                    4. Applied rewrites64.4%

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

                                      \[\leadsto \left(2 \cdot y\right) \cdot \frac{1}{2} \]
                                    6. Step-by-step derivation
                                      1. count-2-revN/A

                                        \[\leadsto \left(y + y\right) \cdot \frac{1}{2} \]
                                      2. lower-+.f6428.7

                                        \[\leadsto \left(y + y\right) \cdot 0.5 \]
                                    7. Applied rewrites28.7%

                                      \[\leadsto \left(y + y\right) \cdot 0.5 \]
                                    8. Add Preprocessing

                                    Alternative 14: 28.7% accurate, 51.3× speedup?

                                    \[\begin{array}{l} y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ y\_s \cdot y\_m \end{array} \]
                                    y\_m = (fabs.f64 y)
                                    y\_s = (copysign.f64 #s(literal 1 binary64) y)
                                    (FPCore (y_s x y_m) :precision binary64 (* y_s y_m))
                                    y\_m = fabs(y);
                                    y\_s = copysign(1.0, y);
                                    double code(double y_s, double x, double y_m) {
                                    	return y_s * y_m;
                                    }
                                    
                                    y\_m =     private
                                    y\_s =     private
                                    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(y_s, x, y_m)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: y_s
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y_m
                                        code = y_s * y_m
                                    end function
                                    
                                    y\_m = Math.abs(y);
                                    y\_s = Math.copySign(1.0, y);
                                    public static double code(double y_s, double x, double y_m) {
                                    	return y_s * y_m;
                                    }
                                    
                                    y\_m = math.fabs(y)
                                    y\_s = math.copysign(1.0, y)
                                    def code(y_s, x, y_m):
                                    	return y_s * y_m
                                    
                                    y\_m = abs(y)
                                    y\_s = copysign(1.0, y)
                                    function code(y_s, x, y_m)
                                    	return Float64(y_s * y_m)
                                    end
                                    
                                    y\_m = abs(y);
                                    y\_s = sign(y) * abs(1.0);
                                    function tmp = code(y_s, x, y_m)
                                    	tmp = y_s * y_m;
                                    end
                                    
                                    y\_m = N[Abs[y], $MachinePrecision]
                                    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                    code[y$95$s_, x_, y$95$m_] := N[(y$95$s * y$95$m), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    y\_m = \left|y\right|
                                    \\
                                    y\_s = \mathsf{copysign}\left(1, y\right)
                                    
                                    \\
                                    y\_s \cdot y\_m
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 88.6%

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

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

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

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

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

                                        \[\leadsto \frac{\sin x}{x} \cdot y \]
                                      5. lift-sin.f6451.6

                                        \[\leadsto \frac{\sin x}{x} \cdot y \]
                                    4. Applied rewrites51.6%

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

                                      \[\leadsto y \]
                                    6. Step-by-step derivation
                                      1. Applied rewrites28.7%

                                        \[\leadsto y \]
                                      2. Add Preprocessing

                                      Reproduce

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