Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 88.7% → 99.8%
Time: 4.4s
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.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

\\
\sin x \cdot \frac{\sinh y}{x}
\end{array}
Derivation
  1. Initial program 88.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. mult-flipN/A

      \[\leadsto \sin x \cdot \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)} \]
    7. sinh-defN/A

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

      \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{\frac{1}{e^{y}}}}{2} \cdot \frac{1}{x}\right) \]
    9. mult-flipN/A

      \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
    10. metadata-evalN/A

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

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

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

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

      \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
    15. metadata-evalN/A

      \[\leadsto \sin x \cdot \left(\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{1}{x}\right) \]
    16. mult-flipN/A

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

      \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}}{2} \cdot \frac{1}{x}\right) \]
    18. sinh-defN/A

      \[\leadsto \sin x \cdot \left(\color{blue}{\sinh y} \cdot \frac{1}{x}\right) \]
  3. Applied rewrites99.8%

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

Alternative 2: 74.2% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sinh y\\


\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 88.7%

      \[\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. Applied rewrites62.9%

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

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

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

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

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{-1}{12}\right) \]
      4. lift-*.f6414.3

        \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left(\left(x \cdot x\right) \cdot -0.08333333333333333\right) \]
    7. Applied rewrites14.3%

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

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

    1. Initial program 88.7%

      \[\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.f6452.2

        \[\leadsto \frac{\sin x}{x} \cdot y \]
    4. Applied rewrites52.2%

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

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

    1. Initial program 88.7%

      \[\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. metadata-evalN/A

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

        \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
      4. rec-expN/A

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

        \[\leadsto \sinh y \]
      6. lift-sinh.f6463.0

        \[\leadsto \sinh y \]
    4. Applied rewrites63.0%

      \[\leadsto \color{blue}{\sinh y} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 73.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -2 \cdot 10^{-185}:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(-0.08333333333333333, x \cdot x, 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\sinh y}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (/ (* (sin x) (sinh y)) x) -2e-185)
   (* (* 2.0 (sinh y)) (fma -0.08333333333333333 (* x x) 0.5))
   (* x (/ (sinh y) x))))
double code(double x, double y) {
	double tmp;
	if (((sin(x) * sinh(y)) / x) <= -2e-185) {
		tmp = (2.0 * sinh(y)) * fma(-0.08333333333333333, (x * x), 0.5);
	} else {
		tmp = x * (sinh(y) / x);
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (Float64(Float64(sin(x) * sinh(y)) / x) <= -2e-185)
		tmp = Float64(Float64(2.0 * sinh(y)) * fma(-0.08333333333333333, Float64(x * x), 0.5));
	else
		tmp = Float64(x * Float64(sinh(y) / x));
	end
	return tmp
end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-185], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * N[(-0.08333333333333333 * N[(x * x), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\


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

    1. Initial program 88.7%

      \[\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. Applied rewrites62.9%

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

    if -2e-185 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 88.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. mult-flipN/A

        \[\leadsto \sin x \cdot \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)} \]
      7. sinh-defN/A

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

        \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{\frac{1}{e^{y}}}}{2} \cdot \frac{1}{x}\right) \]
      9. mult-flipN/A

        \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
      10. metadata-evalN/A

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

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

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

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

        \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
      15. metadata-evalN/A

        \[\leadsto \sin x \cdot \left(\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{1}{x}\right) \]
      16. mult-flipN/A

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

        \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}}{2} \cdot \frac{1}{x}\right) \]
      18. sinh-defN/A

        \[\leadsto \sin x \cdot \left(\color{blue}{\sinh y} \cdot \frac{1}{x}\right) \]
    3. Applied rewrites99.8%

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

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

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

    Alternative 4: 62.7% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -2 \cdot 10^{-185}:\\ \;\;\;\;\left(2 \cdot \sinh y\right) \cdot \left(\left(x \cdot x\right) \cdot -0.08333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\sinh y}{x}\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (if (<= (/ (* (sin x) (sinh y)) x) -2e-185)
       (* (* 2.0 (sinh y)) (* (* x x) -0.08333333333333333))
       (* x (/ (sinh y) x))))
    double code(double x, double y) {
    	double tmp;
    	if (((sin(x) * sinh(y)) / x) <= -2e-185) {
    		tmp = (2.0 * sinh(y)) * ((x * x) * -0.08333333333333333);
    	} else {
    		tmp = x * (sinh(y) / x);
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8) :: tmp
        if (((sin(x) * sinh(y)) / x) <= (-2d-185)) then
            tmp = (2.0d0 * sinh(y)) * ((x * x) * (-0.08333333333333333d0))
        else
            tmp = x * (sinh(y) / x)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y) {
    	double tmp;
    	if (((Math.sin(x) * Math.sinh(y)) / x) <= -2e-185) {
    		tmp = (2.0 * Math.sinh(y)) * ((x * x) * -0.08333333333333333);
    	} else {
    		tmp = x * (Math.sinh(y) / x);
    	}
    	return tmp;
    }
    
    def code(x, y):
    	tmp = 0
    	if ((math.sin(x) * math.sinh(y)) / x) <= -2e-185:
    		tmp = (2.0 * math.sinh(y)) * ((x * x) * -0.08333333333333333)
    	else:
    		tmp = x * (math.sinh(y) / x)
    	return tmp
    
    function code(x, y)
    	tmp = 0.0
    	if (Float64(Float64(sin(x) * sinh(y)) / x) <= -2e-185)
    		tmp = Float64(Float64(2.0 * sinh(y)) * Float64(Float64(x * x) * -0.08333333333333333));
    	else
    		tmp = Float64(x * Float64(sinh(y) / x));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y)
    	tmp = 0.0;
    	if (((sin(x) * sinh(y)) / x) <= -2e-185)
    		tmp = (2.0 * sinh(y)) * ((x * x) * -0.08333333333333333);
    	else
    		tmp = x * (sinh(y) / x);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-185], N[(N[(2.0 * N[Sinh[y], $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -2 \cdot 10^{-185}:\\
    \;\;\;\;\left(2 \cdot \sinh y\right) \cdot \left(\left(x \cdot x\right) \cdot -0.08333333333333333\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x \cdot \frac{\sinh y}{x}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-185

      1. Initial program 88.7%

        \[\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. Applied rewrites62.9%

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

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

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

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

          \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{-1}{12}\right) \]
        4. lift-*.f6414.3

          \[\leadsto \left(2 \cdot \sinh y\right) \cdot \left(\left(x \cdot x\right) \cdot -0.08333333333333333\right) \]
      7. Applied rewrites14.3%

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

      if -2e-185 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

      1. Initial program 88.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. mult-flipN/A

          \[\leadsto \sin x \cdot \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)} \]
        7. sinh-defN/A

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

          \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{\frac{1}{e^{y}}}}{2} \cdot \frac{1}{x}\right) \]
        9. mult-flipN/A

          \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
        10. metadata-evalN/A

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

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

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

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

          \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
        15. metadata-evalN/A

          \[\leadsto \sin x \cdot \left(\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{1}{x}\right) \]
        16. mult-flipN/A

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

          \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}}{2} \cdot \frac{1}{x}\right) \]
        18. sinh-defN/A

          \[\leadsto \sin x \cdot \left(\color{blue}{\sinh y} \cdot \frac{1}{x}\right) \]
      3. Applied rewrites99.8%

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

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

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

      Alternative 5: 62.7% accurate, 0.7× speedup?

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

        1. Initial program 88.7%

          \[\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. Applied rewrites62.9%

          \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(-0.08333333333333333, x \cdot x, 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}{\frac{-1}{12}}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \frac{1}{2}\right) \]
          6. lower-*.f6453.7

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

          \[\leadsto \left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(\color{blue}{-0.08333333333333333}, x \cdot x, 0.5\right) \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

            \[\leadsto \left(\mathsf{fma}\left(\frac{1}{3}, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(\frac{-1}{12} \cdot x, \color{blue}{x}, \frac{1}{2}\right) \]
          5. lower-*.f6453.7

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

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

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

            \[\leadsto \left(\left({y}^{2} \cdot \frac{1}{3}\right) \cdot y\right) \cdot \mathsf{fma}\left(\frac{-1}{12} \cdot x, x, \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(\frac{-1}{12} \cdot x, x, \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(\frac{-1}{12} \cdot x, x, \frac{1}{2}\right) \]
          4. lift-*.f6433.6

            \[\leadsto \left(\left(\left(y \cdot y\right) \cdot 0.3333333333333333\right) \cdot y\right) \cdot \mathsf{fma}\left(-0.08333333333333333 \cdot x, x, 0.5\right) \]
        12. Applied rewrites33.6%

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

        if -1e-270 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

        1. Initial program 88.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. mult-flipN/A

            \[\leadsto \sin x \cdot \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)} \]
          7. sinh-defN/A

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

            \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{\frac{1}{e^{y}}}}{2} \cdot \frac{1}{x}\right) \]
          9. mult-flipN/A

            \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
          10. metadata-evalN/A

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

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

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

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

            \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
          15. metadata-evalN/A

            \[\leadsto \sin x \cdot \left(\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{1}{x}\right) \]
          16. mult-flipN/A

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

            \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}}{2} \cdot \frac{1}{x}\right) \]
          18. sinh-defN/A

            \[\leadsto \sin x \cdot \left(\color{blue}{\sinh y} \cdot \frac{1}{x}\right) \]
        3. Applied rewrites99.8%

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

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

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

        Alternative 6: 60.2% accurate, 0.7× speedup?

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

          1. Initial program 88.7%

            \[\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. Applied rewrites62.9%

            \[\leadsto \color{blue}{\left(2 \cdot \sinh y\right) \cdot \mathsf{fma}\left(-0.08333333333333333, x \cdot x, 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}{\frac{-1}{12}}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \frac{1}{2}\right) \]
            6. lower-*.f6453.7

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

            \[\leadsto \left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot \mathsf{fma}\left(\color{blue}{-0.08333333333333333}, x \cdot x, 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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \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(\frac{-1}{12}, x \cdot x, \frac{1}{2}\right) \]
            4. lift-*.f6433.6

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

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

          if -1e-263 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

          1. Initial program 88.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. mult-flipN/A

              \[\leadsto \sin x \cdot \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)} \]
            7. sinh-defN/A

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

              \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{\frac{1}{e^{y}}}}{2} \cdot \frac{1}{x}\right) \]
            9. mult-flipN/A

              \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
            10. metadata-evalN/A

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

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

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

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

              \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
            15. metadata-evalN/A

              \[\leadsto \sin x \cdot \left(\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{1}{x}\right) \]
            16. mult-flipN/A

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

              \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}}{2} \cdot \frac{1}{x}\right) \]
            18. sinh-defN/A

              \[\leadsto \sin x \cdot \left(\color{blue}{\sinh y} \cdot \frac{1}{x}\right) \]
          3. Applied rewrites99.8%

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

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

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

          Alternative 7: 56.0% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y}{x}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-185}:\\ \;\;\;\;\frac{\left(\left(\left(-0.16666666666666666 \cdot x\right) \cdot x\right) \cdot x\right) \cdot y}{x}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
          (FPCore (x y)
           :precision binary64
           (let* ((t_0 (/ (* (sin x) (sinh y)) x)))
             (if (<= t_0 -2e-185)
               (/ (* (* (* (* -0.16666666666666666 x) x) x) y) x)
               (if (<= t_0 0.0) (* x (/ y x)) (sinh y)))))
          double code(double x, double y) {
          	double t_0 = (sin(x) * sinh(y)) / x;
          	double tmp;
          	if (t_0 <= -2e-185) {
          		tmp = ((((-0.16666666666666666 * x) * x) * x) * y) / x;
          	} else if (t_0 <= 0.0) {
          		tmp = x * (y / x);
          	} else {
          		tmp = sinh(y);
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8) :: t_0
              real(8) :: tmp
              t_0 = (sin(x) * sinh(y)) / x
              if (t_0 <= (-2d-185)) then
                  tmp = (((((-0.16666666666666666d0) * x) * x) * x) * y) / x
              else if (t_0 <= 0.0d0) then
                  tmp = x * (y / x)
              else
                  tmp = sinh(y)
              end if
              code = tmp
          end function
          
          public static double code(double x, double y) {
          	double t_0 = (Math.sin(x) * Math.sinh(y)) / x;
          	double tmp;
          	if (t_0 <= -2e-185) {
          		tmp = ((((-0.16666666666666666 * x) * x) * x) * y) / x;
          	} else if (t_0 <= 0.0) {
          		tmp = x * (y / x);
          	} else {
          		tmp = Math.sinh(y);
          	}
          	return tmp;
          }
          
          def code(x, y):
          	t_0 = (math.sin(x) * math.sinh(y)) / x
          	tmp = 0
          	if t_0 <= -2e-185:
          		tmp = ((((-0.16666666666666666 * x) * x) * x) * y) / x
          	elif t_0 <= 0.0:
          		tmp = x * (y / x)
          	else:
          		tmp = math.sinh(y)
          	return tmp
          
          function code(x, y)
          	t_0 = Float64(Float64(sin(x) * sinh(y)) / x)
          	tmp = 0.0
          	if (t_0 <= -2e-185)
          		tmp = Float64(Float64(Float64(Float64(Float64(-0.16666666666666666 * x) * x) * x) * y) / x);
          	elseif (t_0 <= 0.0)
          		tmp = Float64(x * Float64(y / x));
          	else
          		tmp = sinh(y);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y)
          	t_0 = (sin(x) * sinh(y)) / x;
          	tmp = 0.0;
          	if (t_0 <= -2e-185)
          		tmp = ((((-0.16666666666666666 * x) * x) * x) * y) / x;
          	elseif (t_0 <= 0.0)
          		tmp = x * (y / x);
          	else
          		tmp = sinh(y);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-185], N[(N[(N[(N[(N[(-0.16666666666666666 * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{\sin x \cdot \sinh y}{x}\\
          \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-185}:\\
          \;\;\;\;\frac{\left(\left(\left(-0.16666666666666666 \cdot x\right) \cdot x\right) \cdot x\right) \cdot y}{x}\\
          
          \mathbf{elif}\;t\_0 \leq 0:\\
          \;\;\;\;x \cdot \frac{y}{x}\\
          
          \mathbf{else}:\\
          \;\;\;\;\sinh y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-185

            1. Initial program 88.7%

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

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

                \[\leadsto \frac{\sin x \cdot \color{blue}{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 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 y}{x} \]
                2. lower-*.f64N/A

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

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

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

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

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

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

                \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x\right) \cdot y}{x} \]
              6. 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-*.f6412.6

                  \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
              7. Applied rewrites12.6%

                \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
              8. Step-by-step derivation
                1. lift-*.f64N/A

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

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

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

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

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

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

                  \[\leadsto \frac{\left(\left(\left(\frac{-1}{6} \cdot x\right) \cdot x\right) \cdot x\right) \cdot y}{x} \]
                8. lower-*.f6412.6

                  \[\leadsto \frac{\left(\left(\left(-0.16666666666666666 \cdot x\right) \cdot x\right) \cdot x\right) \cdot y}{x} \]
              9. Applied rewrites12.6%

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

              if -2e-185 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0

              1. Initial program 88.7%

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

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

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

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

                    \[\leadsto \frac{\color{blue}{x} \cdot y}{x} \]
                  2. Step-by-step derivation
                    1. lift-/.f64N/A

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

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

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

                      \[\leadsto \color{blue}{x \cdot \frac{y}{x}} \]
                    5. lower-/.f6449.7

                      \[\leadsto x \cdot \color{blue}{\frac{y}{x}} \]
                    6. sinh-def49.7

                      \[\leadsto x \cdot \frac{y}{x} \]
                    7. sub-div49.7

                      \[\leadsto x \cdot \frac{y}{x} \]
                  3. Applied rewrites49.7%

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

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

                  1. Initial program 88.7%

                    \[\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. metadata-evalN/A

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

                      \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
                    4. rec-expN/A

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

                      \[\leadsto \sinh y \]
                    6. lift-sinh.f6463.0

                      \[\leadsto \sinh y \]
                  4. Applied rewrites63.0%

                    \[\leadsto \color{blue}{\sinh y} \]
                4. Recombined 3 regimes into one program.
                5. Add Preprocessing

                Alternative 8: 55.4% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -2 \cdot 10^{-185}:\\ \;\;\;\;\frac{\left(\left(\left(-0.16666666666666666 \cdot x\right) \cdot x\right) \cdot x\right) \cdot y}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\sinh y}{x}\\ \end{array} \end{array} \]
                (FPCore (x y)
                 :precision binary64
                 (if (<= (/ (* (sin x) (sinh y)) x) -2e-185)
                   (/ (* (* (* (* -0.16666666666666666 x) x) x) y) x)
                   (* x (/ (sinh y) x))))
                double code(double x, double y) {
                	double tmp;
                	if (((sin(x) * sinh(y)) / x) <= -2e-185) {
                		tmp = ((((-0.16666666666666666 * x) * x) * x) * y) / x;
                	} else {
                		tmp = x * (sinh(y) / x);
                	}
                	return tmp;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8) :: tmp
                    if (((sin(x) * sinh(y)) / x) <= (-2d-185)) then
                        tmp = (((((-0.16666666666666666d0) * x) * x) * x) * y) / x
                    else
                        tmp = x * (sinh(y) / x)
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y) {
                	double tmp;
                	if (((Math.sin(x) * Math.sinh(y)) / x) <= -2e-185) {
                		tmp = ((((-0.16666666666666666 * x) * x) * x) * y) / x;
                	} else {
                		tmp = x * (Math.sinh(y) / x);
                	}
                	return tmp;
                }
                
                def code(x, y):
                	tmp = 0
                	if ((math.sin(x) * math.sinh(y)) / x) <= -2e-185:
                		tmp = ((((-0.16666666666666666 * x) * x) * x) * y) / x
                	else:
                		tmp = x * (math.sinh(y) / x)
                	return tmp
                
                function code(x, y)
                	tmp = 0.0
                	if (Float64(Float64(sin(x) * sinh(y)) / x) <= -2e-185)
                		tmp = Float64(Float64(Float64(Float64(Float64(-0.16666666666666666 * x) * x) * x) * y) / x);
                	else
                		tmp = Float64(x * Float64(sinh(y) / x));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y)
                	tmp = 0.0;
                	if (((sin(x) * sinh(y)) / x) <= -2e-185)
                		tmp = ((((-0.16666666666666666 * x) * x) * x) * y) / x;
                	else
                		tmp = x * (sinh(y) / x);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-185], N[(N[(N[(N[(N[(-0.16666666666666666 * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -2 \cdot 10^{-185}:\\
                \;\;\;\;\frac{\left(\left(\left(-0.16666666666666666 \cdot x\right) \cdot x\right) \cdot x\right) \cdot y}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;x \cdot \frac{\sinh y}{x}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-185

                  1. Initial program 88.7%

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

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

                      \[\leadsto \frac{\sin x \cdot \color{blue}{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 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 y}{x} \]
                      2. lower-*.f64N/A

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

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

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

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

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

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

                      \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x\right) \cdot y}{x} \]
                    6. 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-*.f6412.6

                        \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
                    7. Applied rewrites12.6%

                      \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
                    8. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

                        \[\leadsto \frac{\left(\left(\left(\frac{-1}{6} \cdot x\right) \cdot x\right) \cdot x\right) \cdot y}{x} \]
                      8. lower-*.f6412.6

                        \[\leadsto \frac{\left(\left(\left(-0.16666666666666666 \cdot x\right) \cdot x\right) \cdot x\right) \cdot y}{x} \]
                    9. Applied rewrites12.6%

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

                    if -2e-185 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                    1. Initial program 88.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. mult-flipN/A

                        \[\leadsto \sin x \cdot \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)} \]
                      7. sinh-defN/A

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

                        \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{\frac{1}{e^{y}}}}{2} \cdot \frac{1}{x}\right) \]
                      9. mult-flipN/A

                        \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
                      10. metadata-evalN/A

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

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

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

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

                        \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \frac{1}{2}\right)} \cdot \frac{1}{x}\right) \]
                      15. metadata-evalN/A

                        \[\leadsto \sin x \cdot \left(\left(\left(e^{y} - \frac{1}{e^{y}}\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{1}{x}\right) \]
                      16. mult-flipN/A

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

                        \[\leadsto \sin x \cdot \left(\frac{e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}}{2} \cdot \frac{1}{x}\right) \]
                      18. sinh-defN/A

                        \[\leadsto \sin x \cdot \left(\color{blue}{\sinh y} \cdot \frac{1}{x}\right) \]
                    3. Applied rewrites99.8%

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

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

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

                    Alternative 9: 54.6% accurate, 0.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y}{x}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-185}:\\ \;\;\;\;\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot \frac{y}{x}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-306}:\\ \;\;\;\;x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
                    (FPCore (x y)
                     :precision binary64
                     (let* ((t_0 (/ (* (sin x) (sinh y)) x)))
                       (if (<= t_0 -2e-185)
                         (* (* (* (* x x) -0.16666666666666666) x) (/ y x))
                         (if (<= t_0 2e-306) (* x (/ y x)) (sinh y)))))
                    double code(double x, double y) {
                    	double t_0 = (sin(x) * sinh(y)) / x;
                    	double tmp;
                    	if (t_0 <= -2e-185) {
                    		tmp = (((x * x) * -0.16666666666666666) * x) * (y / x);
                    	} else if (t_0 <= 2e-306) {
                    		tmp = x * (y / x);
                    	} else {
                    		tmp = sinh(y);
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8) :: t_0
                        real(8) :: tmp
                        t_0 = (sin(x) * sinh(y)) / x
                        if (t_0 <= (-2d-185)) then
                            tmp = (((x * x) * (-0.16666666666666666d0)) * x) * (y / x)
                        else if (t_0 <= 2d-306) then
                            tmp = x * (y / x)
                        else
                            tmp = sinh(y)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y) {
                    	double t_0 = (Math.sin(x) * Math.sinh(y)) / x;
                    	double tmp;
                    	if (t_0 <= -2e-185) {
                    		tmp = (((x * x) * -0.16666666666666666) * x) * (y / x);
                    	} else if (t_0 <= 2e-306) {
                    		tmp = x * (y / x);
                    	} else {
                    		tmp = Math.sinh(y);
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y):
                    	t_0 = (math.sin(x) * math.sinh(y)) / x
                    	tmp = 0
                    	if t_0 <= -2e-185:
                    		tmp = (((x * x) * -0.16666666666666666) * x) * (y / x)
                    	elif t_0 <= 2e-306:
                    		tmp = x * (y / x)
                    	else:
                    		tmp = math.sinh(y)
                    	return tmp
                    
                    function code(x, y)
                    	t_0 = Float64(Float64(sin(x) * sinh(y)) / x)
                    	tmp = 0.0
                    	if (t_0 <= -2e-185)
                    		tmp = Float64(Float64(Float64(Float64(x * x) * -0.16666666666666666) * x) * Float64(y / x));
                    	elseif (t_0 <= 2e-306)
                    		tmp = Float64(x * Float64(y / x));
                    	else
                    		tmp = sinh(y);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y)
                    	t_0 = (sin(x) * sinh(y)) / x;
                    	tmp = 0.0;
                    	if (t_0 <= -2e-185)
                    		tmp = (((x * x) * -0.16666666666666666) * x) * (y / x);
                    	elseif (t_0 <= 2e-306)
                    		tmp = x * (y / x);
                    	else
                    		tmp = sinh(y);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-185], N[(N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-306], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := \frac{\sin x \cdot \sinh y}{x}\\
                    \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-185}:\\
                    \;\;\;\;\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot \frac{y}{x}\\
                    
                    \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-306}:\\
                    \;\;\;\;x \cdot \frac{y}{x}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\sinh y\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-185

                      1. Initial program 88.7%

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

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

                          \[\leadsto \frac{\sin x \cdot \color{blue}{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 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 y}{x} \]
                          2. lower-*.f64N/A

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

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

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

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

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

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

                          \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x\right) \cdot y}{x} \]
                        6. 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-*.f6412.6

                            \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
                        7. Applied rewrites12.6%

                          \[\leadsto \frac{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot y}{x} \]
                        8. Step-by-step derivation
                          1. lift-/.f64N/A

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

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

                            \[\leadsto \color{blue}{\left(\left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot x\right) \cdot \frac{y}{x}} \]
                          4. sinh-defN/A

                            \[\leadsto \left(\left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot x\right) \cdot \frac{y}{x} \]
                          5. sub-divN/A

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

                            \[\leadsto \left(\left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) \cdot x\right) \cdot \color{blue}{\frac{y}{x}} \]
                          7. lower-*.f6412.9

                            \[\leadsto \color{blue}{\left(\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot x\right) \cdot \frac{y}{x}} \]
                        9. Applied rewrites12.9%

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

                        if -2e-185 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000006e-306

                        1. Initial program 88.7%

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

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

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

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

                              \[\leadsto \frac{\color{blue}{x} \cdot y}{x} \]
                            2. Step-by-step derivation
                              1. lift-/.f64N/A

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

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

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

                                \[\leadsto \color{blue}{x \cdot \frac{y}{x}} \]
                              5. lower-/.f6449.7

                                \[\leadsto x \cdot \color{blue}{\frac{y}{x}} \]
                              6. sinh-def49.7

                                \[\leadsto x \cdot \frac{y}{x} \]
                              7. sub-div49.7

                                \[\leadsto x \cdot \frac{y}{x} \]
                            3. Applied rewrites49.7%

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

                            if 2.00000000000000006e-306 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                            1. Initial program 88.7%

                              \[\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. metadata-evalN/A

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

                                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
                              4. rec-expN/A

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

                                \[\leadsto \sinh y \]
                              6. lift-sinh.f6463.0

                                \[\leadsto \sinh y \]
                            4. Applied rewrites63.0%

                              \[\leadsto \color{blue}{\sinh y} \]
                          4. Recombined 3 regimes into one program.
                          5. Add Preprocessing

                          Alternative 10: 54.6% accurate, 0.4× speedup?

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

                            1. Initial program 88.7%

                              \[\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.f6452.2

                                \[\leadsto \frac{\sin x}{x} \cdot y \]
                            4. Applied rewrites52.2%

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

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

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

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

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

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

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

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

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

                            if -2e-185 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000006e-306

                            1. Initial program 88.7%

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

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

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

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

                                  \[\leadsto \frac{\color{blue}{x} \cdot y}{x} \]
                                2. Step-by-step derivation
                                  1. lift-/.f64N/A

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

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

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

                                    \[\leadsto \color{blue}{x \cdot \frac{y}{x}} \]
                                  5. lower-/.f6449.7

                                    \[\leadsto x \cdot \color{blue}{\frac{y}{x}} \]
                                  6. sinh-def49.7

                                    \[\leadsto x \cdot \frac{y}{x} \]
                                  7. sub-div49.7

                                    \[\leadsto x \cdot \frac{y}{x} \]
                                3. Applied rewrites49.7%

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

                                if 2.00000000000000006e-306 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                                1. Initial program 88.7%

                                  \[\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. metadata-evalN/A

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

                                    \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
                                  4. rec-expN/A

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

                                    \[\leadsto \sinh y \]
                                  6. lift-sinh.f6463.0

                                    \[\leadsto \sinh y \]
                                4. Applied rewrites63.0%

                                  \[\leadsto \color{blue}{\sinh y} \]
                              4. Recombined 3 regimes into one program.
                              5. Add Preprocessing

                              Alternative 11: 54.3% accurate, 0.4× speedup?

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

                                1. Initial program 88.7%

                                  \[\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.f6452.2

                                    \[\leadsto \frac{\sin x}{x} \cdot y \]
                                4. Applied rewrites52.2%

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

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

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

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

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

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

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

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

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

                                if -2e-185 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0

                                1. Initial program 88.7%

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{x} \cdot y}{x} \]
                                    2. Step-by-step derivation
                                      1. lift-/.f64N/A

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

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

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

                                        \[\leadsto \color{blue}{x \cdot \frac{y}{x}} \]
                                      5. lower-/.f6449.7

                                        \[\leadsto x \cdot \color{blue}{\frac{y}{x}} \]
                                      6. sinh-def49.7

                                        \[\leadsto x \cdot \frac{y}{x} \]
                                      7. sub-div49.7

                                        \[\leadsto x \cdot \frac{y}{x} \]
                                    3. Applied rewrites49.7%

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

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

                                    1. Initial program 88.7%

                                      \[\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. metadata-evalN/A

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

                                        \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
                                      4. rec-expN/A

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

                                        \[\leadsto \sinh y \]
                                      6. lift-sinh.f6463.0

                                        \[\leadsto \sinh y \]
                                    4. Applied rewrites63.0%

                                      \[\leadsto \color{blue}{\sinh y} \]
                                    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-*.f6450.8

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

                                      \[\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 12: 54.2% accurate, 3.3× speedup?

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

                                    1. Initial program 88.7%

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

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

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

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

                                          \[\leadsto \frac{\color{blue}{x} \cdot y}{x} \]
                                        2. Step-by-step derivation
                                          1. lift-/.f64N/A

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

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

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

                                            \[\leadsto \color{blue}{x \cdot \frac{y}{x}} \]
                                          5. lower-/.f6449.7

                                            \[\leadsto x \cdot \color{blue}{\frac{y}{x}} \]
                                          6. sinh-def49.7

                                            \[\leadsto x \cdot \frac{y}{x} \]
                                          7. sub-div49.7

                                            \[\leadsto x \cdot \frac{y}{x} \]
                                        3. Applied rewrites49.7%

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

                                        if 7.50000000000000014e90 < y

                                        1. Initial program 88.7%

                                          \[\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. metadata-evalN/A

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

                                            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
                                          4. rec-expN/A

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

                                            \[\leadsto \sinh y \]
                                          6. lift-sinh.f6463.0

                                            \[\leadsto \sinh y \]
                                        4. Applied rewrites63.0%

                                          \[\leadsto \color{blue}{\sinh y} \]
                                        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-*.f6450.8

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

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

                                      Alternative 13: 49.7% accurate, 7.0× speedup?

                                      \[\begin{array}{l} \\ x \cdot \frac{y}{x} \end{array} \]
                                      (FPCore (x y) :precision binary64 (* x (/ y x)))
                                      double code(double x, double y) {
                                      	return x * (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 = x * (y / x)
                                      end function
                                      
                                      public static double code(double x, double y) {
                                      	return x * (y / x);
                                      }
                                      
                                      def code(x, y):
                                      	return x * (y / x)
                                      
                                      function code(x, y)
                                      	return Float64(x * Float64(y / x))
                                      end
                                      
                                      function tmp = code(x, y)
                                      	tmp = x * (y / x);
                                      end
                                      
                                      code[x_, y_] := N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      x \cdot \frac{y}{x}
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 88.7%

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

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

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

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

                                            \[\leadsto \frac{\color{blue}{x} \cdot y}{x} \]
                                          2. Step-by-step derivation
                                            1. lift-/.f64N/A

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

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

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

                                              \[\leadsto \color{blue}{x \cdot \frac{y}{x}} \]
                                            5. lower-/.f6449.7

                                              \[\leadsto x \cdot \color{blue}{\frac{y}{x}} \]
                                            6. sinh-def49.7

                                              \[\leadsto x \cdot \frac{y}{x} \]
                                            7. sub-div49.7

                                              \[\leadsto x \cdot \frac{y}{x} \]
                                          3. Applied rewrites49.7%

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

                                          Alternative 14: 27.9% accurate, 51.3× speedup?

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

                                            \[\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.f6452.2

                                              \[\leadsto \frac{\sin x}{x} \cdot y \]
                                          4. Applied rewrites52.2%

                                            \[\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 rewrites27.9%

                                              \[\leadsto y \]
                                            2. Add Preprocessing

                                            Reproduce

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