Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 88.7% → 99.9%
Time: 7.7s
Alternatives: 16
Speedup: 1.6×

Specification

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

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

Sampling outcomes in binary64 precision:

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 16 alternatives:

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

Initial Program: 88.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 5 \cdot 10^{-23}:\\ \;\;\;\;\sinh y\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin x\_m \cdot \sinh y}{x\_m}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m y)
 :precision binary64
 (if (<= x_m 5e-23) (sinh y) (/ (* (sin x_m) (sinh y)) x_m)))
x_m = fabs(x);
double code(double x_m, double y) {
	double tmp;
	if (x_m <= 5e-23) {
		tmp = sinh(y);
	} else {
		tmp = (sin(x_m) * sinh(y)) / x_m;
	}
	return tmp;
}
x_m = abs(x)
real(8) function code(x_m, y)
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x_m <= 5d-23) then
        tmp = sinh(y)
    else
        tmp = (sin(x_m) * sinh(y)) / x_m
    end if
    code = tmp
end function
x_m = Math.abs(x);
public static double code(double x_m, double y) {
	double tmp;
	if (x_m <= 5e-23) {
		tmp = Math.sinh(y);
	} else {
		tmp = (Math.sin(x_m) * Math.sinh(y)) / x_m;
	}
	return tmp;
}
x_m = math.fabs(x)
def code(x_m, y):
	tmp = 0
	if x_m <= 5e-23:
		tmp = math.sinh(y)
	else:
		tmp = (math.sin(x_m) * math.sinh(y)) / x_m
	return tmp
x_m = abs(x)
function code(x_m, y)
	tmp = 0.0
	if (x_m <= 5e-23)
		tmp = sinh(y);
	else
		tmp = Float64(Float64(sin(x_m) * sinh(y)) / x_m);
	end
	return tmp
end
x_m = abs(x);
function tmp_2 = code(x_m, y)
	tmp = 0.0;
	if (x_m <= 5e-23)
		tmp = sinh(y);
	else
		tmp = (sin(x_m) * sinh(y)) / x_m;
	end
	tmp_2 = tmp;
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_, y_] := If[LessEqual[x$95$m, 5e-23], N[Sinh[y], $MachinePrecision], N[(N[(N[Sin[x$95$m], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
\mathbf{if}\;x\_m \leq 5 \cdot 10^{-23}:\\
\;\;\;\;\sinh y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 5.0000000000000002e-23

    1. Initial program 85.3%

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

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

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

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

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

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

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

        \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
      7. lower-neg.f6455.7

        \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
    5. Applied rewrites55.7%

      \[\leadsto \color{blue}{\left(e^{y} - e^{-y}\right) \cdot 0.5} \]
    6. Step-by-step derivation
      1. Applied rewrites77.2%

        \[\leadsto \color{blue}{\sinh y} \]

      if 5.0000000000000002e-23 < x

      1. Initial program 99.9%

        \[\frac{\sin x \cdot \sinh y}{x} \]
      2. Add Preprocessing
    7. Recombined 2 regimes into one program.
    8. Add Preprocessing

    Alternative 2: 87.1% accurate, 0.4× speedup?

    \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := \frac{\sin x\_m \cdot \sinh y}{x\_m}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-7}:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-10}:\\ \;\;\;\;\frac{\sin x\_m}{x\_m} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(e^{y} - \left(1 - y\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
    x_m = (fabs.f64 x)
    (FPCore (x_m y)
     :precision binary64
     (let* ((t_0 (/ (* (sin x_m) (sinh y)) x_m)))
       (if (<= t_0 -5e-7)
         (sinh y)
         (if (<= t_0 5e-10)
           (* (/ (sin x_m) x_m) y)
           (* (- (exp y) (- 1.0 y)) 0.5)))))
    x_m = fabs(x);
    double code(double x_m, double y) {
    	double t_0 = (sin(x_m) * sinh(y)) / x_m;
    	double tmp;
    	if (t_0 <= -5e-7) {
    		tmp = sinh(y);
    	} else if (t_0 <= 5e-10) {
    		tmp = (sin(x_m) / x_m) * y;
    	} else {
    		tmp = (exp(y) - (1.0 - y)) * 0.5;
    	}
    	return tmp;
    }
    
    x_m = abs(x)
    real(8) function code(x_m, y)
        real(8), intent (in) :: x_m
        real(8), intent (in) :: y
        real(8) :: t_0
        real(8) :: tmp
        t_0 = (sin(x_m) * sinh(y)) / x_m
        if (t_0 <= (-5d-7)) then
            tmp = sinh(y)
        else if (t_0 <= 5d-10) then
            tmp = (sin(x_m) / x_m) * y
        else
            tmp = (exp(y) - (1.0d0 - y)) * 0.5d0
        end if
        code = tmp
    end function
    
    x_m = Math.abs(x);
    public static double code(double x_m, double y) {
    	double t_0 = (Math.sin(x_m) * Math.sinh(y)) / x_m;
    	double tmp;
    	if (t_0 <= -5e-7) {
    		tmp = Math.sinh(y);
    	} else if (t_0 <= 5e-10) {
    		tmp = (Math.sin(x_m) / x_m) * y;
    	} else {
    		tmp = (Math.exp(y) - (1.0 - y)) * 0.5;
    	}
    	return tmp;
    }
    
    x_m = math.fabs(x)
    def code(x_m, y):
    	t_0 = (math.sin(x_m) * math.sinh(y)) / x_m
    	tmp = 0
    	if t_0 <= -5e-7:
    		tmp = math.sinh(y)
    	elif t_0 <= 5e-10:
    		tmp = (math.sin(x_m) / x_m) * y
    	else:
    		tmp = (math.exp(y) - (1.0 - y)) * 0.5
    	return tmp
    
    x_m = abs(x)
    function code(x_m, y)
    	t_0 = Float64(Float64(sin(x_m) * sinh(y)) / x_m)
    	tmp = 0.0
    	if (t_0 <= -5e-7)
    		tmp = sinh(y);
    	elseif (t_0 <= 5e-10)
    		tmp = Float64(Float64(sin(x_m) / x_m) * y);
    	else
    		tmp = Float64(Float64(exp(y) - Float64(1.0 - y)) * 0.5);
    	end
    	return tmp
    end
    
    x_m = abs(x);
    function tmp_2 = code(x_m, y)
    	t_0 = (sin(x_m) * sinh(y)) / x_m;
    	tmp = 0.0;
    	if (t_0 <= -5e-7)
    		tmp = sinh(y);
    	elseif (t_0 <= 5e-10)
    		tmp = (sin(x_m) / x_m) * y;
    	else
    		tmp = (exp(y) - (1.0 - y)) * 0.5;
    	end
    	tmp_2 = tmp;
    end
    
    x_m = N[Abs[x], $MachinePrecision]
    code[x$95$m_, y_] := Block[{t$95$0 = N[(N[(N[Sin[x$95$m], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-7], N[Sinh[y], $MachinePrecision], If[LessEqual[t$95$0, 5e-10], N[(N[(N[Sin[x$95$m], $MachinePrecision] / x$95$m), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[Exp[y], $MachinePrecision] - N[(1.0 - y), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]]]
    
    \begin{array}{l}
    x_m = \left|x\right|
    
    \\
    \begin{array}{l}
    t_0 := \frac{\sin x\_m \cdot \sinh y}{x\_m}\\
    \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-7}:\\
    \;\;\;\;\sinh y\\
    
    \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-10}:\\
    \;\;\;\;\frac{\sin x\_m}{x\_m} \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(e^{y} - \left(1 - y\right)\right) \cdot 0.5\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.99999999999999977e-7

      1. Initial program 100.0%

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

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

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

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

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

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

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

          \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
        7. lower-neg.f6474.2

          \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
      5. Applied rewrites74.2%

        \[\leadsto \color{blue}{\left(e^{y} - e^{-y}\right) \cdot 0.5} \]
      6. Step-by-step derivation
        1. Applied rewrites75.0%

          \[\leadsto \color{blue}{\sinh y} \]

        if -4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000031e-10

        1. Initial program 78.1%

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\sin x}{x}} \cdot y \]
          5. lower-sin.f6498.3

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

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

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

        1. Initial program 100.0%

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

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

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

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

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

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

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

            \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
          7. lower-neg.f6483.1

            \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
        5. Applied rewrites83.1%

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

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

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

        Alternative 3: 94.9% accurate, 1.4× speedup?

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

          1. Initial program 85.3%

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

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

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

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

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

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

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

              \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
            7. lower-neg.f6455.7

              \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
          5. Applied rewrites55.7%

            \[\leadsto \color{blue}{\left(e^{y} - e^{-y}\right) \cdot 0.5} \]
          6. Step-by-step derivation
            1. Applied rewrites77.2%

              \[\leadsto \color{blue}{\sinh y} \]

            if 1.32e-21 < x

            1. Initial program 99.9%

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

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

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

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

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

          Alternative 4: 94.1% accurate, 1.4× speedup?

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

            1. Initial program 85.7%

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

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

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

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

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

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

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

                \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
              7. lower-neg.f6455.7

                \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
            5. Applied rewrites55.7%

              \[\leadsto \color{blue}{\left(e^{y} - e^{-y}\right) \cdot 0.5} \]
            6. Step-by-step derivation
              1. Applied rewrites77.8%

                \[\leadsto \color{blue}{\sinh y} \]

              if 9.5000000000000001e-7 < x

              1. Initial program 99.9%

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

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

                \[\leadsto \color{blue}{\frac{\sin x \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)}{x} \cdot y} \]
              5. Step-by-step derivation
                1. Applied rewrites91.0%

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

              Alternative 5: 93.8% accurate, 1.4× speedup?

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

                1. Initial program 85.3%

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

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

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

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

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

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

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

                    \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                  7. lower-neg.f6455.7

                    \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                5. Applied rewrites55.7%

                  \[\leadsto \color{blue}{\left(e^{y} - e^{-y}\right) \cdot 0.5} \]
                6. Step-by-step derivation
                  1. Applied rewrites77.2%

                    \[\leadsto \color{blue}{\sinh y} \]

                  if 2.0000000000000001e-22 < x

                  1. Initial program 99.9%

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

                    \[\leadsto \color{blue}{y \cdot \left({y}^{2} \cdot \left(\frac{1}{120} \cdot \frac{{y}^{2} \cdot \sin x}{x} + \frac{1}{6} \cdot \frac{\sin x}{x}\right) + \frac{\sin x}{x}\right)} \]
                  4. Applied rewrites91.7%

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

                Alternative 6: 91.6% accurate, 1.6× speedup?

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

                  1. Initial program 85.3%

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

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

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

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

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

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

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

                      \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                    7. lower-neg.f6455.7

                      \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                  5. Applied rewrites55.7%

                    \[\leadsto \color{blue}{\left(e^{y} - e^{-y}\right) \cdot 0.5} \]
                  6. Step-by-step derivation
                    1. Applied rewrites77.2%

                      \[\leadsto \color{blue}{\sinh y} \]

                    if 1.32e-21 < x

                    1. Initial program 99.9%

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

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

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

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

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

                      \[\leadsto \frac{\left(\sin x + \frac{1}{6} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot y}{x} \]
                    7. Step-by-step derivation
                      1. Applied rewrites91.2%

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

                    Alternative 7: 88.6% accurate, 1.6× speedup?

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

                      1. Initial program 85.3%

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

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

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

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

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

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

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

                          \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                        7. lower-neg.f6455.7

                          \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                      5. Applied rewrites55.7%

                        \[\leadsto \color{blue}{\left(e^{y} - e^{-y}\right) \cdot 0.5} \]
                      6. Step-by-step derivation
                        1. Applied rewrites77.2%

                          \[\leadsto \color{blue}{\sinh y} \]

                        if 1.2e-21 < x

                        1. Initial program 99.9%

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

                          \[\leadsto \color{blue}{y \cdot \left({y}^{2} \cdot \left(\frac{1}{120} \cdot \frac{{y}^{2} \cdot \sin x}{x} + \frac{1}{6} \cdot \frac{\sin x}{x}\right) + \frac{\sin x}{x}\right)} \]
                        4. Applied rewrites91.7%

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\left(\frac{\sin x}{x} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \frac{\sin x}{x}\right)\right) \cdot y} \]
                          4. Applied rewrites84.5%

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

                        Alternative 8: 70.1% accurate, 2.0× speedup?

                        \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 1.36 \cdot 10^{+93}:\\ \;\;\;\;\sinh y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + y\right) - \mathsf{fma}\left(0.5 \cdot y - 1, y, 1\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                        x_m = (fabs.f64 x)
                        (FPCore (x_m y)
                         :precision binary64
                         (if (<= x_m 1.36e+93)
                           (sinh y)
                           (* (- (+ 1.0 y) (fma (- (* 0.5 y) 1.0) y 1.0)) 0.5)))
                        x_m = fabs(x);
                        double code(double x_m, double y) {
                        	double tmp;
                        	if (x_m <= 1.36e+93) {
                        		tmp = sinh(y);
                        	} else {
                        		tmp = ((1.0 + y) - fma(((0.5 * y) - 1.0), y, 1.0)) * 0.5;
                        	}
                        	return tmp;
                        }
                        
                        x_m = abs(x)
                        function code(x_m, y)
                        	tmp = 0.0
                        	if (x_m <= 1.36e+93)
                        		tmp = sinh(y);
                        	else
                        		tmp = Float64(Float64(Float64(1.0 + y) - fma(Float64(Float64(0.5 * y) - 1.0), y, 1.0)) * 0.5);
                        	end
                        	return tmp
                        end
                        
                        x_m = N[Abs[x], $MachinePrecision]
                        code[x$95$m_, y_] := If[LessEqual[x$95$m, 1.36e+93], N[Sinh[y], $MachinePrecision], N[(N[(N[(1.0 + y), $MachinePrecision] - N[(N[(N[(0.5 * y), $MachinePrecision] - 1.0), $MachinePrecision] * y + 1.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                        
                        \begin{array}{l}
                        x_m = \left|x\right|
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x\_m \leq 1.36 \cdot 10^{+93}:\\
                        \;\;\;\;\sinh y\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(\left(1 + y\right) - \mathsf{fma}\left(0.5 \cdot y - 1, y, 1\right)\right) \cdot 0.5\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x < 1.3599999999999999e93

                          1. Initial program 87.1%

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

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

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

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

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

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

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

                              \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                            7. lower-neg.f6454.3

                              \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                          5. Applied rewrites54.3%

                            \[\leadsto \color{blue}{\left(e^{y} - e^{-y}\right) \cdot 0.5} \]
                          6. Step-by-step derivation
                            1. Applied rewrites73.8%

                              \[\leadsto \color{blue}{\sinh y} \]

                            if 1.3599999999999999e93 < x

                            1. Initial program 100.0%

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

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

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

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

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

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

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

                                \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                              7. lower-neg.f6460.6

                                \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                            5. Applied rewrites60.6%

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

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

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

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

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

                              Alternative 9: 66.2% accurate, 4.3× speedup?

                              \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 1.36 \cdot 10^{+93}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0003968253968253968, y \cdot y, 0.016666666666666666\right), y \cdot y, 0.3333333333333333\right), y \cdot y, 2\right) \cdot y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + y\right) - \mathsf{fma}\left(0.5 \cdot y - 1, y, 1\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                              x_m = (fabs.f64 x)
                              (FPCore (x_m y)
                               :precision binary64
                               (if (<= x_m 1.36e+93)
                                 (*
                                  (*
                                   (fma
                                    (fma
                                     (fma 0.0003968253968253968 (* y y) 0.016666666666666666)
                                     (* y y)
                                     0.3333333333333333)
                                    (* y y)
                                    2.0)
                                   y)
                                  0.5)
                                 (* (- (+ 1.0 y) (fma (- (* 0.5 y) 1.0) y 1.0)) 0.5)))
                              x_m = fabs(x);
                              double code(double x_m, double y) {
                              	double tmp;
                              	if (x_m <= 1.36e+93) {
                              		tmp = (fma(fma(fma(0.0003968253968253968, (y * y), 0.016666666666666666), (y * y), 0.3333333333333333), (y * y), 2.0) * y) * 0.5;
                              	} else {
                              		tmp = ((1.0 + y) - fma(((0.5 * y) - 1.0), y, 1.0)) * 0.5;
                              	}
                              	return tmp;
                              }
                              
                              x_m = abs(x)
                              function code(x_m, y)
                              	tmp = 0.0
                              	if (x_m <= 1.36e+93)
                              		tmp = Float64(Float64(fma(fma(fma(0.0003968253968253968, Float64(y * y), 0.016666666666666666), Float64(y * y), 0.3333333333333333), Float64(y * y), 2.0) * y) * 0.5);
                              	else
                              		tmp = Float64(Float64(Float64(1.0 + y) - fma(Float64(Float64(0.5 * y) - 1.0), y, 1.0)) * 0.5);
                              	end
                              	return tmp
                              end
                              
                              x_m = N[Abs[x], $MachinePrecision]
                              code[x$95$m_, y_] := If[LessEqual[x$95$m, 1.36e+93], N[(N[(N[(N[(N[(0.0003968253968253968 * N[(y * y), $MachinePrecision] + 0.016666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 2.0), $MachinePrecision] * y), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[(1.0 + y), $MachinePrecision] - N[(N[(N[(0.5 * y), $MachinePrecision] - 1.0), $MachinePrecision] * y + 1.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                              
                              \begin{array}{l}
                              x_m = \left|x\right|
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;x\_m \leq 1.36 \cdot 10^{+93}:\\
                              \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0003968253968253968, y \cdot y, 0.016666666666666666\right), y \cdot y, 0.3333333333333333\right), y \cdot y, 2\right) \cdot y\right) \cdot 0.5\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\left(1 + y\right) - \mathsf{fma}\left(0.5 \cdot y - 1, y, 1\right)\right) \cdot 0.5\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x < 1.3599999999999999e93

                                1. Initial program 87.1%

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

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

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

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

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

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

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

                                    \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                  7. lower-neg.f6454.3

                                    \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                5. Applied rewrites54.3%

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

                                  \[\leadsto \left(y \cdot \left(2 + {y}^{2} \cdot \left(\frac{1}{3} + {y}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {y}^{2}\right)\right)\right)\right) \cdot \frac{1}{2} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites68.9%

                                    \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0003968253968253968, y \cdot y, 0.016666666666666666\right), y \cdot y, 0.3333333333333333\right), y \cdot y, 2\right) \cdot y\right) \cdot 0.5 \]

                                  if 1.3599999999999999e93 < x

                                  1. Initial program 100.0%

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

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

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

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

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

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

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

                                      \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                    7. lower-neg.f6460.6

                                      \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                  5. Applied rewrites60.6%

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

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

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

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

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

                                    Alternative 10: 64.6% accurate, 6.4× speedup?

                                    \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 1.36 \cdot 10^{+93}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + y\right) - \mathsf{fma}\left(0.5 \cdot y - 1, y, 1\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                                    x_m = (fabs.f64 x)
                                    (FPCore (x_m y)
                                     :precision binary64
                                     (if (<= x_m 1.36e+93)
                                       (*
                                        (fma (fma 0.008333333333333333 (* y y) 0.16666666666666666) (* y y) 1.0)
                                        y)
                                       (* (- (+ 1.0 y) (fma (- (* 0.5 y) 1.0) y 1.0)) 0.5)))
                                    x_m = fabs(x);
                                    double code(double x_m, double y) {
                                    	double tmp;
                                    	if (x_m <= 1.36e+93) {
                                    		tmp = fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0) * y;
                                    	} else {
                                    		tmp = ((1.0 + y) - fma(((0.5 * y) - 1.0), y, 1.0)) * 0.5;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    x_m = abs(x)
                                    function code(x_m, y)
                                    	tmp = 0.0
                                    	if (x_m <= 1.36e+93)
                                    		tmp = Float64(fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * y);
                                    	else
                                    		tmp = Float64(Float64(Float64(1.0 + y) - fma(Float64(Float64(0.5 * y) - 1.0), y, 1.0)) * 0.5);
                                    	end
                                    	return tmp
                                    end
                                    
                                    x_m = N[Abs[x], $MachinePrecision]
                                    code[x$95$m_, y_] := If[LessEqual[x$95$m, 1.36e+93], N[(N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(1.0 + y), $MachinePrecision] - N[(N[(N[(0.5 * y), $MachinePrecision] - 1.0), $MachinePrecision] * y + 1.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    x_m = \left|x\right|
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;x\_m \leq 1.36 \cdot 10^{+93}:\\
                                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\left(\left(1 + y\right) - \mathsf{fma}\left(0.5 \cdot y - 1, y, 1\right)\right) \cdot 0.5\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if x < 1.3599999999999999e93

                                      1. Initial program 87.1%

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

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

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

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

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

                                        if 1.3599999999999999e93 < x

                                        1. Initial program 100.0%

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

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

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

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

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

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

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

                                            \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                          7. lower-neg.f6460.6

                                            \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                        5. Applied rewrites60.6%

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

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

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

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

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

                                          Alternative 11: 61.4% accurate, 6.8× speedup?

                                          \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 5.1 \cdot 10^{+46}:\\ \;\;\;\;\left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + y\right) - \mathsf{fma}\left(0.5 \cdot y - 1, y, 1\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                                          x_m = (fabs.f64 x)
                                          (FPCore (x_m y)
                                           :precision binary64
                                           (if (<= x_m 5.1e+46)
                                             (* (* (fma 0.3333333333333333 (* y y) 2.0) y) 0.5)
                                             (* (- (+ 1.0 y) (fma (- (* 0.5 y) 1.0) y 1.0)) 0.5)))
                                          x_m = fabs(x);
                                          double code(double x_m, double y) {
                                          	double tmp;
                                          	if (x_m <= 5.1e+46) {
                                          		tmp = (fma(0.3333333333333333, (y * y), 2.0) * y) * 0.5;
                                          	} else {
                                          		tmp = ((1.0 + y) - fma(((0.5 * y) - 1.0), y, 1.0)) * 0.5;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          x_m = abs(x)
                                          function code(x_m, y)
                                          	tmp = 0.0
                                          	if (x_m <= 5.1e+46)
                                          		tmp = Float64(Float64(fma(0.3333333333333333, Float64(y * y), 2.0) * y) * 0.5);
                                          	else
                                          		tmp = Float64(Float64(Float64(1.0 + y) - fma(Float64(Float64(0.5 * y) - 1.0), y, 1.0)) * 0.5);
                                          	end
                                          	return tmp
                                          end
                                          
                                          x_m = N[Abs[x], $MachinePrecision]
                                          code[x$95$m_, y_] := If[LessEqual[x$95$m, 5.1e+46], N[(N[(N[(0.3333333333333333 * N[(y * y), $MachinePrecision] + 2.0), $MachinePrecision] * y), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[(1.0 + y), $MachinePrecision] - N[(N[(N[(0.5 * y), $MachinePrecision] - 1.0), $MachinePrecision] * y + 1.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          x_m = \left|x\right|
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;x\_m \leq 5.1 \cdot 10^{+46}:\\
                                          \;\;\;\;\left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot 0.5\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\left(\left(1 + y\right) - \mathsf{fma}\left(0.5 \cdot y - 1, y, 1\right)\right) \cdot 0.5\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if x < 5.0999999999999997e46

                                            1. Initial program 86.4%

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

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

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

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

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

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

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

                                                \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                              7. lower-neg.f6454.5

                                                \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                            5. Applied rewrites54.5%

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

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

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

                                              if 5.0999999999999997e46 < x

                                              1. Initial program 99.9%

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

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

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

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

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

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

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

                                                  \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                                7. lower-neg.f6458.5

                                                  \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                              5. Applied rewrites58.5%

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

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

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

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

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

                                                Alternative 12: 60.9% accurate, 7.2× speedup?

                                                \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 240000:\\ \;\;\;\;\left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.5, y, 1\right), y, 1\right) - \left(1 - y\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                                                x_m = (fabs.f64 x)
                                                (FPCore (x_m y)
                                                 :precision binary64
                                                 (if (<= x_m 240000.0)
                                                   (* (* (fma 0.3333333333333333 (* y y) 2.0) y) 0.5)
                                                   (* (- (fma (fma 0.5 y 1.0) y 1.0) (- 1.0 y)) 0.5)))
                                                x_m = fabs(x);
                                                double code(double x_m, double y) {
                                                	double tmp;
                                                	if (x_m <= 240000.0) {
                                                		tmp = (fma(0.3333333333333333, (y * y), 2.0) * y) * 0.5;
                                                	} else {
                                                		tmp = (fma(fma(0.5, y, 1.0), y, 1.0) - (1.0 - y)) * 0.5;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                x_m = abs(x)
                                                function code(x_m, y)
                                                	tmp = 0.0
                                                	if (x_m <= 240000.0)
                                                		tmp = Float64(Float64(fma(0.3333333333333333, Float64(y * y), 2.0) * y) * 0.5);
                                                	else
                                                		tmp = Float64(Float64(fma(fma(0.5, y, 1.0), y, 1.0) - Float64(1.0 - y)) * 0.5);
                                                	end
                                                	return tmp
                                                end
                                                
                                                x_m = N[Abs[x], $MachinePrecision]
                                                code[x$95$m_, y_] := If[LessEqual[x$95$m, 240000.0], N[(N[(N[(0.3333333333333333 * N[(y * y), $MachinePrecision] + 2.0), $MachinePrecision] * y), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[(N[(0.5 * y + 1.0), $MachinePrecision] * y + 1.0), $MachinePrecision] - N[(1.0 - y), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                x_m = \left|x\right|
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;x\_m \leq 240000:\\
                                                \;\;\;\;\left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot 0.5\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.5, y, 1\right), y, 1\right) - \left(1 - y\right)\right) \cdot 0.5\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if x < 2.4e5

                                                  1. Initial program 85.8%

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

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

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

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

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

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

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

                                                      \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                                    7. lower-neg.f6455.4

                                                      \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                                  5. Applied rewrites55.4%

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

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

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

                                                    if 2.4e5 < x

                                                    1. Initial program 99.9%

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

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

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

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

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

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

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

                                                        \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                                      7. lower-neg.f6455.3

                                                        \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                                    5. Applied rewrites55.3%

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

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

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

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

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

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

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

                                                        Alternative 13: 56.3% accurate, 7.7× speedup?

                                                        \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 3.05 \cdot 10^{+109}:\\ \;\;\;\;\left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + y\right) - \left(1 - y\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                                                        x_m = (fabs.f64 x)
                                                        (FPCore (x_m y)
                                                         :precision binary64
                                                         (if (<= x_m 3.05e+109)
                                                           (* (* (fma 0.3333333333333333 (* y y) 2.0) y) 0.5)
                                                           (* (- (+ 1.0 y) (- 1.0 y)) 0.5)))
                                                        x_m = fabs(x);
                                                        double code(double x_m, double y) {
                                                        	double tmp;
                                                        	if (x_m <= 3.05e+109) {
                                                        		tmp = (fma(0.3333333333333333, (y * y), 2.0) * y) * 0.5;
                                                        	} else {
                                                        		tmp = ((1.0 + y) - (1.0 - y)) * 0.5;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        x_m = abs(x)
                                                        function code(x_m, y)
                                                        	tmp = 0.0
                                                        	if (x_m <= 3.05e+109)
                                                        		tmp = Float64(Float64(fma(0.3333333333333333, Float64(y * y), 2.0) * y) * 0.5);
                                                        	else
                                                        		tmp = Float64(Float64(Float64(1.0 + y) - Float64(1.0 - y)) * 0.5);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        x_m = N[Abs[x], $MachinePrecision]
                                                        code[x$95$m_, y_] := If[LessEqual[x$95$m, 3.05e+109], N[(N[(N[(0.3333333333333333 * N[(y * y), $MachinePrecision] + 2.0), $MachinePrecision] * y), $MachinePrecision] * 0.5), $MachinePrecision], N[(N[(N[(1.0 + y), $MachinePrecision] - N[(1.0 - y), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        x_m = \left|x\right|
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;x\_m \leq 3.05 \cdot 10^{+109}:\\
                                                        \;\;\;\;\left(\mathsf{fma}\left(0.3333333333333333, y \cdot y, 2\right) \cdot y\right) \cdot 0.5\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\left(\left(1 + y\right) - \left(1 - y\right)\right) \cdot 0.5\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if x < 3.05000000000000004e109

                                                          1. Initial program 87.2%

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

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

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

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

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

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

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

                                                              \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                                            7. lower-neg.f6453.8

                                                              \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                                          5. Applied rewrites53.8%

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

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

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

                                                            if 3.05000000000000004e109 < x

                                                            1. Initial program 100.0%

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

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

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

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

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

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

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

                                                                \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                                              7. lower-neg.f6463.3

                                                                \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                                            5. Applied rewrites63.3%

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

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

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

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

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

                                                              Alternative 14: 39.5% accurate, 9.4× speedup?

                                                              \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 7.5 \cdot 10^{+50}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot -0.16666666666666666, x\_m \cdot x\_m, y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + y\right) - \left(1 - y\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                                                              x_m = (fabs.f64 x)
                                                              (FPCore (x_m y)
                                                               :precision binary64
                                                               (if (<= x_m 7.5e+50)
                                                                 (fma (* y -0.16666666666666666) (* x_m x_m) y)
                                                                 (* (- (+ 1.0 y) (- 1.0 y)) 0.5)))
                                                              x_m = fabs(x);
                                                              double code(double x_m, double y) {
                                                              	double tmp;
                                                              	if (x_m <= 7.5e+50) {
                                                              		tmp = fma((y * -0.16666666666666666), (x_m * x_m), y);
                                                              	} else {
                                                              		tmp = ((1.0 + y) - (1.0 - y)) * 0.5;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              x_m = abs(x)
                                                              function code(x_m, y)
                                                              	tmp = 0.0
                                                              	if (x_m <= 7.5e+50)
                                                              		tmp = fma(Float64(y * -0.16666666666666666), Float64(x_m * x_m), y);
                                                              	else
                                                              		tmp = Float64(Float64(Float64(1.0 + y) - Float64(1.0 - y)) * 0.5);
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              x_m = N[Abs[x], $MachinePrecision]
                                                              code[x$95$m_, y_] := If[LessEqual[x$95$m, 7.5e+50], N[(N[(y * -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + y), $MachinePrecision], N[(N[(N[(1.0 + y), $MachinePrecision] - N[(1.0 - y), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              x_m = \left|x\right|
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;x\_m \leq 7.5 \cdot 10^{+50}:\\
                                                              \;\;\;\;\mathsf{fma}\left(y \cdot -0.16666666666666666, x\_m \cdot x\_m, y\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\left(\left(1 + y\right) - \left(1 - y\right)\right) \cdot 0.5\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if x < 7.4999999999999999e50

                                                                1. Initial program 86.4%

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

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

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

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

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

                                                                    \[\leadsto \color{blue}{\frac{\sin x}{x}} \cdot y \]
                                                                  5. lower-sin.f6450.4

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

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

                                                                  \[\leadsto y + \color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot y + \frac{1}{120} \cdot \left({x}^{2} \cdot y\right)\right)} \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites40.8%

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

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

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

                                                                    if 7.4999999999999999e50 < x

                                                                    1. Initial program 99.9%

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

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

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

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

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

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

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

                                                                        \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                                                      7. lower-neg.f6459.6

                                                                        \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                                                    5. Applied rewrites59.6%

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

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

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

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

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

                                                                      Alternative 15: 39.5% accurate, 10.3× speedup?

                                                                      \[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} \mathbf{if}\;x\_m \leq 240000:\\ \;\;\;\;1 \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + y\right) - \left(1 - y\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                                                                      x_m = (fabs.f64 x)
                                                                      (FPCore (x_m y)
                                                                       :precision binary64
                                                                       (if (<= x_m 240000.0) (* 1.0 y) (* (- (+ 1.0 y) (- 1.0 y)) 0.5)))
                                                                      x_m = fabs(x);
                                                                      double code(double x_m, double y) {
                                                                      	double tmp;
                                                                      	if (x_m <= 240000.0) {
                                                                      		tmp = 1.0 * y;
                                                                      	} else {
                                                                      		tmp = ((1.0 + y) - (1.0 - y)) * 0.5;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      x_m = abs(x)
                                                                      real(8) function code(x_m, y)
                                                                          real(8), intent (in) :: x_m
                                                                          real(8), intent (in) :: y
                                                                          real(8) :: tmp
                                                                          if (x_m <= 240000.0d0) then
                                                                              tmp = 1.0d0 * y
                                                                          else
                                                                              tmp = ((1.0d0 + y) - (1.0d0 - y)) * 0.5d0
                                                                          end if
                                                                          code = tmp
                                                                      end function
                                                                      
                                                                      x_m = Math.abs(x);
                                                                      public static double code(double x_m, double y) {
                                                                      	double tmp;
                                                                      	if (x_m <= 240000.0) {
                                                                      		tmp = 1.0 * y;
                                                                      	} else {
                                                                      		tmp = ((1.0 + y) - (1.0 - y)) * 0.5;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      x_m = math.fabs(x)
                                                                      def code(x_m, y):
                                                                      	tmp = 0
                                                                      	if x_m <= 240000.0:
                                                                      		tmp = 1.0 * y
                                                                      	else:
                                                                      		tmp = ((1.0 + y) - (1.0 - y)) * 0.5
                                                                      	return tmp
                                                                      
                                                                      x_m = abs(x)
                                                                      function code(x_m, y)
                                                                      	tmp = 0.0
                                                                      	if (x_m <= 240000.0)
                                                                      		tmp = Float64(1.0 * y);
                                                                      	else
                                                                      		tmp = Float64(Float64(Float64(1.0 + y) - Float64(1.0 - y)) * 0.5);
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      x_m = abs(x);
                                                                      function tmp_2 = code(x_m, y)
                                                                      	tmp = 0.0;
                                                                      	if (x_m <= 240000.0)
                                                                      		tmp = 1.0 * y;
                                                                      	else
                                                                      		tmp = ((1.0 + y) - (1.0 - y)) * 0.5;
                                                                      	end
                                                                      	tmp_2 = tmp;
                                                                      end
                                                                      
                                                                      x_m = N[Abs[x], $MachinePrecision]
                                                                      code[x$95$m_, y_] := If[LessEqual[x$95$m, 240000.0], N[(1.0 * y), $MachinePrecision], N[(N[(N[(1.0 + y), $MachinePrecision] - N[(1.0 - y), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                                                                      
                                                                      \begin{array}{l}
                                                                      x_m = \left|x\right|
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      \mathbf{if}\;x\_m \leq 240000:\\
                                                                      \;\;\;\;1 \cdot y\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\left(\left(1 + y\right) - \left(1 - y\right)\right) \cdot 0.5\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 2 regimes
                                                                      2. if x < 2.4e5

                                                                        1. Initial program 85.8%

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

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

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

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

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

                                                                            \[\leadsto \color{blue}{\frac{\sin x}{x}} \cdot y \]
                                                                          5. lower-sin.f6450.5

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

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

                                                                          \[\leadsto 1 \cdot y \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites35.1%

                                                                            \[\leadsto 1 \cdot y \]

                                                                          if 2.4e5 < x

                                                                          1. Initial program 99.9%

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

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

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

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

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

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

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

                                                                              \[\leadsto \left(e^{y} - \color{blue}{e^{\mathsf{neg}\left(y\right)}}\right) \cdot \frac{1}{2} \]
                                                                            7. lower-neg.f6455.3

                                                                              \[\leadsto \left(e^{y} - e^{\color{blue}{-y}}\right) \cdot 0.5 \]
                                                                          5. Applied rewrites55.3%

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

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

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

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

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

                                                                            Alternative 16: 27.9% accurate, 36.2× speedup?

                                                                            \[\begin{array}{l} x_m = \left|x\right| \\ 1 \cdot y \end{array} \]
                                                                            x_m = (fabs.f64 x)
                                                                            (FPCore (x_m y) :precision binary64 (* 1.0 y))
                                                                            x_m = fabs(x);
                                                                            double code(double x_m, double y) {
                                                                            	return 1.0 * y;
                                                                            }
                                                                            
                                                                            x_m = abs(x)
                                                                            real(8) function code(x_m, y)
                                                                                real(8), intent (in) :: x_m
                                                                                real(8), intent (in) :: y
                                                                                code = 1.0d0 * y
                                                                            end function
                                                                            
                                                                            x_m = Math.abs(x);
                                                                            public static double code(double x_m, double y) {
                                                                            	return 1.0 * y;
                                                                            }
                                                                            
                                                                            x_m = math.fabs(x)
                                                                            def code(x_m, y):
                                                                            	return 1.0 * y
                                                                            
                                                                            x_m = abs(x)
                                                                            function code(x_m, y)
                                                                            	return Float64(1.0 * y)
                                                                            end
                                                                            
                                                                            x_m = abs(x);
                                                                            function tmp = code(x_m, y)
                                                                            	tmp = 1.0 * y;
                                                                            end
                                                                            
                                                                            x_m = N[Abs[x], $MachinePrecision]
                                                                            code[x$95$m_, y_] := N[(1.0 * y), $MachinePrecision]
                                                                            
                                                                            \begin{array}{l}
                                                                            x_m = \left|x\right|
                                                                            
                                                                            \\
                                                                            1 \cdot y
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Initial program 89.3%

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

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

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

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

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

                                                                                \[\leadsto \color{blue}{\frac{\sin x}{x}} \cdot y \]
                                                                              5. lower-sin.f6451.0

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

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

                                                                              \[\leadsto 1 \cdot y \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites27.5%

                                                                                \[\leadsto 1 \cdot y \]
                                                                              2. Add Preprocessing

                                                                              Developer Target 1: 99.8% accurate, 1.0× speedup?

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

                                                                              Reproduce

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