Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 89.3% → 99.9%
Time: 4.7s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 89.3% 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 89.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    7. 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.3% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;1 \cdot \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 89.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
      7. 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. Taylor expanded in x around 0

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

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

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

        \[\leadsto \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right) \cdot \sinh y \]
    6. Applied rewrites62.8%

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

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

    1. Initial program 89.3%

      \[\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-*.f6450.9

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

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

      if 4.00000000000000012e-53 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

      1. Initial program 89.3%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
        7. 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. Taylor expanded in x around 0

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

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

      Alternative 3: 86.3% accurate, 0.3× speedup?

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
          7. 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. Taylor expanded in x around 0

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

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

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

            \[\leadsto \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right) \cdot \sinh y \]
        6. Applied rewrites62.8%

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

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

        1. Initial program 89.3%

          \[\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-/.f6462.6

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

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

          if 4.00000000000000012e-53 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

          1. Initial program 89.3%

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
            7. 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. Taylor expanded in x around 0

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

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

          Alternative 4: 73.9% accurate, 0.6× speedup?

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

            1. Initial program 89.3%

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
              7. 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. Taylor expanded in x around 0

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

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

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

                \[\leadsto \left(1 + -0.16666666666666666 \cdot {x}^{\color{blue}{2}}\right) \cdot \sinh y \]
            6. Applied rewrites62.8%

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

            if -9.99999999999999961e-261 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

            1. Initial program 89.3%

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

                \[\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. lift-*.f64N/A

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

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

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

                  \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                6. lower-*.f6474.2

                  \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
              3. Applied rewrites74.2%

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

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

              1. Initial program 89.3%

                \[\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. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -2e-187 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 9.99999999999999985e-266

                1. Initial program 89.3%

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

                    \[\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. lift-*.f64N/A

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

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

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

                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                    6. lower-*.f6474.2

                      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                  3. Applied rewrites74.2%

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

                    \[\leadsto \color{blue}{\frac{y}{x}} \cdot x \]
                  5. Step-by-step derivation
                    1. lower-/.f6449.8

                      \[\leadsto \frac{y}{\color{blue}{x}} \cdot x \]
                  6. Applied rewrites49.8%

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

                  if 9.99999999999999985e-266 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                  1. Initial program 89.3%

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
                    7. 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. Taylor expanded in x around 0

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

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

                  Alternative 6: 61.0% accurate, 0.7× speedup?

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

                    1. Initial program 89.3%

                      \[\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. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 89.3%

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

                          \[\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. lift-*.f64N/A

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

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

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

                            \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                          6. lower-*.f6474.2

                            \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                        3. Applied rewrites74.2%

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

                      Alternative 7: 61.0% accurate, 0.4× speedup?

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

                        1. Initial program 89.3%

                          \[\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. Taylor expanded in x around 0

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

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

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

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

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

                            \[\leadsto \frac{\color{blue}{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{2}\right)\right)} \cdot 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 y}{x}} \]
                            2. mult-flipN/A

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

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

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

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

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

                              \[\leadsto y \cdot \color{blue}{\left(\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \cdot \frac{1}{x}\right)} \]
                          6. Applied rewrites36.0%

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\left(1 \cdot \left(\left(x \cdot x\right) \cdot \frac{-1}{6}\right) + 1\right) \cdot x}{x} \cdot y \]
                            11. metadata-evalN/A

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

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

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

                              \[\leadsto \frac{\left(\frac{-1}{6} \cdot \left(x \cdot x\right) + 1 \cdot 1\right) \cdot x}{x} \cdot y \]
                            15. metadata-evalN/A

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

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

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

                          if -2e-187 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 9.99999999999999985e-266

                          1. Initial program 89.3%

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

                              \[\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. lift-*.f64N/A

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

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

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

                                \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                              6. lower-*.f6474.2

                                \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                            3. Applied rewrites74.2%

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

                              \[\leadsto \color{blue}{\frac{y}{x}} \cdot x \]
                            5. Step-by-step derivation
                              1. lower-/.f6449.8

                                \[\leadsto \frac{y}{\color{blue}{x}} \cdot x \]
                            6. Applied rewrites49.8%

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

                            if 9.99999999999999985e-266 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                            1. Initial program 89.3%

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
                              7. 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. Taylor expanded in x around 0

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

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

                            Alternative 8: 60.8% accurate, 0.7× speedup?

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

                              1. Initial program 89.3%

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

                                  \[\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. lift-*.f64N/A

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

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

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

                                    \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                                  6. lower-*.f6474.2

                                    \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                                3. Applied rewrites74.2%

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

                                  \[\leadsto \color{blue}{\frac{y}{x}} \cdot x \]
                                5. Step-by-step derivation
                                  1. lower-/.f6449.8

                                    \[\leadsto \frac{y}{\color{blue}{x}} \cdot x \]
                                6. Applied rewrites49.8%

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

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

                                1. Initial program 89.3%

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
                                  7. 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. Taylor expanded in x around 0

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

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

                                Alternative 9: 49.8% accurate, 3.4× speedup?

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

                                  1. Initial program 89.3%

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

                                      \[\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. lift-*.f64N/A

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

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

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

                                        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                                      6. lower-*.f6474.2

                                        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                                    3. Applied rewrites74.2%

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

                                      \[\leadsto \color{blue}{\frac{y}{x}} \cdot x \]
                                    5. Step-by-step derivation
                                      1. lower-/.f6449.8

                                        \[\leadsto \frac{y}{\color{blue}{x}} \cdot x \]
                                    6. Applied rewrites49.8%

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

                                    if 1.8000000000000002e271 < y

                                    1. Initial program 89.3%

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

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

                                          \[\leadsto \frac{\color{blue}{x \cdot \sinh y}}{x} \]
                                        2. remove-double-divN/A

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

                                          \[\leadsto \frac{x \cdot \frac{1}{\color{blue}{\frac{1}{\sinh y}}}}{x} \]
                                        4. mult-flip-revN/A

                                          \[\leadsto \frac{\color{blue}{\frac{x}{\frac{1}{\sinh y}}}}{x} \]
                                        5. lower-/.f6453.2

                                          \[\leadsto \frac{\color{blue}{\frac{x}{\frac{1}{\sinh y}}}}{x} \]
                                      3. Applied rewrites53.2%

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

                                        \[\leadsto \frac{\frac{x}{\color{blue}{\frac{1}{y}}}}{x} \]
                                      5. Step-by-step derivation
                                        1. lower-/.f6423.2

                                          \[\leadsto \frac{\frac{x}{\frac{1}{\color{blue}{y}}}}{x} \]
                                      6. Applied rewrites23.2%

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

                                    Alternative 10: 49.4% accurate, 7.0× speedup?

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

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

                                        \[\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. lift-*.f64N/A

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

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

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

                                          \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                                        6. lower-*.f6474.2

                                          \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot x} \]
                                      3. Applied rewrites74.2%

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

                                        \[\leadsto \color{blue}{\frac{y}{x}} \cdot x \]
                                      5. Step-by-step derivation
                                        1. lower-/.f6449.8

                                          \[\leadsto \frac{y}{\color{blue}{x}} \cdot x \]
                                      6. Applied rewrites49.8%

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

                                      Alternative 11: 27.7% accurate, 13.0× speedup?

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

                                        \[\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. Taylor expanded in x around 0

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

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

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

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

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

                                          \[\leadsto \frac{\color{blue}{\left(x \cdot \left(1 + -0.16666666666666666 \cdot {x}^{2}\right)\right)} \cdot 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 y}{x}} \]
                                          2. mult-flipN/A

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

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

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

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

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

                                            \[\leadsto y \cdot \color{blue}{\left(\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \cdot \frac{1}{x}\right)} \]
                                        6. Applied rewrites36.0%

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

                                          \[\leadsto y \cdot \color{blue}{1} \]
                                        8. Step-by-step derivation
                                          1. Applied rewrites27.7%

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

                                          Reproduce

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