Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 88.6% → 99.9%
Time: 2.9s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 88.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\sin x}{x} \cdot \sinh y \end{array} \]
(FPCore (x y) :precision binary64 (* (/ (sin x) x) (sinh y)))
double code(double x, double y) {
	return (sin(x) / x) * sinh(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 = (sin(x) / x) * sinh(y)
end function
public static double code(double x, double y) {
	return (Math.sin(x) / x) * Math.sinh(y);
}
def code(x, y):
	return (math.sin(x) / x) * math.sinh(y)
function code(x, y)
	return Float64(Float64(sin(x) / x) * sinh(y))
end
function tmp = code(x, y)
	tmp = (sin(x) / x) * sinh(y);
end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

      \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
    2. mult-flipN/A

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sin x \cdot \frac{1}{x}\right) \cdot \sinh y} \]
    8. mult-flip-revN/A

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

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

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

Alternative 2: 86.5% 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:\\ \;\;\;\;\frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right) \cdot x\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-63}:\\ \;\;\;\;\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))
     (* (/ (sinh y) x) (* (fma (* x x) -0.16666666666666666 1.0) x))
     (if (<= t_0 2e-63) (* (/ (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 = (sinh(y) / x) * (fma((x * x), -0.16666666666666666, 1.0) * x);
	} else if (t_0 <= 2e-63) {
		tmp = (sin(x) / x) * y;
	} 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 <= Float64(-Inf))
		tmp = Float64(Float64(sinh(y) / x) * Float64(fma(Float64(x * x), -0.16666666666666666, 1.0) * x));
	elseif (t_0 <= 2e-63)
		tmp = Float64(Float64(sin(x) / x) * y);
	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, (-Infinity)], N[(N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-63], 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:\\
\;\;\;\;\frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right) \cdot x\right)\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-63}:\\
\;\;\;\;\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.6%

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

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

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

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

        \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
      4. lower-pow.f6451.5

        \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
    4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
      15. lift-pow.f64N/A

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

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

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

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

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

    1. Initial program 88.6%

      \[\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 rewrites40.3%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot y} \]
        7. lower-*.f6451.6

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

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

      if 2.00000000000000013e-63 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

      1. Initial program 88.6%

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

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

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

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

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

          \[\leadsto \frac{1}{2} \cdot \left(e^{y} - \frac{1}{\color{blue}{e^{y}}}\right) \]
        5. lower-exp.f6452.2

          \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
      4. Applied rewrites52.2%

        \[\leadsto \color{blue}{0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

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

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

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

          \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
        5. lift--.f64N/A

          \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
        6. lift-exp.f64N/A

          \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
        7. lift-/.f64N/A

          \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
        8. lift-exp.f64N/A

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

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

          \[\leadsto \sinh y \]
        11. lift-sinh.f6464.3

          \[\leadsto \sinh y \]
      6. Applied rewrites64.3%

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

    Alternative 3: 86.5% 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:\\ \;\;\;\;\frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right) \cdot x\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-63}:\\ \;\;\;\;\frac{y}{x} \cdot \sin 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 (- INFINITY))
         (* (/ (sinh y) x) (* (fma (* x x) -0.16666666666666666 1.0) x))
         (if (<= t_0 2e-63) (* (/ y x) (sin x)) (sinh y)))))
    double code(double x, double y) {
    	double t_0 = (sin(x) * sinh(y)) / x;
    	double tmp;
    	if (t_0 <= -((double) INFINITY)) {
    		tmp = (sinh(y) / x) * (fma((x * x), -0.16666666666666666, 1.0) * x);
    	} else if (t_0 <= 2e-63) {
    		tmp = (y / x) * sin(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 <= Float64(-Inf))
    		tmp = Float64(Float64(sinh(y) / x) * Float64(fma(Float64(x * x), -0.16666666666666666, 1.0) * x));
    	elseif (t_0 <= 2e-63)
    		tmp = Float64(Float64(y / x) * sin(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, (-Infinity)], N[(N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-63], N[(N[(y / x), $MachinePrecision] * N[Sin[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 -\infty:\\
    \;\;\;\;\frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right) \cdot x\right)\\
    
    \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-63}:\\
    \;\;\;\;\frac{y}{x} \cdot \sin 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) < -inf.0

      1. Initial program 88.6%

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

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

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

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

          \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
        4. lower-pow.f6451.5

          \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
      4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
        15. lift-pow.f64N/A

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

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

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

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

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

      1. Initial program 88.6%

        \[\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 rewrites40.3%

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{y}{x}} \cdot \sin x \]
        3. Applied rewrites63.4%

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

        if 2.00000000000000013e-63 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

        1. Initial program 88.6%

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

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

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

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

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

            \[\leadsto \frac{1}{2} \cdot \left(e^{y} - \frac{1}{\color{blue}{e^{y}}}\right) \]
          5. lower-exp.f6452.2

            \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
        4. Applied rewrites52.2%

          \[\leadsto \color{blue}{0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
          5. lift--.f64N/A

            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
          6. lift-exp.f64N/A

            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
          7. lift-/.f64N/A

            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
          8. lift-exp.f64N/A

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

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

            \[\leadsto \sinh y \]
          11. lift-sinh.f6464.3

            \[\leadsto \sinh y \]
        6. Applied rewrites64.3%

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

      Alternative 4: 73.9% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y}{x}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-197}:\\ \;\;\;\;\frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right) \cdot x\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{x} \cdot \left(1 \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (let* ((t_0 (/ (* (sin x) (sinh y)) x)))
         (if (<= t_0 -1e-197)
           (* (/ (sinh y) x) (* (fma (* x x) -0.16666666666666666 1.0) x))
           (if (<= t_0 2e-181) (* (/ y x) (* 1.0 x)) (sinh y)))))
      double code(double x, double y) {
      	double t_0 = (sin(x) * sinh(y)) / x;
      	double tmp;
      	if (t_0 <= -1e-197) {
      		tmp = (sinh(y) / x) * (fma((x * x), -0.16666666666666666, 1.0) * x);
      	} else if (t_0 <= 2e-181) {
      		tmp = (y / x) * (1.0 * 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 <= -1e-197)
      		tmp = Float64(Float64(sinh(y) / x) * Float64(fma(Float64(x * x), -0.16666666666666666, 1.0) * x));
      	elseif (t_0 <= 2e-181)
      		tmp = Float64(Float64(y / x) * Float64(1.0 * 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, -1e-197], N[(N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-181], N[(N[(y / x), $MachinePrecision] * N[(1.0 * 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 -1 \cdot 10^{-197}:\\
      \;\;\;\;\frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right) \cdot x\right)\\
      
      \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-181}:\\
      \;\;\;\;\frac{y}{x} \cdot \left(1 \cdot x\right)\\
      
      \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) < -9.9999999999999999e-198

        1. Initial program 88.6%

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

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

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

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

            \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
          4. lower-pow.f6451.5

            \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
        4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
          15. lift-pow.f64N/A

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

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

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

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

        if -9.9999999999999999e-198 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000009e-181

        1. Initial program 88.6%

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

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

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

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

            \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
          4. lower-pow.f6451.5

            \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
        4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
          15. lift-pow.f64N/A

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

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

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

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

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

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

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

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

            if 2.00000000000000009e-181 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

            1. Initial program 88.6%

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

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

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

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

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

                \[\leadsto \frac{1}{2} \cdot \left(e^{y} - \frac{1}{\color{blue}{e^{y}}}\right) \]
              5. lower-exp.f6452.2

                \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
            4. Applied rewrites52.2%

              \[\leadsto \color{blue}{0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
            5. Step-by-step derivation
              1. lift-*.f64N/A

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

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

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

                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
              5. lift--.f64N/A

                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
              6. lift-exp.f64N/A

                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
              7. lift-/.f64N/A

                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
              8. lift-exp.f64N/A

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

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

                \[\leadsto \sinh y \]
              11. lift-sinh.f6464.3

                \[\leadsto \sinh y \]
            6. Applied rewrites64.3%

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

          Alternative 5: 61.8% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y}{x}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-197}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot y}{x}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{x} \cdot \left(1 \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
          (FPCore (x y)
           :precision binary64
           (let* ((t_0 (/ (* (sin x) (sinh y)) x)))
             (if (<= t_0 -1e-197)
               (/ (* (* (fma -0.16666666666666666 (* x x) 1.0) x) y) x)
               (if (<= t_0 2e-181) (* (/ y x) (* 1.0 x)) (sinh y)))))
          double code(double x, double y) {
          	double t_0 = (sin(x) * sinh(y)) / x;
          	double tmp;
          	if (t_0 <= -1e-197) {
          		tmp = ((fma(-0.16666666666666666, (x * x), 1.0) * x) * y) / x;
          	} else if (t_0 <= 2e-181) {
          		tmp = (y / x) * (1.0 * 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 <= -1e-197)
          		tmp = Float64(Float64(Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * x) * y) / x);
          	elseif (t_0 <= 2e-181)
          		tmp = Float64(Float64(y / x) * Float64(1.0 * 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, -1e-197], N[(N[(N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 2e-181], N[(N[(y / x), $MachinePrecision] * N[(1.0 * 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 -1 \cdot 10^{-197}:\\
          \;\;\;\;\frac{\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot y}{x}\\
          
          \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-181}:\\
          \;\;\;\;\frac{y}{x} \cdot \left(1 \cdot x\right)\\
          
          \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) < -9.9999999999999999e-198

            1. Initial program 88.6%

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

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

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

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

                \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
              4. lower-pow.f6451.5

                \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
            4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
              15. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{y \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right)}{x}} \]
                5. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{\left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right) \cdot y}}{x} \]
                6. lower-*.f6426.1

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

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

                  \[\leadsto \frac{\left(\left(\frac{-1}{6} \cdot \left(x \cdot x\right) + 1\right) \cdot x\right) \cdot y}{x} \]
                9. lower-fma.f6426.1

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

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

              if -9.9999999999999999e-198 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000009e-181

              1. Initial program 88.6%

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

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

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

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

                  \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
                4. lower-pow.f6451.5

                  \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
              4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
                15. lift-pow.f64N/A

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

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

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

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

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

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

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

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

                  if 2.00000000000000009e-181 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                  1. Initial program 88.6%

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

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

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

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

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

                      \[\leadsto \frac{1}{2} \cdot \left(e^{y} - \frac{1}{\color{blue}{e^{y}}}\right) \]
                    5. lower-exp.f6452.2

                      \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
                  4. Applied rewrites52.2%

                    \[\leadsto \color{blue}{0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

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

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

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

                      \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
                    5. lift--.f64N/A

                      \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                    6. lift-exp.f64N/A

                      \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                    7. lift-/.f64N/A

                      \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                    8. lift-exp.f64N/A

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

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

                      \[\leadsto \sinh y \]
                    11. lift-sinh.f6464.3

                      \[\leadsto \sinh y \]
                  6. Applied rewrites64.3%

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

                Alternative 6: 61.1% accurate, 0.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin x \cdot \sinh y}{x}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-197}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x}{x} \cdot y\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{x} \cdot \left(1 \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
                (FPCore (x y)
                 :precision binary64
                 (let* ((t_0 (/ (* (sin x) (sinh y)) x)))
                   (if (<= t_0 -1e-197)
                     (* (/ (* (fma -0.16666666666666666 (* x x) 1.0) x) x) y)
                     (if (<= t_0 2e-181) (* (/ y x) (* 1.0 x)) (sinh y)))))
                double code(double x, double y) {
                	double t_0 = (sin(x) * sinh(y)) / x;
                	double tmp;
                	if (t_0 <= -1e-197) {
                		tmp = ((fma(-0.16666666666666666, (x * x), 1.0) * x) / x) * y;
                	} else if (t_0 <= 2e-181) {
                		tmp = (y / x) * (1.0 * 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 <= -1e-197)
                		tmp = Float64(Float64(Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * x) / x) * y);
                	elseif (t_0 <= 2e-181)
                		tmp = Float64(Float64(y / x) * Float64(1.0 * 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, -1e-197], N[(N[(N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 2e-181], N[(N[(y / x), $MachinePrecision] * N[(1.0 * 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 -1 \cdot 10^{-197}:\\
                \;\;\;\;\frac{\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x}{x} \cdot y\\
                
                \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-181}:\\
                \;\;\;\;\frac{y}{x} \cdot \left(1 \cdot x\right)\\
                
                \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) < -9.9999999999999999e-198

                  1. Initial program 88.6%

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

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

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

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

                      \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
                    4. lower-pow.f6451.5

                      \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
                  4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
                    15. lift-pow.f64N/A

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{y}{x}} \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right) \]
                      3. mult-flip-revN/A

                        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{x}\right)} \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right) \]
                      4. inv-powN/A

                        \[\leadsto \left(y \cdot \color{blue}{{x}^{-1}}\right) \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right) \]
                      5. exp-to-powN/A

                        \[\leadsto \left(y \cdot \color{blue}{e^{\log x \cdot -1}}\right) \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right) \]
                      6. lift-log.f64N/A

                        \[\leadsto \left(y \cdot e^{\color{blue}{\log x} \cdot -1}\right) \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right) \]
                      7. lift-*.f64N/A

                        \[\leadsto \left(y \cdot e^{\color{blue}{\log x \cdot -1}}\right) \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right) \]
                      8. lift-exp.f64N/A

                        \[\leadsto \left(y \cdot \color{blue}{e^{\log x \cdot -1}}\right) \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right) \]
                      9. associate-*l*N/A

                        \[\leadsto \color{blue}{y \cdot \left(e^{\log x \cdot -1} \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right)\right)} \]
                      10. *-commutativeN/A

                        \[\leadsto \color{blue}{\left(e^{\log x \cdot -1} \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right)\right) \cdot y} \]
                      11. lower-*.f64N/A

                        \[\leadsto \color{blue}{\left(e^{\log x \cdot -1} \cdot \left(\mathsf{fma}\left(x \cdot x, \frac{-1}{6}, 1\right) \cdot x\right)\right) \cdot y} \]
                    3. Applied rewrites36.6%

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

                    if -9.9999999999999999e-198 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000009e-181

                    1. Initial program 88.6%

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

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

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

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

                        \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
                      4. lower-pow.f6451.5

                        \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
                    4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
                      15. lift-pow.f64N/A

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

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

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

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

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

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

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

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

                        if 2.00000000000000009e-181 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                        1. Initial program 88.6%

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

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

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

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

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

                            \[\leadsto \frac{1}{2} \cdot \left(e^{y} - \frac{1}{\color{blue}{e^{y}}}\right) \]
                          5. lower-exp.f6452.2

                            \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
                        4. Applied rewrites52.2%

                          \[\leadsto \color{blue}{0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                        5. Step-by-step derivation
                          1. lift-*.f64N/A

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

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

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

                            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
                          5. lift--.f64N/A

                            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                          6. lift-exp.f64N/A

                            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                          7. lift-/.f64N/A

                            \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                          8. lift-exp.f64N/A

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

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

                            \[\leadsto \sinh y \]
                          11. lift-sinh.f6464.3

                            \[\leadsto \sinh y \]
                        6. Applied rewrites64.3%

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

                      Alternative 7: 60.9% accurate, 0.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq 2 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{x} \cdot \left(1 \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
                      (FPCore (x y)
                       :precision binary64
                       (if (<= (/ (* (sin x) (sinh y)) x) 2e-181) (* (/ y x) (* 1.0 x)) (sinh y)))
                      double code(double x, double y) {
                      	double tmp;
                      	if (((sin(x) * sinh(y)) / x) <= 2e-181) {
                      		tmp = (y / x) * (1.0 * 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) :: tmp
                          if (((sin(x) * sinh(y)) / x) <= 2d-181) then
                              tmp = (y / x) * (1.0d0 * x)
                          else
                              tmp = sinh(y)
                          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-181) {
                      		tmp = (y / x) * (1.0 * x);
                      	} else {
                      		tmp = Math.sinh(y);
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y):
                      	tmp = 0
                      	if ((math.sin(x) * math.sinh(y)) / x) <= 2e-181:
                      		tmp = (y / x) * (1.0 * x)
                      	else:
                      		tmp = math.sinh(y)
                      	return tmp
                      
                      function code(x, y)
                      	tmp = 0.0
                      	if (Float64(Float64(sin(x) * sinh(y)) / x) <= 2e-181)
                      		tmp = Float64(Float64(y / x) * Float64(1.0 * x));
                      	else
                      		tmp = sinh(y);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y)
                      	tmp = 0.0;
                      	if (((sin(x) * sinh(y)) / x) <= 2e-181)
                      		tmp = (y / x) * (1.0 * x);
                      	else
                      		tmp = sinh(y);
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 2e-181], N[(N[(y / x), $MachinePrecision] * N[(1.0 * x), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq 2 \cdot 10^{-181}:\\
                      \;\;\;\;\frac{y}{x} \cdot \left(1 \cdot x\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\sinh y\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000009e-181

                        1. Initial program 88.6%

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

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

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

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

                            \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
                          4. lower-pow.f6451.5

                            \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
                        4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
                          15. lift-pow.f64N/A

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

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

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

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

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

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

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

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

                            if 2.00000000000000009e-181 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                            1. Initial program 88.6%

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

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

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

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

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

                                \[\leadsto \frac{1}{2} \cdot \left(e^{y} - \frac{1}{\color{blue}{e^{y}}}\right) \]
                              5. lower-exp.f6452.2

                                \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
                            4. Applied rewrites52.2%

                              \[\leadsto \color{blue}{0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                            5. Step-by-step derivation
                              1. lift-*.f64N/A

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

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

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

                                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{\color{blue}{2}} \]
                              5. lift--.f64N/A

                                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                              6. lift-exp.f64N/A

                                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                              7. lift-/.f64N/A

                                \[\leadsto \frac{e^{y} - \frac{1}{e^{y}}}{2} \]
                              8. lift-exp.f64N/A

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

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

                                \[\leadsto \sinh y \]
                              11. lift-sinh.f6464.3

                                \[\leadsto \sinh y \]
                            6. Applied rewrites64.3%

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

                          Alternative 8: 50.2% accurate, 5.0× speedup?

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

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

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

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

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

                              \[\leadsto \frac{\left(x \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{x}^{2}}\right)\right) \cdot \sinh y}{x} \]
                            4. lower-pow.f6451.5

                              \[\leadsto \frac{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right)\right) \cdot \sinh y}{x} \]
                          4. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\sinh y}{x} \cdot \left(\mathsf{fma}\left({x}^{2}, -0.16666666666666666, 1\right) \cdot x\right) \]
                            15. lift-pow.f64N/A

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

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

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

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

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

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

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

                                \[\leadsto \frac{y}{x} \cdot \left(1 \cdot x\right) \]
                              2. Add Preprocessing

                              Alternative 9: 31.5% accurate, 3.6× speedup?

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

                                1. Initial program 88.6%

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

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

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

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

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

                                    \[\leadsto \frac{1}{2} \cdot \left(e^{y} - \frac{1}{\color{blue}{e^{y}}}\right) \]
                                  5. lower-exp.f6452.2

                                    \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
                                4. Applied rewrites52.2%

                                  \[\leadsto \color{blue}{0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                5. Taylor expanded in y around 0

                                  \[\leadsto \frac{1}{2} \cdot \left(2 \cdot \color{blue}{y}\right) \]
                                6. Step-by-step derivation
                                  1. lower-*.f6428.5

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

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

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

                                    \[\leadsto \left(2 \cdot y\right) \cdot \color{blue}{\frac{1}{2}} \]
                                  3. lower-*.f6428.5

                                    \[\leadsto \left(2 \cdot y\right) \cdot \color{blue}{0.5} \]
                                  4. lift-*.f64N/A

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

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

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

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

                                if 6.5000000000000001e66 < x

                                1. Initial program 88.6%

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

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

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

                                      \[\leadsto \color{blue}{\frac{x \cdot \sinh y}{x}} \]
                                    2. mult-flipN/A

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

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

                                      \[\leadsto \color{blue}{\frac{1}{x} \cdot \left(x \cdot \sinh y\right)} \]
                                    5. lower-/.f6453.0

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

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

                                    \[\leadsto \frac{1}{x} \cdot \left(x \cdot \color{blue}{y}\right) \]
                                  5. Step-by-step derivation
                                    1. Applied rewrites23.1%

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

                                  Alternative 10: 28.5% accurate, 7.7× speedup?

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

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

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

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

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

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

                                      \[\leadsto \frac{1}{2} \cdot \left(e^{y} - \frac{1}{\color{blue}{e^{y}}}\right) \]
                                    5. lower-exp.f6452.2

                                      \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
                                  4. Applied rewrites52.2%

                                    \[\leadsto \color{blue}{0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right)} \]
                                  5. Taylor expanded in y around 0

                                    \[\leadsto \frac{1}{2} \cdot \left(2 \cdot \color{blue}{y}\right) \]
                                  6. Step-by-step derivation
                                    1. lower-*.f6428.5

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

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

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

                                      \[\leadsto \left(2 \cdot y\right) \cdot \color{blue}{\frac{1}{2}} \]
                                    3. lower-*.f6428.5

                                      \[\leadsto \left(2 \cdot y\right) \cdot \color{blue}{0.5} \]
                                    4. lift-*.f64N/A

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

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

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

                                    \[\leadsto \color{blue}{\left(y + y\right) \cdot 0.5} \]
                                  10. Add Preprocessing

                                  Reproduce

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