Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 88.9% → 99.9%
Time: 2.4s
Alternatives: 10
Speedup: 1.0×

Specification

?
\[\frac{\sin x \cdot \sinh y}{x} \]
(FPCore (x y)
  :precision binary64
  :pre TRUE
  (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
	return (sin(x) * sinh(y)) / x;
}
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]
f(x, y):
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(x, y: real): real =
	((sin(x)) * (((1) / (2)) * ((exp(y)) + ((- (1)) / (exp(y)))))) / x
END code
\frac{\sin x \cdot \sinh y}{x}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 88.9% accurate, 1.0× speedup?

\[\frac{\sin x \cdot \sinh y}{x} \]
(FPCore (x y)
  :precision binary64
  :pre TRUE
  (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
	return (sin(x) * sinh(y)) / x;
}
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]
f(x, y):
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(x, y: real): real =
	((sin(x)) * (((1) / (2)) * ((exp(y)) + ((- (1)) / (exp(y)))))) / x
END code
\frac{\sin x \cdot \sinh y}{x}

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\sinh y \cdot \frac{\sin x}{x} \]
(FPCore (x y)
  :precision binary64
  :pre TRUE
  (* (sinh y) (/ (sin x) x)))
double code(double x, double y) {
	return sinh(y) * (sin(x) / x);
}
real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = sinh(y) * (sin(x) / x)
end function
public static double code(double x, double y) {
	return Math.sinh(y) * (Math.sin(x) / x);
}
def code(x, y):
	return math.sinh(y) * (math.sin(x) / x)
function code(x, y)
	return Float64(sinh(y) * Float64(sin(x) / x))
end
function tmp = code(x, y)
	tmp = sinh(y) * (sin(x) / x);
end
code[x_, y_] := N[(N[Sinh[y], $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
f(x, y):
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(x, y: real): real =
	(((1) / (2)) * ((exp(y)) + ((- (1)) / (exp(y))))) * ((sin(x)) / x)
END code
\sinh y \cdot \frac{\sin x}{x}
Derivation
  1. Initial program 88.9%

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Step-by-step derivation
    1. Applied rewrites99.9%

      \[\leadsto \sinh y \cdot \frac{\sin x}{x} \]
    2. Add Preprocessing

    Alternative 2: 99.2% accurate, 0.3× speedup?

    \[\begin{array}{l} t_0 := \sinh \left(\left|y\right|\right)\\ t_1 := \frac{\sin x \cdot t\_0}{x}\\ \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-46}:\\ \;\;\;\;\sin x \cdot \frac{\left|y\right|}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y)
      :precision binary64
      :pre TRUE
      (let* ((t_0 (sinh (fabs y))) (t_1 (/ (* (sin x) t_0) x)))
      (*
       (copysign 1.0 y)
       (if (<= t_1 (- INFINITY))
         (* t_0 (fma (* x x) -0.16666666666666666 1.0))
         (if (<= t_1 4e-46) (* (sin x) (/ (fabs y) x)) t_0)))))
    double code(double x, double y) {
    	double t_0 = sinh(fabs(y));
    	double t_1 = (sin(x) * t_0) / x;
    	double tmp;
    	if (t_1 <= -((double) INFINITY)) {
    		tmp = t_0 * fma((x * x), -0.16666666666666666, 1.0);
    	} else if (t_1 <= 4e-46) {
    		tmp = sin(x) * (fabs(y) / x);
    	} else {
    		tmp = t_0;
    	}
    	return copysign(1.0, y) * tmp;
    }
    
    function code(x, y)
    	t_0 = sinh(abs(y))
    	t_1 = Float64(Float64(sin(x) * t_0) / x)
    	tmp = 0.0
    	if (t_1 <= Float64(-Inf))
    		tmp = Float64(t_0 * fma(Float64(x * x), -0.16666666666666666, 1.0));
    	elseif (t_1 <= 4e-46)
    		tmp = Float64(sin(x) * Float64(abs(y) / x));
    	else
    		tmp = t_0;
    	end
    	return Float64(copysign(1.0, y) * tmp)
    end
    
    code[x_, y_] := Block[{t$95$0 = N[Sinh[N[Abs[y], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision] / x), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[t$95$1, (-Infinity)], N[(t$95$0 * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-46], N[(N[Sin[x], $MachinePrecision] * N[(N[Abs[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$0]]), $MachinePrecision]]]
    
    \begin{array}{l}
    t_0 := \sinh \left(\left|y\right|\right)\\
    t_1 := \frac{\sin x \cdot t\_0}{x}\\
    \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l}
    \mathbf{if}\;t\_1 \leq -\infty:\\
    \;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\\
    
    \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-46}:\\
    \;\;\;\;\sin x \cdot \frac{\left|y\right|}{x}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0

      1. Initial program 88.9%

        \[\frac{\sin x \cdot \sinh y}{x} \]
      2. Step-by-step derivation
        1. Applied rewrites99.9%

          \[\leadsto \sinh y \cdot \frac{\sin x}{x} \]
        2. Step-by-step derivation
          1. Applied rewrites99.8%

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

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

              \[\leadsto \sinh y \cdot \left(1 + -0.16666666666666666 \cdot {x}^{2}\right) \]
            2. Step-by-step derivation
              1. Applied rewrites62.9%

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

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

              1. Initial program 88.9%

                \[\frac{\sin x \cdot \sinh y}{x} \]
              2. Step-by-step derivation
                1. Applied rewrites99.8%

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

                  \[\leadsto \sin x \cdot \frac{y}{x} \]
                3. Step-by-step derivation
                  1. Applied rewrites62.9%

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

                  if 4.0000000000000001e-46 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

                  1. Initial program 88.9%

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

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

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

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

                    Alternative 3: 75.9% accurate, 1.1× speedup?

                    \[\begin{array}{l} t_0 := e^{\left|y\right|}\\ t_1 := \sinh \left(\left|y\right|\right)\\ \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 6.575218410636739 \cdot 10^{+75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;\left|x\right| \leq 2.9174093151562287 \cdot 10^{+89}:\\ \;\;\;\;t\_1 \cdot \mathsf{fma}\left(\left|x\right| \cdot \left|x\right|, -0.16666666666666666, 1\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(t\_0 - \frac{1}{t\_0}\right)\\ \end{array} \end{array} \]
                    (FPCore (x y)
                      :precision binary64
                      :pre TRUE
                      (let* ((t_0 (exp (fabs y))) (t_1 (sinh (fabs y))))
                      (*
                       (copysign 1.0 y)
                       (if (<= (fabs x) 6.575218410636739e+75)
                         t_1
                         (if (<= (fabs x) 2.9174093151562287e+89)
                           (* t_1 (fma (* (fabs x) (fabs x)) -0.16666666666666666 1.0))
                           (* 0.5 (- t_0 (/ 1.0 t_0))))))))
                    double code(double x, double y) {
                    	double t_0 = exp(fabs(y));
                    	double t_1 = sinh(fabs(y));
                    	double tmp;
                    	if (fabs(x) <= 6.575218410636739e+75) {
                    		tmp = t_1;
                    	} else if (fabs(x) <= 2.9174093151562287e+89) {
                    		tmp = t_1 * fma((fabs(x) * fabs(x)), -0.16666666666666666, 1.0);
                    	} else {
                    		tmp = 0.5 * (t_0 - (1.0 / t_0));
                    	}
                    	return copysign(1.0, y) * tmp;
                    }
                    
                    function code(x, y)
                    	t_0 = exp(abs(y))
                    	t_1 = sinh(abs(y))
                    	tmp = 0.0
                    	if (abs(x) <= 6.575218410636739e+75)
                    		tmp = t_1;
                    	elseif (abs(x) <= 2.9174093151562287e+89)
                    		tmp = Float64(t_1 * fma(Float64(abs(x) * abs(x)), -0.16666666666666666, 1.0));
                    	else
                    		tmp = Float64(0.5 * Float64(t_0 - Float64(1.0 / t_0)));
                    	end
                    	return Float64(copysign(1.0, y) * tmp)
                    end
                    
                    code[x_, y_] := Block[{t$95$0 = N[Exp[N[Abs[y], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sinh[N[Abs[y], $MachinePrecision]], $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 6.575218410636739e+75], t$95$1, If[LessEqual[N[Abs[x], $MachinePrecision], 2.9174093151562287e+89], N[(t$95$1 * N[(N[(N[Abs[x], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(t$95$0 - N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    t_0 := e^{\left|y\right|}\\
                    t_1 := \sinh \left(\left|y\right|\right)\\
                    \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l}
                    \mathbf{if}\;\left|x\right| \leq 6.575218410636739 \cdot 10^{+75}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;\left|x\right| \leq 2.9174093151562287 \cdot 10^{+89}:\\
                    \;\;\;\;t\_1 \cdot \mathsf{fma}\left(\left|x\right| \cdot \left|x\right|, -0.16666666666666666, 1\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;0.5 \cdot \left(t\_0 - \frac{1}{t\_0}\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if x < 6.5752184106367389e75

                      1. Initial program 88.9%

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

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

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

                            \[\leadsto \sinh y \]

                          if 6.5752184106367389e75 < x < 2.9174093151562287e89

                          1. Initial program 88.9%

                            \[\frac{\sin x \cdot \sinh y}{x} \]
                          2. Step-by-step derivation
                            1. Applied rewrites99.9%

                              \[\leadsto \sinh y \cdot \frac{\sin x}{x} \]
                            2. Step-by-step derivation
                              1. Applied rewrites99.8%

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

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

                                  \[\leadsto \sinh y \cdot \left(1 + -0.16666666666666666 \cdot {x}^{2}\right) \]
                                2. Step-by-step derivation
                                  1. Applied rewrites62.9%

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

                                  if 2.9174093151562287e89 < x

                                  1. Initial program 88.9%

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

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

                                      \[\leadsto 0.5 \cdot \left(e^{y} - \frac{1}{e^{y}}\right) \]
                                  4. Recombined 3 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 4: 74.9% accurate, 1.3× speedup?

                                  \[\begin{array}{l} t_0 := \sinh \left(\left|y\right|\right)\\ \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 6.575218410636739 \cdot 10^{+75}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\left|x\right| \leq 2.9174093151562287 \cdot 10^{+89}:\\ \;\;\;\;t\_0 \cdot \mathsf{fma}\left(\left|x\right| \cdot \left|x\right|, -0.16666666666666666, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(e^{\left|y\right|} - \left(1 - \left|y\right|\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                                  (FPCore (x y)
                                    :precision binary64
                                    :pre TRUE
                                    (let* ((t_0 (sinh (fabs y))))
                                    (*
                                     (copysign 1.0 y)
                                     (if (<= (fabs x) 6.575218410636739e+75)
                                       t_0
                                       (if (<= (fabs x) 2.9174093151562287e+89)
                                         (* t_0 (fma (* (fabs x) (fabs x)) -0.16666666666666666 1.0))
                                         (* (- (exp (fabs y)) (- 1.0 (fabs y))) 0.5))))))
                                  double code(double x, double y) {
                                  	double t_0 = sinh(fabs(y));
                                  	double tmp;
                                  	if (fabs(x) <= 6.575218410636739e+75) {
                                  		tmp = t_0;
                                  	} else if (fabs(x) <= 2.9174093151562287e+89) {
                                  		tmp = t_0 * fma((fabs(x) * fabs(x)), -0.16666666666666666, 1.0);
                                  	} else {
                                  		tmp = (exp(fabs(y)) - (1.0 - fabs(y))) * 0.5;
                                  	}
                                  	return copysign(1.0, y) * tmp;
                                  }
                                  
                                  function code(x, y)
                                  	t_0 = sinh(abs(y))
                                  	tmp = 0.0
                                  	if (abs(x) <= 6.575218410636739e+75)
                                  		tmp = t_0;
                                  	elseif (abs(x) <= 2.9174093151562287e+89)
                                  		tmp = Float64(t_0 * fma(Float64(abs(x) * abs(x)), -0.16666666666666666, 1.0));
                                  	else
                                  		tmp = Float64(Float64(exp(abs(y)) - Float64(1.0 - abs(y))) * 0.5);
                                  	end
                                  	return Float64(copysign(1.0, y) * tmp)
                                  end
                                  
                                  code[x_, y_] := Block[{t$95$0 = N[Sinh[N[Abs[y], $MachinePrecision]], $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 6.575218410636739e+75], t$95$0, If[LessEqual[N[Abs[x], $MachinePrecision], 2.9174093151562287e+89], N[(t$95$0 * N[(N[(N[Abs[x], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Exp[N[Abs[y], $MachinePrecision]], $MachinePrecision] - N[(1.0 - N[Abs[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  t_0 := \sinh \left(\left|y\right|\right)\\
                                  \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l}
                                  \mathbf{if}\;\left|x\right| \leq 6.575218410636739 \cdot 10^{+75}:\\
                                  \;\;\;\;t\_0\\
                                  
                                  \mathbf{elif}\;\left|x\right| \leq 2.9174093151562287 \cdot 10^{+89}:\\
                                  \;\;\;\;t\_0 \cdot \mathsf{fma}\left(\left|x\right| \cdot \left|x\right|, -0.16666666666666666, 1\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(e^{\left|y\right|} - \left(1 - \left|y\right|\right)\right) \cdot 0.5\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if x < 6.5752184106367389e75

                                    1. Initial program 88.9%

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

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

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

                                          \[\leadsto \sinh y \]

                                        if 6.5752184106367389e75 < x < 2.9174093151562287e89

                                        1. Initial program 88.9%

                                          \[\frac{\sin x \cdot \sinh y}{x} \]
                                        2. Step-by-step derivation
                                          1. Applied rewrites99.9%

                                            \[\leadsto \sinh y \cdot \frac{\sin x}{x} \]
                                          2. Step-by-step derivation
                                            1. Applied rewrites99.8%

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

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

                                                \[\leadsto \sinh y \cdot \left(1 + -0.16666666666666666 \cdot {x}^{2}\right) \]
                                              2. Step-by-step derivation
                                                1. Applied rewrites62.9%

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

                                                if 2.9174093151562287e89 < x

                                                1. Initial program 88.9%

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

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

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

                                                    \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites35.5%

                                                      \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                    2. Step-by-step derivation
                                                      1. Applied rewrites35.5%

                                                        \[\leadsto \left(e^{y} - \left(1 - y\right)\right) \cdot 0.5 \]
                                                    3. Recombined 3 regimes into one program.
                                                    4. Add Preprocessing

                                                    Alternative 5: 74.9% accurate, 1.7× speedup?

                                                    \[\mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 1.3074546278004367 \cdot 10^{+39}:\\ \;\;\;\;\sinh \left(\left|y\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left(e^{\left|y\right|} - \left(1 - \left|y\right|\right)\right) \cdot 0.5\\ \end{array} \]
                                                    (FPCore (x y)
                                                      :precision binary64
                                                      :pre TRUE
                                                      (*
                                                     (copysign 1.0 y)
                                                     (if (<= (fabs x) 1.3074546278004367e+39)
                                                       (sinh (fabs y))
                                                       (* (- (exp (fabs y)) (- 1.0 (fabs y))) 0.5))))
                                                    double code(double x, double y) {
                                                    	double tmp;
                                                    	if (fabs(x) <= 1.3074546278004367e+39) {
                                                    		tmp = sinh(fabs(y));
                                                    	} else {
                                                    		tmp = (exp(fabs(y)) - (1.0 - fabs(y))) * 0.5;
                                                    	}
                                                    	return copysign(1.0, y) * tmp;
                                                    }
                                                    
                                                    public static double code(double x, double y) {
                                                    	double tmp;
                                                    	if (Math.abs(x) <= 1.3074546278004367e+39) {
                                                    		tmp = Math.sinh(Math.abs(y));
                                                    	} else {
                                                    		tmp = (Math.exp(Math.abs(y)) - (1.0 - Math.abs(y))) * 0.5;
                                                    	}
                                                    	return Math.copySign(1.0, y) * tmp;
                                                    }
                                                    
                                                    def code(x, y):
                                                    	tmp = 0
                                                    	if math.fabs(x) <= 1.3074546278004367e+39:
                                                    		tmp = math.sinh(math.fabs(y))
                                                    	else:
                                                    		tmp = (math.exp(math.fabs(y)) - (1.0 - math.fabs(y))) * 0.5
                                                    	return math.copysign(1.0, y) * tmp
                                                    
                                                    function code(x, y)
                                                    	tmp = 0.0
                                                    	if (abs(x) <= 1.3074546278004367e+39)
                                                    		tmp = sinh(abs(y));
                                                    	else
                                                    		tmp = Float64(Float64(exp(abs(y)) - Float64(1.0 - abs(y))) * 0.5);
                                                    	end
                                                    	return Float64(copysign(1.0, y) * tmp)
                                                    end
                                                    
                                                    function tmp_2 = code(x, y)
                                                    	tmp = 0.0;
                                                    	if (abs(x) <= 1.3074546278004367e+39)
                                                    		tmp = sinh(abs(y));
                                                    	else
                                                    		tmp = (exp(abs(y)) - (1.0 - abs(y))) * 0.5;
                                                    	end
                                                    	tmp_2 = (sign(y) * abs(1.0)) * tmp;
                                                    end
                                                    
                                                    code[x_, y_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 1.3074546278004367e+39], N[Sinh[N[Abs[y], $MachinePrecision]], $MachinePrecision], N[(N[(N[Exp[N[Abs[y], $MachinePrecision]], $MachinePrecision] - N[(1.0 - N[Abs[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]), $MachinePrecision]
                                                    
                                                    \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l}
                                                    \mathbf{if}\;\left|x\right| \leq 1.3074546278004367 \cdot 10^{+39}:\\
                                                    \;\;\;\;\sinh \left(\left|y\right|\right)\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\left(e^{\left|y\right|} - \left(1 - \left|y\right|\right)\right) \cdot 0.5\\
                                                    
                                                    
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if x < 1.3074546278004367e39

                                                      1. Initial program 88.9%

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

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

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

                                                            \[\leadsto \sinh y \]

                                                          if 1.3074546278004367e39 < x

                                                          1. Initial program 88.9%

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

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

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

                                                              \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites35.5%

                                                                \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites35.5%

                                                                  \[\leadsto \left(e^{y} - \left(1 - y\right)\right) \cdot 0.5 \]
                                                              3. Recombined 2 regimes into one program.
                                                              4. Add Preprocessing

                                                              Alternative 6: 70.7% accurate, 1.7× speedup?

                                                              \[\mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 4.414482953417929 \cdot 10^{+77}:\\ \;\;\;\;\sinh \left(\left|y\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.5, \left|y\right|, 1\right), \left|y\right|, 1\right) - \left(1 - \left|y\right|\right)\right) \cdot 0.5\\ \end{array} \]
                                                              (FPCore (x y)
                                                                :precision binary64
                                                                :pre TRUE
                                                                (*
                                                               (copysign 1.0 y)
                                                               (if (<= (fabs x) 4.414482953417929e+77)
                                                                 (sinh (fabs y))
                                                                 (*
                                                                  (- (fma (fma 0.5 (fabs y) 1.0) (fabs y) 1.0) (- 1.0 (fabs y)))
                                                                  0.5))))
                                                              double code(double x, double y) {
                                                              	double tmp;
                                                              	if (fabs(x) <= 4.414482953417929e+77) {
                                                              		tmp = sinh(fabs(y));
                                                              	} else {
                                                              		tmp = (fma(fma(0.5, fabs(y), 1.0), fabs(y), 1.0) - (1.0 - fabs(y))) * 0.5;
                                                              	}
                                                              	return copysign(1.0, y) * tmp;
                                                              }
                                                              
                                                              function code(x, y)
                                                              	tmp = 0.0
                                                              	if (abs(x) <= 4.414482953417929e+77)
                                                              		tmp = sinh(abs(y));
                                                              	else
                                                              		tmp = Float64(Float64(fma(fma(0.5, abs(y), 1.0), abs(y), 1.0) - Float64(1.0 - abs(y))) * 0.5);
                                                              	end
                                                              	return Float64(copysign(1.0, y) * tmp)
                                                              end
                                                              
                                                              code[x_, y_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 4.414482953417929e+77], N[Sinh[N[Abs[y], $MachinePrecision]], $MachinePrecision], N[(N[(N[(N[(0.5 * N[Abs[y], $MachinePrecision] + 1.0), $MachinePrecision] * N[Abs[y], $MachinePrecision] + 1.0), $MachinePrecision] - N[(1.0 - N[Abs[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]), $MachinePrecision]
                                                              
                                                              \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l}
                                                              \mathbf{if}\;\left|x\right| \leq 4.414482953417929 \cdot 10^{+77}:\\
                                                              \;\;\;\;\sinh \left(\left|y\right|\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.5, \left|y\right|, 1\right), \left|y\right|, 1\right) - \left(1 - \left|y\right|\right)\right) \cdot 0.5\\
                                                              
                                                              
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if x < 4.414482953417929e77

                                                                1. Initial program 88.9%

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

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

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

                                                                      \[\leadsto \sinh y \]

                                                                    if 4.414482953417929e77 < x

                                                                    1. Initial program 88.9%

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

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

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

                                                                        \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites35.5%

                                                                          \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                                        2. Taylor expanded in y around 0

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

                                                                            \[\leadsto 0.5 \cdot \left(\left(1 + y \cdot \left(1 + 0.5 \cdot y\right)\right) - \left(1 + -1 \cdot y\right)\right) \]
                                                                          2. Step-by-step derivation
                                                                            1. Applied rewrites28.3%

                                                                              \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(0.5, y, 1\right), y, 1\right) - \left(1 - y\right)\right) \cdot 0.5 \]
                                                                          3. Recombined 2 regimes into one program.
                                                                          4. Add Preprocessing

                                                                          Alternative 7: 66.4% accurate, 2.8× speedup?

                                                                          \[\begin{array}{l} \mathbf{if}\;\left|x\right| \leq 1.538824596465832 \cdot 10^{+138}:\\ \;\;\;\;\sinh y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y - -1\right) - \left(1 - y\right)\right) \cdot 0.5\\ \end{array} \]
                                                                          (FPCore (x y)
                                                                            :precision binary64
                                                                            :pre TRUE
                                                                            (if (<= (fabs x) 1.538824596465832e+138)
                                                                            (sinh y)
                                                                            (* (- (- y -1.0) (- 1.0 y)) 0.5)))
                                                                          double code(double x, double y) {
                                                                          	double tmp;
                                                                          	if (fabs(x) <= 1.538824596465832e+138) {
                                                                          		tmp = sinh(y);
                                                                          	} else {
                                                                          		tmp = ((y - -1.0) - (1.0 - y)) * 0.5;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          real(8) function code(x, y)
                                                                          use fmin_fmax_functions
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              real(8) :: tmp
                                                                              if (abs(x) <= 1.538824596465832d+138) then
                                                                                  tmp = sinh(y)
                                                                              else
                                                                                  tmp = ((y - (-1.0d0)) - (1.0d0 - y)) * 0.5d0
                                                                              end if
                                                                              code = tmp
                                                                          end function
                                                                          
                                                                          public static double code(double x, double y) {
                                                                          	double tmp;
                                                                          	if (Math.abs(x) <= 1.538824596465832e+138) {
                                                                          		tmp = Math.sinh(y);
                                                                          	} else {
                                                                          		tmp = ((y - -1.0) - (1.0 - y)) * 0.5;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          def code(x, y):
                                                                          	tmp = 0
                                                                          	if math.fabs(x) <= 1.538824596465832e+138:
                                                                          		tmp = math.sinh(y)
                                                                          	else:
                                                                          		tmp = ((y - -1.0) - (1.0 - y)) * 0.5
                                                                          	return tmp
                                                                          
                                                                          function code(x, y)
                                                                          	tmp = 0.0
                                                                          	if (abs(x) <= 1.538824596465832e+138)
                                                                          		tmp = sinh(y);
                                                                          	else
                                                                          		tmp = Float64(Float64(Float64(y - -1.0) - Float64(1.0 - y)) * 0.5);
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          function tmp_2 = code(x, y)
                                                                          	tmp = 0.0;
                                                                          	if (abs(x) <= 1.538824596465832e+138)
                                                                          		tmp = sinh(y);
                                                                          	else
                                                                          		tmp = ((y - -1.0) - (1.0 - y)) * 0.5;
                                                                          	end
                                                                          	tmp_2 = tmp;
                                                                          end
                                                                          
                                                                          code[x_, y_] := If[LessEqual[N[Abs[x], $MachinePrecision], 1.538824596465832e+138], N[Sinh[y], $MachinePrecision], N[(N[(N[(y - -1.0), $MachinePrecision] - N[(1.0 - y), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                                                                          
                                                                          f(x, y):
                                                                          	x in [-inf, +inf],
                                                                          	y in [-inf, +inf]
                                                                          code: THEORY
                                                                          BEGIN
                                                                          f(x, y: real): real =
                                                                          	LET tmp = IF ((abs(x)) <= (1538824596465832064834429787659023318790986286200578955760090637805956879730743687518287917823051291161627589587803539258046338137333956608)) THEN (((1) / (2)) * ((exp(y)) + ((- (1)) / (exp(y))))) ELSE (((y - (-1)) - ((1) - y)) * (5e-1)) ENDIF IN
                                                                          	tmp
                                                                          END code
                                                                          \begin{array}{l}
                                                                          \mathbf{if}\;\left|x\right| \leq 1.538824596465832 \cdot 10^{+138}:\\
                                                                          \;\;\;\;\sinh y\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\left(\left(y - -1\right) - \left(1 - y\right)\right) \cdot 0.5\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if x < 1.5388245964658321e138

                                                                            1. Initial program 88.9%

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

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

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

                                                                                  \[\leadsto \sinh y \]

                                                                                if 1.5388245964658321e138 < x

                                                                                1. Initial program 88.9%

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

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

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

                                                                                    \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites35.5%

                                                                                      \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                                                    2. Taylor expanded in y around 0

                                                                                      \[\leadsto 0.5 \cdot \left(\left(1 + y\right) - \left(1 + -1 \cdot y\right)\right) \]
                                                                                    3. Step-by-step derivation
                                                                                      1. Applied rewrites16.6%

                                                                                        \[\leadsto 0.5 \cdot \left(\left(1 + y\right) - \left(1 + -1 \cdot y\right)\right) \]
                                                                                      2. Step-by-step derivation
                                                                                        1. Applied rewrites16.6%

                                                                                          \[\leadsto \left(\left(y - -1\right) - \left(1 - y\right)\right) \cdot 0.5 \]
                                                                                      3. Recombined 2 regimes into one program.
                                                                                      4. Add Preprocessing

                                                                                      Alternative 8: 39.3% accurate, 3.3× speedup?

                                                                                      \[\begin{array}{l} \mathbf{if}\;\left|x\right| \leq 9.508742156060054 \cdot 10^{+42}:\\ \;\;\;\;\left(y + y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y - -1\right) - \left(1 - y\right)\right) \cdot 0.5\\ \end{array} \]
                                                                                      (FPCore (x y)
                                                                                        :precision binary64
                                                                                        :pre TRUE
                                                                                        (if (<= (fabs x) 9.508742156060054e+42)
                                                                                        (* (+ y y) 0.5)
                                                                                        (* (- (- y -1.0) (- 1.0 y)) 0.5)))
                                                                                      double code(double x, double y) {
                                                                                      	double tmp;
                                                                                      	if (fabs(x) <= 9.508742156060054e+42) {
                                                                                      		tmp = (y + y) * 0.5;
                                                                                      	} else {
                                                                                      		tmp = ((y - -1.0) - (1.0 - y)) * 0.5;
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      real(8) function code(x, y)
                                                                                      use fmin_fmax_functions
                                                                                          real(8), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          real(8) :: tmp
                                                                                          if (abs(x) <= 9.508742156060054d+42) then
                                                                                              tmp = (y + y) * 0.5d0
                                                                                          else
                                                                                              tmp = ((y - (-1.0d0)) - (1.0d0 - y)) * 0.5d0
                                                                                          end if
                                                                                          code = tmp
                                                                                      end function
                                                                                      
                                                                                      public static double code(double x, double y) {
                                                                                      	double tmp;
                                                                                      	if (Math.abs(x) <= 9.508742156060054e+42) {
                                                                                      		tmp = (y + y) * 0.5;
                                                                                      	} else {
                                                                                      		tmp = ((y - -1.0) - (1.0 - y)) * 0.5;
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      def code(x, y):
                                                                                      	tmp = 0
                                                                                      	if math.fabs(x) <= 9.508742156060054e+42:
                                                                                      		tmp = (y + y) * 0.5
                                                                                      	else:
                                                                                      		tmp = ((y - -1.0) - (1.0 - y)) * 0.5
                                                                                      	return tmp
                                                                                      
                                                                                      function code(x, y)
                                                                                      	tmp = 0.0
                                                                                      	if (abs(x) <= 9.508742156060054e+42)
                                                                                      		tmp = Float64(Float64(y + y) * 0.5);
                                                                                      	else
                                                                                      		tmp = Float64(Float64(Float64(y - -1.0) - Float64(1.0 - y)) * 0.5);
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      function tmp_2 = code(x, y)
                                                                                      	tmp = 0.0;
                                                                                      	if (abs(x) <= 9.508742156060054e+42)
                                                                                      		tmp = (y + y) * 0.5;
                                                                                      	else
                                                                                      		tmp = ((y - -1.0) - (1.0 - y)) * 0.5;
                                                                                      	end
                                                                                      	tmp_2 = tmp;
                                                                                      end
                                                                                      
                                                                                      code[x_, y_] := If[LessEqual[N[Abs[x], $MachinePrecision], 9.508742156060054e+42], N[(N[(y + y), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[(y - -1.0), $MachinePrecision] - N[(1.0 - y), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                                                                                      
                                                                                      f(x, y):
                                                                                      	x in [-inf, +inf],
                                                                                      	y in [-inf, +inf]
                                                                                      code: THEORY
                                                                                      BEGIN
                                                                                      f(x, y: real): real =
                                                                                      	LET tmp = IF ((abs(x)) <= (9508742156060053731629728907426303123128320)) THEN ((y + y) * (5e-1)) ELSE (((y - (-1)) - ((1) - y)) * (5e-1)) ENDIF IN
                                                                                      	tmp
                                                                                      END code
                                                                                      \begin{array}{l}
                                                                                      \mathbf{if}\;\left|x\right| \leq 9.508742156060054 \cdot 10^{+42}:\\
                                                                                      \;\;\;\;\left(y + y\right) \cdot 0.5\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\left(\left(y - -1\right) - \left(1 - y\right)\right) \cdot 0.5\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 2 regimes
                                                                                      2. if x < 9.5087421560600537e42

                                                                                        1. Initial program 88.9%

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

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

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

                                                                                            \[\leadsto 0.5 \cdot \left(2 \cdot y\right) \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites28.3%

                                                                                              \[\leadsto 0.5 \cdot \left(2 \cdot y\right) \]
                                                                                            2. Step-by-step derivation
                                                                                              1. Applied rewrites28.3%

                                                                                                \[\leadsto \left(y + y\right) \cdot 0.5 \]

                                                                                              if 9.5087421560600537e42 < x

                                                                                              1. Initial program 88.9%

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

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

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

                                                                                                  \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites35.5%

                                                                                                    \[\leadsto 0.5 \cdot \left(e^{y} - \left(1 + -1 \cdot y\right)\right) \]
                                                                                                  2. Taylor expanded in y around 0

                                                                                                    \[\leadsto 0.5 \cdot \left(\left(1 + y\right) - \left(1 + -1 \cdot y\right)\right) \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. Applied rewrites16.6%

                                                                                                      \[\leadsto 0.5 \cdot \left(\left(1 + y\right) - \left(1 + -1 \cdot y\right)\right) \]
                                                                                                    2. Step-by-step derivation
                                                                                                      1. Applied rewrites16.6%

                                                                                                        \[\leadsto \left(\left(y - -1\right) - \left(1 - y\right)\right) \cdot 0.5 \]
                                                                                                    3. Recombined 2 regimes into one program.
                                                                                                    4. Add Preprocessing

                                                                                                    Alternative 9: 34.6% accurate, 0.8× speedup?

                                                                                                    \[\mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin x \cdot \sinh \left(\left|y\right|\right)}{x} \leq 2 \cdot 10^{-10}:\\ \;\;\;\;\left(\left|y\right| + \left|y\right|\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left|y\right|}{x}\\ \end{array} \]
                                                                                                    (FPCore (x y)
                                                                                                      :precision binary64
                                                                                                      :pre TRUE
                                                                                                      (*
                                                                                                     (copysign 1.0 y)
                                                                                                     (if (<= (/ (* (sin x) (sinh (fabs y))) x) 2e-10)
                                                                                                       (* (+ (fabs y) (fabs y)) 0.5)
                                                                                                       (/ (* x (fabs y)) x))))
                                                                                                    double code(double x, double y) {
                                                                                                    	double tmp;
                                                                                                    	if (((sin(x) * sinh(fabs(y))) / x) <= 2e-10) {
                                                                                                    		tmp = (fabs(y) + fabs(y)) * 0.5;
                                                                                                    	} else {
                                                                                                    		tmp = (x * fabs(y)) / x;
                                                                                                    	}
                                                                                                    	return copysign(1.0, y) * tmp;
                                                                                                    }
                                                                                                    
                                                                                                    public static double code(double x, double y) {
                                                                                                    	double tmp;
                                                                                                    	if (((Math.sin(x) * Math.sinh(Math.abs(y))) / x) <= 2e-10) {
                                                                                                    		tmp = (Math.abs(y) + Math.abs(y)) * 0.5;
                                                                                                    	} else {
                                                                                                    		tmp = (x * Math.abs(y)) / x;
                                                                                                    	}
                                                                                                    	return Math.copySign(1.0, y) * tmp;
                                                                                                    }
                                                                                                    
                                                                                                    def code(x, y):
                                                                                                    	tmp = 0
                                                                                                    	if ((math.sin(x) * math.sinh(math.fabs(y))) / x) <= 2e-10:
                                                                                                    		tmp = (math.fabs(y) + math.fabs(y)) * 0.5
                                                                                                    	else:
                                                                                                    		tmp = (x * math.fabs(y)) / x
                                                                                                    	return math.copysign(1.0, y) * tmp
                                                                                                    
                                                                                                    function code(x, y)
                                                                                                    	tmp = 0.0
                                                                                                    	if (Float64(Float64(sin(x) * sinh(abs(y))) / x) <= 2e-10)
                                                                                                    		tmp = Float64(Float64(abs(y) + abs(y)) * 0.5);
                                                                                                    	else
                                                                                                    		tmp = Float64(Float64(x * abs(y)) / x);
                                                                                                    	end
                                                                                                    	return Float64(copysign(1.0, y) * tmp)
                                                                                                    end
                                                                                                    
                                                                                                    function tmp_2 = code(x, y)
                                                                                                    	tmp = 0.0;
                                                                                                    	if (((sin(x) * sinh(abs(y))) / x) <= 2e-10)
                                                                                                    		tmp = (abs(y) + abs(y)) * 0.5;
                                                                                                    	else
                                                                                                    		tmp = (x * abs(y)) / x;
                                                                                                    	end
                                                                                                    	tmp_2 = (sign(y) * abs(1.0)) * tmp;
                                                                                                    end
                                                                                                    
                                                                                                    code[x_, y_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[N[Abs[y], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 2e-10], N[(N[(N[Abs[y], $MachinePrecision] + N[Abs[y], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(x * N[Abs[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
                                                                                                    
                                                                                                    \mathsf{copysign}\left(1, y\right) \cdot \begin{array}{l}
                                                                                                    \mathbf{if}\;\frac{\sin x \cdot \sinh \left(\left|y\right|\right)}{x} \leq 2 \cdot 10^{-10}:\\
                                                                                                    \;\;\;\;\left(\left|y\right| + \left|y\right|\right) \cdot 0.5\\
                                                                                                    
                                                                                                    \mathbf{else}:\\
                                                                                                    \;\;\;\;\frac{x \cdot \left|y\right|}{x}\\
                                                                                                    
                                                                                                    
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Split input into 2 regimes
                                                                                                    2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.0000000000000001e-10

                                                                                                      1. Initial program 88.9%

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

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

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

                                                                                                          \[\leadsto 0.5 \cdot \left(2 \cdot y\right) \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites28.3%

                                                                                                            \[\leadsto 0.5 \cdot \left(2 \cdot y\right) \]
                                                                                                          2. Step-by-step derivation
                                                                                                            1. Applied rewrites28.3%

                                                                                                              \[\leadsto \left(y + y\right) \cdot 0.5 \]

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

                                                                                                            1. Initial program 88.9%

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

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

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

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

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

                                                                                                              Alternative 10: 28.3% accurate, 8.4× speedup?

                                                                                                              \[\left(y + y\right) \cdot 0.5 \]
                                                                                                              (FPCore (x y)
                                                                                                                :precision binary64
                                                                                                                :pre TRUE
                                                                                                                (* (+ y y) 0.5))
                                                                                                              double code(double x, double y) {
                                                                                                              	return (y + y) * 0.5;
                                                                                                              }
                                                                                                              
                                                                                                              real(8) function code(x, y)
                                                                                                              use fmin_fmax_functions
                                                                                                                  real(8), intent (in) :: x
                                                                                                                  real(8), intent (in) :: y
                                                                                                                  code = (y + y) * 0.5d0
                                                                                                              end function
                                                                                                              
                                                                                                              public static double code(double x, double y) {
                                                                                                              	return (y + y) * 0.5;
                                                                                                              }
                                                                                                              
                                                                                                              def code(x, y):
                                                                                                              	return (y + y) * 0.5
                                                                                                              
                                                                                                              function code(x, y)
                                                                                                              	return Float64(Float64(y + y) * 0.5)
                                                                                                              end
                                                                                                              
                                                                                                              function tmp = code(x, y)
                                                                                                              	tmp = (y + y) * 0.5;
                                                                                                              end
                                                                                                              
                                                                                                              code[x_, y_] := N[(N[(y + y), $MachinePrecision] * 0.5), $MachinePrecision]
                                                                                                              
                                                                                                              f(x, y):
                                                                                                              	x in [-inf, +inf],
                                                                                                              	y in [-inf, +inf]
                                                                                                              code: THEORY
                                                                                                              BEGIN
                                                                                                              f(x, y: real): real =
                                                                                                              	(y + y) * (5e-1)
                                                                                                              END code
                                                                                                              \left(y + y\right) \cdot 0.5
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Initial program 88.9%

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

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

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

                                                                                                                  \[\leadsto 0.5 \cdot \left(2 \cdot y\right) \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. Applied rewrites28.3%

                                                                                                                    \[\leadsto 0.5 \cdot \left(2 \cdot y\right) \]
                                                                                                                  2. Step-by-step derivation
                                                                                                                    1. Applied rewrites28.3%

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

                                                                                                                    Reproduce

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