Linear.Quaternion:$ccos from linear-1.19.1.3

Percentage Accurate: 100.0% → 100.0%
Time: 8.2s
Alternatives: 12
Speedup: 1.0×

Specification

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

\\
\sin x \cdot \frac{\sinh y}{y}
\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 12 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: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

    \[\sin x \cdot \frac{\sinh y}{y} \]
  2. Final simplification100.0%

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

Alternative 2: 81.6% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\\ t_1 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+150}:\\ \;\;\;\;\sin x \cdot t_1\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{+85}:\\ \;\;\;\;\frac{x \cdot \left({y}^{4} \cdot \left(x \cdot 0.027777777777777776\right) - x\right)}{t_0 - x}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{+58}:\\ \;\;\;\;\left|t_0\right|\\ \mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 200000000000\right) \land y \leq 2.5 \cdot 10^{+150}:\\ \;\;\;\;\left(y \cdot y\right) \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \left(t_1 + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* y (* 0.16666666666666666 (* x y))))
        (t_1 (* 0.16666666666666666 (* y y))))
   (if (<= y -6.5e+150)
     (* (sin x) t_1)
     (if (<= y -3.5e+85)
       (/ (* x (- (* (pow y 4.0) (* x 0.027777777777777776)) x)) (- t_0 x))
       (if (<= y -7.8e+58)
         (fabs t_0)
         (if (or (<= y -90000000.0)
                 (and (not (<= y 200000000000.0)) (<= y 2.5e+150)))
           (*
            (* y y)
            (+
             (* x 0.16666666666666666)
             (* (pow x 3.0) -0.027777777777777776)))
           (* (sin x) (+ t_1 1.0))))))))
double code(double x, double y) {
	double t_0 = y * (0.16666666666666666 * (x * y));
	double t_1 = 0.16666666666666666 * (y * y);
	double tmp;
	if (y <= -6.5e+150) {
		tmp = sin(x) * t_1;
	} else if (y <= -3.5e+85) {
		tmp = (x * ((pow(y, 4.0) * (x * 0.027777777777777776)) - x)) / (t_0 - x);
	} else if (y <= -7.8e+58) {
		tmp = fabs(t_0);
	} else if ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 2.5e+150))) {
		tmp = (y * y) * ((x * 0.16666666666666666) + (pow(x, 3.0) * -0.027777777777777776));
	} else {
		tmp = sin(x) * (t_1 + 1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = y * (0.16666666666666666d0 * (x * y))
    t_1 = 0.16666666666666666d0 * (y * y)
    if (y <= (-6.5d+150)) then
        tmp = sin(x) * t_1
    else if (y <= (-3.5d+85)) then
        tmp = (x * (((y ** 4.0d0) * (x * 0.027777777777777776d0)) - x)) / (t_0 - x)
    else if (y <= (-7.8d+58)) then
        tmp = abs(t_0)
    else if ((y <= (-90000000.0d0)) .or. (.not. (y <= 200000000000.0d0)) .and. (y <= 2.5d+150)) then
        tmp = (y * y) * ((x * 0.16666666666666666d0) + ((x ** 3.0d0) * (-0.027777777777777776d0)))
    else
        tmp = sin(x) * (t_1 + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = y * (0.16666666666666666 * (x * y));
	double t_1 = 0.16666666666666666 * (y * y);
	double tmp;
	if (y <= -6.5e+150) {
		tmp = Math.sin(x) * t_1;
	} else if (y <= -3.5e+85) {
		tmp = (x * ((Math.pow(y, 4.0) * (x * 0.027777777777777776)) - x)) / (t_0 - x);
	} else if (y <= -7.8e+58) {
		tmp = Math.abs(t_0);
	} else if ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 2.5e+150))) {
		tmp = (y * y) * ((x * 0.16666666666666666) + (Math.pow(x, 3.0) * -0.027777777777777776));
	} else {
		tmp = Math.sin(x) * (t_1 + 1.0);
	}
	return tmp;
}
def code(x, y):
	t_0 = y * (0.16666666666666666 * (x * y))
	t_1 = 0.16666666666666666 * (y * y)
	tmp = 0
	if y <= -6.5e+150:
		tmp = math.sin(x) * t_1
	elif y <= -3.5e+85:
		tmp = (x * ((math.pow(y, 4.0) * (x * 0.027777777777777776)) - x)) / (t_0 - x)
	elif y <= -7.8e+58:
		tmp = math.fabs(t_0)
	elif (y <= -90000000.0) or (not (y <= 200000000000.0) and (y <= 2.5e+150)):
		tmp = (y * y) * ((x * 0.16666666666666666) + (math.pow(x, 3.0) * -0.027777777777777776))
	else:
		tmp = math.sin(x) * (t_1 + 1.0)
	return tmp
function code(x, y)
	t_0 = Float64(y * Float64(0.16666666666666666 * Float64(x * y)))
	t_1 = Float64(0.16666666666666666 * Float64(y * y))
	tmp = 0.0
	if (y <= -6.5e+150)
		tmp = Float64(sin(x) * t_1);
	elseif (y <= -3.5e+85)
		tmp = Float64(Float64(x * Float64(Float64((y ^ 4.0) * Float64(x * 0.027777777777777776)) - x)) / Float64(t_0 - x));
	elseif (y <= -7.8e+58)
		tmp = abs(t_0);
	elseif ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 2.5e+150)))
		tmp = Float64(Float64(y * y) * Float64(Float64(x * 0.16666666666666666) + Float64((x ^ 3.0) * -0.027777777777777776)));
	else
		tmp = Float64(sin(x) * Float64(t_1 + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = y * (0.16666666666666666 * (x * y));
	t_1 = 0.16666666666666666 * (y * y);
	tmp = 0.0;
	if (y <= -6.5e+150)
		tmp = sin(x) * t_1;
	elseif (y <= -3.5e+85)
		tmp = (x * (((y ^ 4.0) * (x * 0.027777777777777776)) - x)) / (t_0 - x);
	elseif (y <= -7.8e+58)
		tmp = abs(t_0);
	elseif ((y <= -90000000.0) || (~((y <= 200000000000.0)) && (y <= 2.5e+150)))
		tmp = (y * y) * ((x * 0.16666666666666666) + ((x ^ 3.0) * -0.027777777777777776));
	else
		tmp = sin(x) * (t_1 + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(0.16666666666666666 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+150], N[(N[Sin[x], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y, -3.5e+85], N[(N[(x * N[(N[(N[Power[y, 4.0], $MachinePrecision] * N[(x * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.8e+58], N[Abs[t$95$0], $MachinePrecision], If[Or[LessEqual[y, -90000000.0], And[N[Not[LessEqual[y, 200000000000.0]], $MachinePrecision], LessEqual[y, 2.5e+150]]], N[(N[(y * y), $MachinePrecision] * N[(N[(x * 0.16666666666666666), $MachinePrecision] + N[(N[Power[x, 3.0], $MachinePrecision] * -0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\\
t_1 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+150}:\\
\;\;\;\;\sin x \cdot t_1\\

\mathbf{elif}\;y \leq -3.5 \cdot 10^{+85}:\\
\;\;\;\;\frac{x \cdot \left({y}^{4} \cdot \left(x \cdot 0.027777777777777776\right) - x\right)}{t_0 - x}\\

\mathbf{elif}\;y \leq -7.8 \cdot 10^{+58}:\\
\;\;\;\;\left|t_0\right|\\

\mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 200000000000\right) \land y \leq 2.5 \cdot 10^{+150}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)\\

\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(t_1 + 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.50000000000000033e150

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow296.9%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified96.9%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 96.9%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow296.9%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*r*96.9%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \sin x} \]
      3. *-commutative96.9%

        \[\leadsto \color{blue}{\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    7. Simplified96.9%

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

    if -6.50000000000000033e150 < y < -3.50000000000000005e85

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow25.4%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified5.4%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in x around 0 8.8%

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

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2} + 1\right)} \cdot x \]
      2. unpow28.8%

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
      3. fma-udef8.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
    7. Simplified8.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative8.8%

        \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \]
      2. fma-udef8.8%

        \[\leadsto x \cdot \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)} \]
      3. distribute-rgt-in8.8%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + 1 \cdot x} \]
      4. *-un-lft-identity8.8%

        \[\leadsto \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + \color{blue}{x} \]
    9. Applied egg-rr8.8%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + x} \]
    10. Step-by-step derivation
      1. flip-+29.3%

        \[\leadsto \color{blue}{\frac{\left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right) \cdot \left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right) - x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x}} \]
      2. div-sub29.3%

        \[\leadsto \color{blue}{\frac{\left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right) \cdot \left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right)}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x}} \]
      3. swap-sqr50.0%

        \[\leadsto \frac{\color{blue}{\left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)}}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} \]
      4. swap-sqr50.0%

        \[\leadsto \frac{\color{blue}{\left(\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right)} \cdot \left(x \cdot x\right)}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} \]
      5. metadata-eval50.0%

        \[\leadsto \frac{\left(\color{blue}{0.027777777777777776} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} \]
      6. pow250.0%

        \[\leadsto \frac{\left(0.027777777777777776 \cdot \left(\color{blue}{{y}^{2}} \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} \]
      7. pow250.0%

        \[\leadsto \frac{\left(0.027777777777777776 \cdot \left({y}^{2} \cdot \color{blue}{{y}^{2}}\right)\right) \cdot \left(x \cdot x\right)}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} \]
      8. pow-prod-up50.0%

        \[\leadsto \frac{\left(0.027777777777777776 \cdot \color{blue}{{y}^{\left(2 + 2\right)}}\right) \cdot \left(x \cdot x\right)}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} \]
      9. metadata-eval50.0%

        \[\leadsto \frac{\left(0.027777777777777776 \cdot {y}^{\color{blue}{4}}\right) \cdot \left(x \cdot x\right)}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} \]
      10. fma-neg50.0%

        \[\leadsto \frac{\left(0.027777777777777776 \cdot {y}^{4}\right) \cdot \left(x \cdot x\right)}{\color{blue}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)}} - \frac{x \cdot x}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x} \]
      11. fma-neg50.0%

        \[\leadsto \frac{\left(0.027777777777777776 \cdot {y}^{4}\right) \cdot \left(x \cdot x\right)}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)} - \frac{x \cdot x}{\color{blue}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)}} \]
    11. Applied egg-rr50.0%

      \[\leadsto \color{blue}{\frac{\left(0.027777777777777776 \cdot {y}^{4}\right) \cdot \left(x \cdot x\right)}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)} - \frac{x \cdot x}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)}} \]
    12. Step-by-step derivation
      1. div-sub50.0%

        \[\leadsto \color{blue}{\frac{\left(0.027777777777777776 \cdot {y}^{4}\right) \cdot \left(x \cdot x\right) - x \cdot x}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)}} \]
      2. associate-*r*66.7%

        \[\leadsto \frac{\color{blue}{\left(\left(0.027777777777777776 \cdot {y}^{4}\right) \cdot x\right) \cdot x} - x \cdot x}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)} \]
      3. distribute-rgt-out--66.7%

        \[\leadsto \frac{\color{blue}{x \cdot \left(\left(0.027777777777777776 \cdot {y}^{4}\right) \cdot x - x\right)}}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)} \]
      4. *-commutative66.7%

        \[\leadsto \frac{x \cdot \left(\color{blue}{\left({y}^{4} \cdot 0.027777777777777776\right)} \cdot x - x\right)}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)} \]
      5. associate-*l*66.7%

        \[\leadsto \frac{x \cdot \left(\color{blue}{{y}^{4} \cdot \left(0.027777777777777776 \cdot x\right)} - x\right)}{\mathsf{fma}\left(0.16666666666666666 \cdot \left(y \cdot y\right), x, -x\right)} \]
      6. fma-neg66.7%

        \[\leadsto \frac{x \cdot \left({y}^{4} \cdot \left(0.027777777777777776 \cdot x\right) - x\right)}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x - x}} \]
      7. associate-*r*66.7%

        \[\leadsto \frac{x \cdot \left({y}^{4} \cdot \left(0.027777777777777776 \cdot x\right) - x\right)}{\color{blue}{\left(\left(0.16666666666666666 \cdot y\right) \cdot y\right)} \cdot x - x} \]
      8. associate-*r*66.7%

        \[\leadsto \frac{x \cdot \left({y}^{4} \cdot \left(0.027777777777777776 \cdot x\right) - x\right)}{\color{blue}{\left(0.16666666666666666 \cdot y\right) \cdot \left(y \cdot x\right)} - x} \]
      9. associate-*r*66.7%

        \[\leadsto \frac{x \cdot \left({y}^{4} \cdot \left(0.027777777777777776 \cdot x\right) - x\right)}{\color{blue}{0.16666666666666666 \cdot \left(y \cdot \left(y \cdot x\right)\right)} - x} \]
      10. associate-*r*66.7%

        \[\leadsto \frac{x \cdot \left({y}^{4} \cdot \left(0.027777777777777776 \cdot x\right) - x\right)}{\color{blue}{\left(0.16666666666666666 \cdot y\right) \cdot \left(y \cdot x\right)} - x} \]
      11. *-commutative66.7%

        \[\leadsto \frac{x \cdot \left({y}^{4} \cdot \left(0.027777777777777776 \cdot x\right) - x\right)}{\color{blue}{\left(y \cdot 0.16666666666666666\right)} \cdot \left(y \cdot x\right) - x} \]
      12. associate-*l*66.7%

        \[\leadsto \frac{x \cdot \left({y}^{4} \cdot \left(0.027777777777777776 \cdot x\right) - x\right)}{\color{blue}{y \cdot \left(0.16666666666666666 \cdot \left(y \cdot x\right)\right)} - x} \]
    13. Simplified66.7%

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

    if -3.50000000000000005e85 < y < -7.8000000000000002e58

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow24.1%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified4.1%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in x around 0 43.7%

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

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2} + 1\right)} \cdot x \]
      2. unpow243.7%

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
      3. fma-udef43.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
    7. Simplified43.7%

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

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2}\right)} \cdot x \]
    9. Step-by-step derivation
      1. unpow243.7%

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot x \]
    10. Simplified43.7%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \cdot x \]
    11. Step-by-step derivation
      1. add-sqr-sqrt43.7%

        \[\leadsto \color{blue}{\sqrt{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x} \cdot \sqrt{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x}} \]
      2. sqrt-unprod58.0%

        \[\leadsto \color{blue}{\sqrt{\left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right) \cdot \left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right)}} \]
      3. swap-sqr57.9%

        \[\leadsto \sqrt{\color{blue}{\left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)}} \]
      4. swap-sqr57.9%

        \[\leadsto \sqrt{\color{blue}{\left(\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right)} \cdot \left(x \cdot x\right)} \]
      5. metadata-eval57.9%

        \[\leadsto \sqrt{\left(\color{blue}{0.027777777777777776} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)} \]
      6. pow257.9%

        \[\leadsto \sqrt{\left(0.027777777777777776 \cdot \left(\color{blue}{{y}^{2}} \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)} \]
      7. pow257.9%

        \[\leadsto \sqrt{\left(0.027777777777777776 \cdot \left({y}^{2} \cdot \color{blue}{{y}^{2}}\right)\right) \cdot \left(x \cdot x\right)} \]
      8. pow-prod-up57.9%

        \[\leadsto \sqrt{\left(0.027777777777777776 \cdot \color{blue}{{y}^{\left(2 + 2\right)}}\right) \cdot \left(x \cdot x\right)} \]
      9. metadata-eval57.9%

        \[\leadsto \sqrt{\left(0.027777777777777776 \cdot {y}^{\color{blue}{4}}\right) \cdot \left(x \cdot x\right)} \]
    12. Applied egg-rr57.9%

      \[\leadsto \color{blue}{\sqrt{\left(0.027777777777777776 \cdot {y}^{4}\right) \cdot \left(x \cdot x\right)}} \]
    13. Step-by-step derivation
      1. associate-*l*57.9%

        \[\leadsto \sqrt{\color{blue}{0.027777777777777776 \cdot \left({y}^{4} \cdot \left(x \cdot x\right)\right)}} \]
      2. metadata-eval57.9%

        \[\leadsto \sqrt{\color{blue}{\left(0.16666666666666666 \cdot 0.16666666666666666\right)} \cdot \left({y}^{4} \cdot \left(x \cdot x\right)\right)} \]
      3. metadata-eval57.9%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left({y}^{\color{blue}{\left(2 \cdot 2\right)}} \cdot \left(x \cdot x\right)\right)} \]
      4. pow-sqr57.9%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(x \cdot x\right)\right)} \]
      5. swap-sqr58.0%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \color{blue}{\left(\left({y}^{2} \cdot x\right) \cdot \left({y}^{2} \cdot x\right)\right)}} \]
      6. unpow258.0%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot x\right) \cdot \left({y}^{2} \cdot x\right)\right)} \]
      7. associate-*r*58.0%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\color{blue}{\left(y \cdot \left(y \cdot x\right)\right)} \cdot \left({y}^{2} \cdot x\right)\right)} \]
      8. unpow258.0%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot \left(y \cdot x\right)\right) \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot x\right)\right)} \]
      9. associate-*r*58.0%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot \left(y \cdot x\right)\right) \cdot \color{blue}{\left(y \cdot \left(y \cdot x\right)\right)}\right)} \]
      10. swap-sqr58.0%

        \[\leadsto \sqrt{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot \left(y \cdot x\right)\right)\right) \cdot \left(0.16666666666666666 \cdot \left(y \cdot \left(y \cdot x\right)\right)\right)}} \]
      11. rem-sqrt-square58.0%

        \[\leadsto \color{blue}{\left|0.16666666666666666 \cdot \left(y \cdot \left(y \cdot x\right)\right)\right|} \]
      12. associate-*r*58.0%

        \[\leadsto \left|\color{blue}{\left(0.16666666666666666 \cdot y\right) \cdot \left(y \cdot x\right)}\right| \]
      13. *-commutative58.0%

        \[\leadsto \left|\color{blue}{\left(y \cdot 0.16666666666666666\right)} \cdot \left(y \cdot x\right)\right| \]
      14. associate-*l*58.0%

        \[\leadsto \left|\color{blue}{y \cdot \left(0.16666666666666666 \cdot \left(y \cdot x\right)\right)}\right| \]
    14. Simplified58.0%

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

    if -7.8000000000000002e58 < y < -9e7 or 2e11 < y < 2.50000000000000004e150

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow24.3%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified4.3%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 4.3%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow24.3%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*l*4.3%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    7. Simplified4.3%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    8. Taylor expanded in x around 0 18.2%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot x\right) + -0.027777777777777776 \cdot \left({y}^{2} \cdot {x}^{3}\right)} \]
    9. Step-by-step derivation
      1. *-commutative18.2%

        \[\leadsto \color{blue}{\left({y}^{2} \cdot x\right) \cdot 0.16666666666666666} + -0.027777777777777776 \cdot \left({y}^{2} \cdot {x}^{3}\right) \]
      2. associate-*l*18.2%

        \[\leadsto \color{blue}{{y}^{2} \cdot \left(x \cdot 0.16666666666666666\right)} + -0.027777777777777776 \cdot \left({y}^{2} \cdot {x}^{3}\right) \]
      3. *-commutative18.2%

        \[\leadsto {y}^{2} \cdot \left(x \cdot 0.16666666666666666\right) + \color{blue}{\left({y}^{2} \cdot {x}^{3}\right) \cdot -0.027777777777777776} \]
      4. associate-*l*18.2%

        \[\leadsto {y}^{2} \cdot \left(x \cdot 0.16666666666666666\right) + \color{blue}{{y}^{2} \cdot \left({x}^{3} \cdot -0.027777777777777776\right)} \]
      5. distribute-lft-out39.1%

        \[\leadsto \color{blue}{{y}^{2} \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)} \]
      6. unpow239.1%

        \[\leadsto \color{blue}{\left(y \cdot y\right)} \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right) \]
      7. *-commutative39.1%

        \[\leadsto \left(y \cdot y\right) \cdot \left(\color{blue}{0.16666666666666666 \cdot x} + {x}^{3} \cdot -0.027777777777777776\right) \]
    10. Simplified39.1%

      \[\leadsto \color{blue}{\left(y \cdot y\right) \cdot \left(0.16666666666666666 \cdot x + {x}^{3} \cdot -0.027777777777777776\right)} \]

    if -9e7 < y < 2e11 or 2.50000000000000004e150 < y

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow298.2%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified98.2%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification84.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+150}:\\ \;\;\;\;\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{+85}:\\ \;\;\;\;\frac{x \cdot \left({y}^{4} \cdot \left(x \cdot 0.027777777777777776\right) - x\right)}{y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right) - x}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{+58}:\\ \;\;\;\;\left|y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\right|\\ \mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 200000000000\right) \land y \leq 2.5 \cdot 10^{+150}:\\ \;\;\;\;\left(y \cdot y\right) \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)\\ \end{array} \]

Alternative 3: 80.1% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+150}:\\ \;\;\;\;\sin x \cdot t_0\\ \mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 410000000000\right) \land y \leq 2.5 \cdot 10^{+150}:\\ \;\;\;\;\left(y \cdot y\right) \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \left(t_0 + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* 0.16666666666666666 (* y y))))
   (if (<= y -6.5e+150)
     (* (sin x) t_0)
     (if (or (<= y -90000000.0)
             (and (not (<= y 410000000000.0)) (<= y 2.5e+150)))
       (*
        (* y y)
        (+ (* x 0.16666666666666666) (* (pow x 3.0) -0.027777777777777776)))
       (* (sin x) (+ t_0 1.0))))))
double code(double x, double y) {
	double t_0 = 0.16666666666666666 * (y * y);
	double tmp;
	if (y <= -6.5e+150) {
		tmp = sin(x) * t_0;
	} else if ((y <= -90000000.0) || (!(y <= 410000000000.0) && (y <= 2.5e+150))) {
		tmp = (y * y) * ((x * 0.16666666666666666) + (pow(x, 3.0) * -0.027777777777777776));
	} else {
		tmp = sin(x) * (t_0 + 1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 0.16666666666666666d0 * (y * y)
    if (y <= (-6.5d+150)) then
        tmp = sin(x) * t_0
    else if ((y <= (-90000000.0d0)) .or. (.not. (y <= 410000000000.0d0)) .and. (y <= 2.5d+150)) then
        tmp = (y * y) * ((x * 0.16666666666666666d0) + ((x ** 3.0d0) * (-0.027777777777777776d0)))
    else
        tmp = sin(x) * (t_0 + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = 0.16666666666666666 * (y * y);
	double tmp;
	if (y <= -6.5e+150) {
		tmp = Math.sin(x) * t_0;
	} else if ((y <= -90000000.0) || (!(y <= 410000000000.0) && (y <= 2.5e+150))) {
		tmp = (y * y) * ((x * 0.16666666666666666) + (Math.pow(x, 3.0) * -0.027777777777777776));
	} else {
		tmp = Math.sin(x) * (t_0 + 1.0);
	}
	return tmp;
}
def code(x, y):
	t_0 = 0.16666666666666666 * (y * y)
	tmp = 0
	if y <= -6.5e+150:
		tmp = math.sin(x) * t_0
	elif (y <= -90000000.0) or (not (y <= 410000000000.0) and (y <= 2.5e+150)):
		tmp = (y * y) * ((x * 0.16666666666666666) + (math.pow(x, 3.0) * -0.027777777777777776))
	else:
		tmp = math.sin(x) * (t_0 + 1.0)
	return tmp
function code(x, y)
	t_0 = Float64(0.16666666666666666 * Float64(y * y))
	tmp = 0.0
	if (y <= -6.5e+150)
		tmp = Float64(sin(x) * t_0);
	elseif ((y <= -90000000.0) || (!(y <= 410000000000.0) && (y <= 2.5e+150)))
		tmp = Float64(Float64(y * y) * Float64(Float64(x * 0.16666666666666666) + Float64((x ^ 3.0) * -0.027777777777777776)));
	else
		tmp = Float64(sin(x) * Float64(t_0 + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = 0.16666666666666666 * (y * y);
	tmp = 0.0;
	if (y <= -6.5e+150)
		tmp = sin(x) * t_0;
	elseif ((y <= -90000000.0) || (~((y <= 410000000000.0)) && (y <= 2.5e+150)))
		tmp = (y * y) * ((x * 0.16666666666666666) + ((x ^ 3.0) * -0.027777777777777776));
	else
		tmp = sin(x) * (t_0 + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+150], N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision], If[Or[LessEqual[y, -90000000.0], And[N[Not[LessEqual[y, 410000000000.0]], $MachinePrecision], LessEqual[y, 2.5e+150]]], N[(N[(y * y), $MachinePrecision] * N[(N[(x * 0.16666666666666666), $MachinePrecision] + N[(N[Power[x, 3.0], $MachinePrecision] * -0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+150}:\\
\;\;\;\;\sin x \cdot t_0\\

\mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 410000000000\right) \land y \leq 2.5 \cdot 10^{+150}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)\\

\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(t_0 + 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.50000000000000033e150

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow296.9%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified96.9%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 96.9%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow296.9%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*r*96.9%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \sin x} \]
      3. *-commutative96.9%

        \[\leadsto \color{blue}{\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    7. Simplified96.9%

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

    if -6.50000000000000033e150 < y < -9e7 or 4.1e11 < y < 2.50000000000000004e150

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow24.5%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified4.5%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 4.5%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow24.5%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*l*4.5%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    7. Simplified4.5%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    8. Taylor expanded in x around 0 13.8%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot x\right) + -0.027777777777777776 \cdot \left({y}^{2} \cdot {x}^{3}\right)} \]
    9. Step-by-step derivation
      1. *-commutative13.8%

        \[\leadsto \color{blue}{\left({y}^{2} \cdot x\right) \cdot 0.16666666666666666} + -0.027777777777777776 \cdot \left({y}^{2} \cdot {x}^{3}\right) \]
      2. associate-*l*13.8%

        \[\leadsto \color{blue}{{y}^{2} \cdot \left(x \cdot 0.16666666666666666\right)} + -0.027777777777777776 \cdot \left({y}^{2} \cdot {x}^{3}\right) \]
      3. *-commutative13.8%

        \[\leadsto {y}^{2} \cdot \left(x \cdot 0.16666666666666666\right) + \color{blue}{\left({y}^{2} \cdot {x}^{3}\right) \cdot -0.027777777777777776} \]
      4. associate-*l*13.8%

        \[\leadsto {y}^{2} \cdot \left(x \cdot 0.16666666666666666\right) + \color{blue}{{y}^{2} \cdot \left({x}^{3} \cdot -0.027777777777777776\right)} \]
      5. distribute-lft-out35.9%

        \[\leadsto \color{blue}{{y}^{2} \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)} \]
      6. unpow235.9%

        \[\leadsto \color{blue}{\left(y \cdot y\right)} \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right) \]
      7. *-commutative35.9%

        \[\leadsto \left(y \cdot y\right) \cdot \left(\color{blue}{0.16666666666666666 \cdot x} + {x}^{3} \cdot -0.027777777777777776\right) \]
    10. Simplified35.9%

      \[\leadsto \color{blue}{\left(y \cdot y\right) \cdot \left(0.16666666666666666 \cdot x + {x}^{3} \cdot -0.027777777777777776\right)} \]

    if -9e7 < y < 4.1e11 or 2.50000000000000004e150 < y

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow298.2%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified98.2%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+150}:\\ \;\;\;\;\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 410000000000\right) \land y \leq 2.5 \cdot 10^{+150}:\\ \;\;\;\;\left(y \cdot y\right) \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)\\ \end{array} \]

Alternative 4: 79.8% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\ \mathbf{if}\;y \leq -3 \cdot 10^{+144}:\\ \;\;\;\;\sin x \cdot t_0\\ \mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 200000000000\right) \land y \leq 4.6 \cdot 10^{+149}:\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(-0.16666666666666666 \cdot \left(y \cdot {x}^{3}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \left(t_0 + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* 0.16666666666666666 (* y y))))
   (if (<= y -3e+144)
     (* (sin x) t_0)
     (if (or (<= y -90000000.0)
             (and (not (<= y 200000000000.0)) (<= y 4.6e+149)))
       (* 0.16666666666666666 (* y (* -0.16666666666666666 (* y (pow x 3.0)))))
       (* (sin x) (+ t_0 1.0))))))
double code(double x, double y) {
	double t_0 = 0.16666666666666666 * (y * y);
	double tmp;
	if (y <= -3e+144) {
		tmp = sin(x) * t_0;
	} else if ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 4.6e+149))) {
		tmp = 0.16666666666666666 * (y * (-0.16666666666666666 * (y * pow(x, 3.0))));
	} else {
		tmp = sin(x) * (t_0 + 1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 0.16666666666666666d0 * (y * y)
    if (y <= (-3d+144)) then
        tmp = sin(x) * t_0
    else if ((y <= (-90000000.0d0)) .or. (.not. (y <= 200000000000.0d0)) .and. (y <= 4.6d+149)) then
        tmp = 0.16666666666666666d0 * (y * ((-0.16666666666666666d0) * (y * (x ** 3.0d0))))
    else
        tmp = sin(x) * (t_0 + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = 0.16666666666666666 * (y * y);
	double tmp;
	if (y <= -3e+144) {
		tmp = Math.sin(x) * t_0;
	} else if ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 4.6e+149))) {
		tmp = 0.16666666666666666 * (y * (-0.16666666666666666 * (y * Math.pow(x, 3.0))));
	} else {
		tmp = Math.sin(x) * (t_0 + 1.0);
	}
	return tmp;
}
def code(x, y):
	t_0 = 0.16666666666666666 * (y * y)
	tmp = 0
	if y <= -3e+144:
		tmp = math.sin(x) * t_0
	elif (y <= -90000000.0) or (not (y <= 200000000000.0) and (y <= 4.6e+149)):
		tmp = 0.16666666666666666 * (y * (-0.16666666666666666 * (y * math.pow(x, 3.0))))
	else:
		tmp = math.sin(x) * (t_0 + 1.0)
	return tmp
function code(x, y)
	t_0 = Float64(0.16666666666666666 * Float64(y * y))
	tmp = 0.0
	if (y <= -3e+144)
		tmp = Float64(sin(x) * t_0);
	elseif ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 4.6e+149)))
		tmp = Float64(0.16666666666666666 * Float64(y * Float64(-0.16666666666666666 * Float64(y * (x ^ 3.0)))));
	else
		tmp = Float64(sin(x) * Float64(t_0 + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = 0.16666666666666666 * (y * y);
	tmp = 0.0;
	if (y <= -3e+144)
		tmp = sin(x) * t_0;
	elseif ((y <= -90000000.0) || (~((y <= 200000000000.0)) && (y <= 4.6e+149)))
		tmp = 0.16666666666666666 * (y * (-0.16666666666666666 * (y * (x ^ 3.0))));
	else
		tmp = sin(x) * (t_0 + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e+144], N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision], If[Or[LessEqual[y, -90000000.0], And[N[Not[LessEqual[y, 200000000000.0]], $MachinePrecision], LessEqual[y, 4.6e+149]]], N[(0.16666666666666666 * N[(y * N[(-0.16666666666666666 * N[(y * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -3 \cdot 10^{+144}:\\
\;\;\;\;\sin x \cdot t_0\\

\mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 200000000000\right) \land y \leq 4.6 \cdot 10^{+149}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(-0.16666666666666666 \cdot \left(y \cdot {x}^{3}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(t_0 + 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.9999999999999999e144

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow288.3%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified88.3%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 88.3%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow288.3%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*r*88.3%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \sin x} \]
      3. *-commutative88.3%

        \[\leadsto \color{blue}{\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    7. Simplified88.3%

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

    if -2.9999999999999999e144 < y < -9e7 or 2e11 < y < 4.5999999999999997e149

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow24.5%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified4.5%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 4.5%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow24.5%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*l*4.5%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    7. Simplified4.5%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    8. Taylor expanded in x around 0 25.0%

      \[\leadsto 0.16666666666666666 \cdot \left(y \cdot \color{blue}{\left(-0.16666666666666666 \cdot \left(y \cdot {x}^{3}\right) + y \cdot x\right)}\right) \]
    9. Taylor expanded in x around inf 36.3%

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

    if -9e7 < y < 2e11 or 4.5999999999999997e149 < y

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow298.2%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified98.2%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+144}:\\ \;\;\;\;\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 200000000000\right) \land y \leq 4.6 \cdot 10^{+149}:\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(-0.16666666666666666 \cdot \left(y \cdot {x}^{3}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)\\ \end{array} \]

Alternative 5: 78.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ t_1 := \left|y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\right|\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+154}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq -340000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 12200000000000:\\ \;\;\;\;\sin x\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+150}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (sin x) (* 0.16666666666666666 (* y y))))
        (t_1 (fabs (* y (* 0.16666666666666666 (* x y))))))
   (if (<= y -1.4e+154)
     t_0
     (if (<= y -340000000.0)
       t_1
       (if (<= y 12200000000000.0) (sin x) (if (<= y 2.5e+150) t_1 t_0))))))
double code(double x, double y) {
	double t_0 = sin(x) * (0.16666666666666666 * (y * y));
	double t_1 = fabs((y * (0.16666666666666666 * (x * y))));
	double tmp;
	if (y <= -1.4e+154) {
		tmp = t_0;
	} else if (y <= -340000000.0) {
		tmp = t_1;
	} else if (y <= 12200000000000.0) {
		tmp = sin(x);
	} else if (y <= 2.5e+150) {
		tmp = t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = sin(x) * (0.16666666666666666d0 * (y * y))
    t_1 = abs((y * (0.16666666666666666d0 * (x * y))))
    if (y <= (-1.4d+154)) then
        tmp = t_0
    else if (y <= (-340000000.0d0)) then
        tmp = t_1
    else if (y <= 12200000000000.0d0) then
        tmp = sin(x)
    else if (y <= 2.5d+150) then
        tmp = t_1
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sin(x) * (0.16666666666666666 * (y * y));
	double t_1 = Math.abs((y * (0.16666666666666666 * (x * y))));
	double tmp;
	if (y <= -1.4e+154) {
		tmp = t_0;
	} else if (y <= -340000000.0) {
		tmp = t_1;
	} else if (y <= 12200000000000.0) {
		tmp = Math.sin(x);
	} else if (y <= 2.5e+150) {
		tmp = t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sin(x) * (0.16666666666666666 * (y * y))
	t_1 = math.fabs((y * (0.16666666666666666 * (x * y))))
	tmp = 0
	if y <= -1.4e+154:
		tmp = t_0
	elif y <= -340000000.0:
		tmp = t_1
	elif y <= 12200000000000.0:
		tmp = math.sin(x)
	elif y <= 2.5e+150:
		tmp = t_1
	else:
		tmp = t_0
	return tmp
function code(x, y)
	t_0 = Float64(sin(x) * Float64(0.16666666666666666 * Float64(y * y)))
	t_1 = abs(Float64(y * Float64(0.16666666666666666 * Float64(x * y))))
	tmp = 0.0
	if (y <= -1.4e+154)
		tmp = t_0;
	elseif (y <= -340000000.0)
		tmp = t_1;
	elseif (y <= 12200000000000.0)
		tmp = sin(x);
	elseif (y <= 2.5e+150)
		tmp = t_1;
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sin(x) * (0.16666666666666666 * (y * y));
	t_1 = abs((y * (0.16666666666666666 * (x * y))));
	tmp = 0.0;
	if (y <= -1.4e+154)
		tmp = t_0;
	elseif (y <= -340000000.0)
		tmp = t_1;
	elseif (y <= 12200000000000.0)
		tmp = sin(x);
	elseif (y <= 2.5e+150)
		tmp = t_1;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[x], $MachinePrecision] * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(y * N[(0.16666666666666666 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -1.4e+154], t$95$0, If[LessEqual[y, -340000000.0], t$95$1, If[LessEqual[y, 12200000000000.0], N[Sin[x], $MachinePrecision], If[LessEqual[y, 2.5e+150], t$95$1, t$95$0]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
t_1 := \left|y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\right|\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+154}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq -340000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 12200000000000:\\
\;\;\;\;\sin x\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+150}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4e154 or 2.50000000000000004e150 < y

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow298.4%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified98.4%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 98.4%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow298.4%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*r*98.4%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \sin x} \]
      3. *-commutative98.4%

        \[\leadsto \color{blue}{\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    7. Simplified98.4%

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

    if -1.4e154 < y < -3.4e8 or 1.22e13 < y < 2.50000000000000004e150

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow24.6%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified4.6%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in x around 0 13.6%

      \[\leadsto \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right) \cdot x} \]
    6. Step-by-step derivation
      1. +-commutative13.6%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2} + 1\right)} \cdot x \]
      2. unpow213.6%

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
      3. fma-udef13.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
    7. Simplified13.6%

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

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2}\right)} \cdot x \]
    9. Step-by-step derivation
      1. unpow213.6%

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot x \]
    10. Simplified13.6%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \cdot x \]
    11. Step-by-step derivation
      1. add-sqr-sqrt8.4%

        \[\leadsto \color{blue}{\sqrt{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x} \cdot \sqrt{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x}} \]
      2. sqrt-unprod35.8%

        \[\leadsto \color{blue}{\sqrt{\left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right) \cdot \left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right)}} \]
      3. swap-sqr39.7%

        \[\leadsto \sqrt{\color{blue}{\left(\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)}} \]
      4. swap-sqr39.7%

        \[\leadsto \sqrt{\color{blue}{\left(\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right)} \cdot \left(x \cdot x\right)} \]
      5. metadata-eval39.7%

        \[\leadsto \sqrt{\left(\color{blue}{0.027777777777777776} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)} \]
      6. pow239.7%

        \[\leadsto \sqrt{\left(0.027777777777777776 \cdot \left(\color{blue}{{y}^{2}} \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot x\right)} \]
      7. pow239.7%

        \[\leadsto \sqrt{\left(0.027777777777777776 \cdot \left({y}^{2} \cdot \color{blue}{{y}^{2}}\right)\right) \cdot \left(x \cdot x\right)} \]
      8. pow-prod-up39.7%

        \[\leadsto \sqrt{\left(0.027777777777777776 \cdot \color{blue}{{y}^{\left(2 + 2\right)}}\right) \cdot \left(x \cdot x\right)} \]
      9. metadata-eval39.7%

        \[\leadsto \sqrt{\left(0.027777777777777776 \cdot {y}^{\color{blue}{4}}\right) \cdot \left(x \cdot x\right)} \]
    12. Applied egg-rr39.7%

      \[\leadsto \color{blue}{\sqrt{\left(0.027777777777777776 \cdot {y}^{4}\right) \cdot \left(x \cdot x\right)}} \]
    13. Step-by-step derivation
      1. associate-*l*39.7%

        \[\leadsto \sqrt{\color{blue}{0.027777777777777776 \cdot \left({y}^{4} \cdot \left(x \cdot x\right)\right)}} \]
      2. metadata-eval39.7%

        \[\leadsto \sqrt{\color{blue}{\left(0.16666666666666666 \cdot 0.16666666666666666\right)} \cdot \left({y}^{4} \cdot \left(x \cdot x\right)\right)} \]
      3. metadata-eval39.7%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left({y}^{\color{blue}{\left(2 \cdot 2\right)}} \cdot \left(x \cdot x\right)\right)} \]
      4. pow-sqr39.7%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(x \cdot x\right)\right)} \]
      5. swap-sqr35.8%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \color{blue}{\left(\left({y}^{2} \cdot x\right) \cdot \left({y}^{2} \cdot x\right)\right)}} \]
      6. unpow235.8%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot x\right) \cdot \left({y}^{2} \cdot x\right)\right)} \]
      7. associate-*r*35.8%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\color{blue}{\left(y \cdot \left(y \cdot x\right)\right)} \cdot \left({y}^{2} \cdot x\right)\right)} \]
      8. unpow235.8%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot \left(y \cdot x\right)\right) \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot x\right)\right)} \]
      9. associate-*r*35.8%

        \[\leadsto \sqrt{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot \left(y \cdot x\right)\right) \cdot \color{blue}{\left(y \cdot \left(y \cdot x\right)\right)}\right)} \]
      10. swap-sqr35.8%

        \[\leadsto \sqrt{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot \left(y \cdot x\right)\right)\right) \cdot \left(0.16666666666666666 \cdot \left(y \cdot \left(y \cdot x\right)\right)\right)}} \]
      11. rem-sqrt-square20.9%

        \[\leadsto \color{blue}{\left|0.16666666666666666 \cdot \left(y \cdot \left(y \cdot x\right)\right)\right|} \]
      12. associate-*r*20.9%

        \[\leadsto \left|\color{blue}{\left(0.16666666666666666 \cdot y\right) \cdot \left(y \cdot x\right)}\right| \]
      13. *-commutative20.9%

        \[\leadsto \left|\color{blue}{\left(y \cdot 0.16666666666666666\right)} \cdot \left(y \cdot x\right)\right| \]
      14. associate-*l*20.9%

        \[\leadsto \left|\color{blue}{y \cdot \left(0.16666666666666666 \cdot \left(y \cdot x\right)\right)}\right| \]
    14. Simplified20.9%

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

    if -3.4e8 < y < 1.22e13

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow298.5%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified98.5%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around 0 98.3%

      \[\leadsto \color{blue}{\sin x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+154}:\\ \;\;\;\;\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq -340000000:\\ \;\;\;\;\left|y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\right|\\ \mathbf{elif}\;y \leq 12200000000000:\\ \;\;\;\;\sin x\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+150}:\\ \;\;\;\;\left|y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 6: 72.0% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+158}:\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\sin x \cdot y\right)\right)\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{+43}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+58}:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y -8.2e+158)
   (* 0.16666666666666666 (* y (* (sin x) y)))
   (if (<= y -3.8e+43)
     (* 0.16666666666666666 (* x (* y y)))
     (if (<= y 3.1e+58) (sin x) (+ x (* x (* 0.16666666666666666 (* y y))))))))
double code(double x, double y) {
	double tmp;
	if (y <= -8.2e+158) {
		tmp = 0.16666666666666666 * (y * (sin(x) * y));
	} else if (y <= -3.8e+43) {
		tmp = 0.16666666666666666 * (x * (y * y));
	} else if (y <= 3.1e+58) {
		tmp = sin(x);
	} else {
		tmp = x + (x * (0.16666666666666666 * (y * y)));
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= (-8.2d+158)) then
        tmp = 0.16666666666666666d0 * (y * (sin(x) * y))
    else if (y <= (-3.8d+43)) then
        tmp = 0.16666666666666666d0 * (x * (y * y))
    else if (y <= 3.1d+58) then
        tmp = sin(x)
    else
        tmp = x + (x * (0.16666666666666666d0 * (y * y)))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= -8.2e+158) {
		tmp = 0.16666666666666666 * (y * (Math.sin(x) * y));
	} else if (y <= -3.8e+43) {
		tmp = 0.16666666666666666 * (x * (y * y));
	} else if (y <= 3.1e+58) {
		tmp = Math.sin(x);
	} else {
		tmp = x + (x * (0.16666666666666666 * (y * y)));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= -8.2e+158:
		tmp = 0.16666666666666666 * (y * (math.sin(x) * y))
	elif y <= -3.8e+43:
		tmp = 0.16666666666666666 * (x * (y * y))
	elif y <= 3.1e+58:
		tmp = math.sin(x)
	else:
		tmp = x + (x * (0.16666666666666666 * (y * y)))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= -8.2e+158)
		tmp = Float64(0.16666666666666666 * Float64(y * Float64(sin(x) * y)));
	elseif (y <= -3.8e+43)
		tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y)));
	elseif (y <= 3.1e+58)
		tmp = sin(x);
	else
		tmp = Float64(x + Float64(x * Float64(0.16666666666666666 * Float64(y * y))));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= -8.2e+158)
		tmp = 0.16666666666666666 * (y * (sin(x) * y));
	elseif (y <= -3.8e+43)
		tmp = 0.16666666666666666 * (x * (y * y));
	elseif (y <= 3.1e+58)
		tmp = sin(x);
	else
		tmp = x + (x * (0.16666666666666666 * (y * y)));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, -8.2e+158], N[(0.16666666666666666 * N[(y * N[(N[Sin[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e+43], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+58], N[Sin[x], $MachinePrecision], N[(x + N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+158}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\sin x \cdot y\right)\right)\\

\mathbf{elif}\;y \leq -3.8 \cdot 10^{+43}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+58}:\\
\;\;\;\;\sin x\\

\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.20000000000000008e158

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified100.0%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 100.0%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*l*89.1%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    7. Simplified89.1%

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

    if -8.20000000000000008e158 < y < -3.80000000000000008e43

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow210.6%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified10.6%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 10.6%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow210.6%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*l*7.8%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    7. Simplified7.8%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    8. Taylor expanded in x around 0 23.3%

      \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left({y}^{2} \cdot x\right)} \]
    9. Step-by-step derivation
      1. unpow223.3%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot x\right) \]
    10. Simplified23.3%

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

    if -3.80000000000000008e43 < y < 3.0999999999999999e58

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow285.4%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified85.4%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around 0 85.3%

      \[\leadsto \color{blue}{\sin x} \]

    if 3.0999999999999999e58 < y

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow266.0%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified66.0%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in x around 0 58.4%

      \[\leadsto \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right) \cdot x} \]
    6. Step-by-step derivation
      1. +-commutative58.4%

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

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
      3. fma-udef58.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
    7. Simplified58.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative58.4%

        \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \]
      2. fma-udef58.4%

        \[\leadsto x \cdot \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)} \]
      3. distribute-rgt-in58.4%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + 1 \cdot x} \]
      4. *-un-lft-identity58.4%

        \[\leadsto \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + \color{blue}{x} \]
    9. Applied egg-rr58.4%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification72.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+158}:\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\sin x \cdot y\right)\right)\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{+43}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+58}:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 7: 75.9% accurate, 1.9× speedup?

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

\\
\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)
\end{array}
Derivation
  1. Initial program 100.0%

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

    \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
  3. Step-by-step derivation
    1. unpow273.2%

      \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
  4. Simplified73.2%

    \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
  5. Final simplification73.2%

    \[\leadsto \sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right) \]

Alternative 8: 71.4% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+44}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+63}:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y -2.5e+44)
   (* 0.16666666666666666 (* x (* y y)))
   (if (<= y 8.5e+63) (sin x) (+ x (* x (* 0.16666666666666666 (* y y)))))))
double code(double x, double y) {
	double tmp;
	if (y <= -2.5e+44) {
		tmp = 0.16666666666666666 * (x * (y * y));
	} else if (y <= 8.5e+63) {
		tmp = sin(x);
	} else {
		tmp = x + (x * (0.16666666666666666 * (y * y)));
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= (-2.5d+44)) then
        tmp = 0.16666666666666666d0 * (x * (y * y))
    else if (y <= 8.5d+63) then
        tmp = sin(x)
    else
        tmp = x + (x * (0.16666666666666666d0 * (y * y)))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= -2.5e+44) {
		tmp = 0.16666666666666666 * (x * (y * y));
	} else if (y <= 8.5e+63) {
		tmp = Math.sin(x);
	} else {
		tmp = x + (x * (0.16666666666666666 * (y * y)));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= -2.5e+44:
		tmp = 0.16666666666666666 * (x * (y * y))
	elif y <= 8.5e+63:
		tmp = math.sin(x)
	else:
		tmp = x + (x * (0.16666666666666666 * (y * y)))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= -2.5e+44)
		tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y)));
	elseif (y <= 8.5e+63)
		tmp = sin(x);
	else
		tmp = Float64(x + Float64(x * Float64(0.16666666666666666 * Float64(y * y))));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= -2.5e+44)
		tmp = 0.16666666666666666 * (x * (y * y));
	elseif (y <= 8.5e+63)
		tmp = sin(x);
	else
		tmp = x + (x * (0.16666666666666666 * (y * y)));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, -2.5e+44], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+63], N[Sin[x], $MachinePrecision], N[(x + N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+44}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{+63}:\\
\;\;\;\;\sin x\\

\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4999999999999998e44

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow249.3%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified49.3%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 49.3%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow249.3%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*l*43.0%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    7. Simplified43.0%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    8. Taylor expanded in x around 0 38.2%

      \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left({y}^{2} \cdot x\right)} \]
    9. Step-by-step derivation
      1. unpow238.2%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot x\right) \]
    10. Simplified38.2%

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

    if -2.4999999999999998e44 < y < 8.5000000000000004e63

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow285.4%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified85.4%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around 0 85.3%

      \[\leadsto \color{blue}{\sin x} \]

    if 8.5000000000000004e63 < y

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow266.0%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified66.0%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in x around 0 58.4%

      \[\leadsto \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right) \cdot x} \]
    6. Step-by-step derivation
      1. +-commutative58.4%

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

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
      3. fma-udef58.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
    7. Simplified58.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative58.4%

        \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \]
      2. fma-udef58.4%

        \[\leadsto x \cdot \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)} \]
      3. distribute-rgt-in58.4%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + 1 \cdot x} \]
      4. *-un-lft-identity58.4%

        \[\leadsto \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + \color{blue}{x} \]
    9. Applied egg-rr58.4%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+44}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+63}:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 9: 40.9% accurate, 18.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-24} \lor \neg \left(y \leq 2.5\right):\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (or (<= y -6.8e-24) (not (<= y 2.5)))
   (* 0.16666666666666666 (* y (* x y)))
   x))
double code(double x, double y) {
	double tmp;
	if ((y <= -6.8e-24) || !(y <= 2.5)) {
		tmp = 0.16666666666666666 * (y * (x * y));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if ((y <= (-6.8d-24)) .or. (.not. (y <= 2.5d0))) then
        tmp = 0.16666666666666666d0 * (y * (x * y))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if ((y <= -6.8e-24) || !(y <= 2.5)) {
		tmp = 0.16666666666666666 * (y * (x * y));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (y <= -6.8e-24) or not (y <= 2.5):
		tmp = 0.16666666666666666 * (y * (x * y))
	else:
		tmp = x
	return tmp
function code(x, y)
	tmp = 0.0
	if ((y <= -6.8e-24) || !(y <= 2.5))
		tmp = Float64(0.16666666666666666 * Float64(y * Float64(x * y)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if ((y <= -6.8e-24) || ~((y <= 2.5)))
		tmp = 0.16666666666666666 * (y * (x * y));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[Or[LessEqual[y, -6.8e-24], N[Not[LessEqual[y, 2.5]], $MachinePrecision]], N[(0.16666666666666666 * N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-24} \lor \neg \left(y \leq 2.5\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(x \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.79999999999999985e-24 or 2.5 < y

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow249.5%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified49.5%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 46.8%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow246.8%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*l*36.5%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    7. Simplified36.5%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    8. Taylor expanded in x around 0 38.7%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot x\right)} \]
    9. Step-by-step derivation
      1. unpow238.7%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot x\right) \]
      2. associate-*l*28.4%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot x\right)\right)} \]
    10. Simplified28.4%

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

    if -6.79999999999999985e-24 < y < 2.5

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified100.0%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in x around 0 49.6%

      \[\leadsto \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right) \cdot x} \]
    6. Step-by-step derivation
      1. +-commutative49.6%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2} + 1\right)} \cdot x \]
      2. unpow249.6%

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
      3. fma-udef49.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
    7. Simplified49.6%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-24} \lor \neg \left(y \leq 2.5\right):\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 46.6% accurate, 18.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-24} \lor \neg \left(y \leq 2.5\right):\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (or (<= y -6.8e-24) (not (<= y 2.5)))
   (* 0.16666666666666666 (* x (* y y)))
   x))
double code(double x, double y) {
	double tmp;
	if ((y <= -6.8e-24) || !(y <= 2.5)) {
		tmp = 0.16666666666666666 * (x * (y * y));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if ((y <= (-6.8d-24)) .or. (.not. (y <= 2.5d0))) then
        tmp = 0.16666666666666666d0 * (x * (y * y))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if ((y <= -6.8e-24) || !(y <= 2.5)) {
		tmp = 0.16666666666666666 * (x * (y * y));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (y <= -6.8e-24) or not (y <= 2.5):
		tmp = 0.16666666666666666 * (x * (y * y))
	else:
		tmp = x
	return tmp
function code(x, y)
	tmp = 0.0
	if ((y <= -6.8e-24) || !(y <= 2.5))
		tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if ((y <= -6.8e-24) || ~((y <= 2.5)))
		tmp = 0.16666666666666666 * (x * (y * y));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[Or[LessEqual[y, -6.8e-24], N[Not[LessEqual[y, 2.5]], $MachinePrecision]], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-24} \lor \neg \left(y \leq 2.5\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.79999999999999985e-24 or 2.5 < y

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow249.5%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified49.5%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in y around inf 46.8%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left({y}^{2} \cdot \sin x\right)} \]
    6. Step-by-step derivation
      1. unpow246.8%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \sin x\right) \]
      2. associate-*l*36.5%

        \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    7. Simplified36.5%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(y \cdot \left(y \cdot \sin x\right)\right)} \]
    8. Taylor expanded in x around 0 38.7%

      \[\leadsto 0.16666666666666666 \cdot \color{blue}{\left({y}^{2} \cdot x\right)} \]
    9. Step-by-step derivation
      1. unpow238.7%

        \[\leadsto 0.16666666666666666 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot x\right) \]
    10. Simplified38.7%

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

    if -6.79999999999999985e-24 < y < 2.5

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
    3. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified100.0%

      \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    5. Taylor expanded in x around 0 49.6%

      \[\leadsto \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right) \cdot x} \]
    6. Step-by-step derivation
      1. +-commutative49.6%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2} + 1\right)} \cdot x \]
      2. unpow249.6%

        \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
      3. fma-udef49.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
    7. Simplified49.6%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-24} \lor \neg \left(y \leq 2.5\right):\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 47.4% accurate, 22.8× speedup?

\[\begin{array}{l} \\ x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \end{array} \]
(FPCore (x y) :precision binary64 (+ x (* x (* 0.16666666666666666 (* y y)))))
double code(double x, double y) {
	return x + (x * (0.16666666666666666 * (y * y)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = x + (x * (0.16666666666666666d0 * (y * y)))
end function
public static double code(double x, double y) {
	return x + (x * (0.16666666666666666 * (y * y)));
}
def code(x, y):
	return x + (x * (0.16666666666666666 * (y * y)))
function code(x, y)
	return Float64(x + Float64(x * Float64(0.16666666666666666 * Float64(y * y))))
end
function tmp = code(x, y)
	tmp = x + (x * (0.16666666666666666 * (y * y)));
end
code[x_, y_] := N[(x + N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)
\end{array}
Derivation
  1. Initial program 100.0%

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

    \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
  3. Step-by-step derivation
    1. unpow273.2%

      \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
  4. Simplified73.2%

    \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
  5. Taylor expanded in x around 0 43.8%

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

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2} + 1\right)} \cdot x \]
    2. unpow243.8%

      \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
    3. fma-udef43.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
  7. Simplified43.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot x} \]
  8. Step-by-step derivation
    1. *-commutative43.8%

      \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \]
    2. fma-udef43.8%

      \[\leadsto x \cdot \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)} \]
    3. distribute-rgt-in43.8%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + 1 \cdot x} \]
    4. *-un-lft-identity43.8%

      \[\leadsto \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + \color{blue}{x} \]
  9. Applied egg-rr43.8%

    \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x + x} \]
  10. Final simplification43.8%

    \[\leadsto x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \]

Alternative 12: 26.0% accurate, 205.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y) :precision binary64 x)
double code(double x, double y) {
	return x;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = x
end function
public static double code(double x, double y) {
	return x;
}
def code(x, y):
	return x
function code(x, y)
	return x
end
function tmp = code(x, y)
	tmp = x;
end
code[x_, y_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 100.0%

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

    \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot {y}^{2}\right)} \]
  3. Step-by-step derivation
    1. unpow273.2%

      \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
  4. Simplified73.2%

    \[\leadsto \sin x \cdot \color{blue}{\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
  5. Taylor expanded in x around 0 43.8%

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

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot {y}^{2} + 1\right)} \cdot x \]
    2. unpow243.8%

      \[\leadsto \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)} + 1\right) \cdot x \]
    3. fma-udef43.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \cdot x \]
  7. Simplified43.8%

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

    \[\leadsto \color{blue}{x} \]
  9. Final simplification24.6%

    \[\leadsto x \]

Reproduce

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