Linear.Quaternion:$ccos from linear-1.19.1.3

Percentage Accurate: 100.0% → 100.0%
Time: 9.6s
Alternatives: 11
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 11 alternatives:

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

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

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

    \[\sin x \cdot \frac{\sinh y}{y} \]
  2. Step-by-step derivation
    1. clear-num100.0%

      \[\leadsto \sin x \cdot \color{blue}{\frac{1}{\frac{y}{\sinh y}}} \]
    2. un-div-inv100.0%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{y}{\sinh y}}} \]
  3. Applied egg-rr100.0%

    \[\leadsto \color{blue}{\frac{\sin x}{\frac{y}{\sinh y}}} \]
  4. Final simplification100.0%

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

Alternative 2: 87.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sinh y}{y}\\ \mathbf{if}\;t_0 \leq 10^{+36}:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;x \cdot t_0\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (sinh y) y))) (if (<= t_0 1e+36) (sin x) (* x t_0))))
double code(double x, double y) {
	double t_0 = sinh(y) / y;
	double tmp;
	if (t_0 <= 1e+36) {
		tmp = sin(x);
	} else {
		tmp = x * 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) :: tmp
    t_0 = sinh(y) / y
    if (t_0 <= 1d+36) then
        tmp = sin(x)
    else
        tmp = x * t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sinh(y) / y;
	double tmp;
	if (t_0 <= 1e+36) {
		tmp = Math.sin(x);
	} else {
		tmp = x * t_0;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sinh(y) / y
	tmp = 0
	if t_0 <= 1e+36:
		tmp = math.sin(x)
	else:
		tmp = x * t_0
	return tmp
function code(x, y)
	t_0 = Float64(sinh(y) / y)
	tmp = 0.0
	if (t_0 <= 1e+36)
		tmp = sin(x);
	else
		tmp = Float64(x * t_0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sinh(y) / y;
	tmp = 0.0;
	if (t_0 <= 1e+36)
		tmp = sin(x);
	else
		tmp = x * t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$0, 1e+36], N[Sin[x], $MachinePrecision], N[(x * t$95$0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
\mathbf{if}\;t_0 \leq 10^{+36}:\\
\;\;\;\;\sin x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (sinh.f64 y) y) < 1.00000000000000004e36

    1. Initial program 100.0%

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

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

    if 1.00000000000000004e36 < (/.f64 (sinh.f64 y) y)

    1. Initial program 100.0%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num100.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr100.0%

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

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
    5. Step-by-step derivation
      1. associate-/r*65.5%

        \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      2. associate-*r/65.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      3. *-commutative65.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
      4. associate-/r/65.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
      5. rec-exp65.5%

        \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
      6. sinh-def65.5%

        \[\leadsto \frac{1}{\frac{\frac{y}{\color{blue}{\sinh y}}}{x}} \]
    6. Simplified65.5%

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{y}{\sinh y}}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/65.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sinh y}} \cdot x} \]
      2. clear-num65.5%

        \[\leadsto \color{blue}{\frac{\sinh y}{y}} \cdot x \]
    8. Applied egg-rr65.5%

      \[\leadsto \color{blue}{\frac{\sinh y}{y} \cdot x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y}{y} \leq 10^{+36}:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\sinh y}{y}\\ \end{array} \]

Alternative 3: 87.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sinh y}{y} \leq 10^{+36}:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \sinh y}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (/ (sinh y) y) 1e+36) (sin x) (/ (* x (sinh y)) y)))
double code(double x, double y) {
	double tmp;
	if ((sinh(y) / y) <= 1e+36) {
		tmp = sin(x);
	} else {
		tmp = (x * sinh(y)) / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if ((sinh(y) / y) <= 1d+36) then
        tmp = sin(x)
    else
        tmp = (x * sinh(y)) / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if ((Math.sinh(y) / y) <= 1e+36) {
		tmp = Math.sin(x);
	} else {
		tmp = (x * Math.sinh(y)) / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (math.sinh(y) / y) <= 1e+36:
		tmp = math.sin(x)
	else:
		tmp = (x * math.sinh(y)) / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (Float64(sinh(y) / y) <= 1e+36)
		tmp = sin(x);
	else
		tmp = Float64(Float64(x * sinh(y)) / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if ((sinh(y) / y) <= 1e+36)
		tmp = sin(x);
	else
		tmp = (x * sinh(y)) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision], 1e+36], N[Sin[x], $MachinePrecision], N[(N[(x * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \leq 10^{+36}:\\
\;\;\;\;\sin x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (sinh.f64 y) y) < 1.00000000000000004e36

    1. Initial program 100.0%

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

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

    if 1.00000000000000004e36 < (/.f64 (sinh.f64 y) y)

    1. Initial program 100.0%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num100.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr100.0%

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

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
    5. Step-by-step derivation
      1. associate-/r*65.5%

        \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      2. associate-*r/65.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      3. *-commutative65.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
      4. associate-/r/65.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
      5. rec-exp65.5%

        \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
      6. sinh-def65.5%

        \[\leadsto \frac{1}{\frac{\frac{y}{\color{blue}{\sinh y}}}{x}} \]
    6. Simplified65.5%

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{y}{\sinh y}}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/65.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sinh y}} \cdot x} \]
      2. clear-num65.5%

        \[\leadsto \color{blue}{\frac{\sinh y}{y}} \cdot x \]
    8. Applied egg-rr65.5%

      \[\leadsto \color{blue}{\frac{\sinh y}{y} \cdot x} \]
    9. Step-by-step derivation
      1. associate-*l/65.5%

        \[\leadsto \color{blue}{\frac{\sinh y \cdot x}{y}} \]
    10. Applied egg-rr65.5%

      \[\leadsto \color{blue}{\frac{\sinh y \cdot x}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y}{y} \leq 10^{+36}:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \sinh y}{y}\\ \end{array} \]

Alternative 4: 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 5: 71.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 90:\\ \;\;\;\;\sin x\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{+69}:\\ \;\;\;\;\frac{x \cdot \sinh y}{y}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+87}:\\ \;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \frac{\sinh y}{y}\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(\sin x \cdot \left(y \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y 90.0)
   (sin x)
   (if (<= y 2.85e+69)
     (/ (* x (sinh y)) y)
     (if (<= y 7e+87)
       (+ x (* -0.16666666666666666 (pow x 3.0)))
       (if (<= y 1.35e+154)
         (* x (/ (sinh y) y))
         (* 0.16666666666666666 (* (sin x) (* y y))))))))
double code(double x, double y) {
	double tmp;
	if (y <= 90.0) {
		tmp = sin(x);
	} else if (y <= 2.85e+69) {
		tmp = (x * sinh(y)) / y;
	} else if (y <= 7e+87) {
		tmp = x + (-0.16666666666666666 * pow(x, 3.0));
	} else if (y <= 1.35e+154) {
		tmp = x * (sinh(y) / y);
	} else {
		tmp = 0.16666666666666666 * (sin(x) * (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 <= 90.0d0) then
        tmp = sin(x)
    else if (y <= 2.85d+69) then
        tmp = (x * sinh(y)) / y
    else if (y <= 7d+87) then
        tmp = x + ((-0.16666666666666666d0) * (x ** 3.0d0))
    else if (y <= 1.35d+154) then
        tmp = x * (sinh(y) / y)
    else
        tmp = 0.16666666666666666d0 * (sin(x) * (y * y))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= 90.0) {
		tmp = Math.sin(x);
	} else if (y <= 2.85e+69) {
		tmp = (x * Math.sinh(y)) / y;
	} else if (y <= 7e+87) {
		tmp = x + (-0.16666666666666666 * Math.pow(x, 3.0));
	} else if (y <= 1.35e+154) {
		tmp = x * (Math.sinh(y) / y);
	} else {
		tmp = 0.16666666666666666 * (Math.sin(x) * (y * y));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 90.0:
		tmp = math.sin(x)
	elif y <= 2.85e+69:
		tmp = (x * math.sinh(y)) / y
	elif y <= 7e+87:
		tmp = x + (-0.16666666666666666 * math.pow(x, 3.0))
	elif y <= 1.35e+154:
		tmp = x * (math.sinh(y) / y)
	else:
		tmp = 0.16666666666666666 * (math.sin(x) * (y * y))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 90.0)
		tmp = sin(x);
	elseif (y <= 2.85e+69)
		tmp = Float64(Float64(x * sinh(y)) / y);
	elseif (y <= 7e+87)
		tmp = Float64(x + Float64(-0.16666666666666666 * (x ^ 3.0)));
	elseif (y <= 1.35e+154)
		tmp = Float64(x * Float64(sinh(y) / y));
	else
		tmp = Float64(0.16666666666666666 * Float64(sin(x) * Float64(y * y)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 90.0)
		tmp = sin(x);
	elseif (y <= 2.85e+69)
		tmp = (x * sinh(y)) / y;
	elseif (y <= 7e+87)
		tmp = x + (-0.16666666666666666 * (x ^ 3.0));
	elseif (y <= 1.35e+154)
		tmp = x * (sinh(y) / y);
	else
		tmp = 0.16666666666666666 * (sin(x) * (y * y));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 90.0], N[Sin[x], $MachinePrecision], If[LessEqual[y, 2.85e+69], N[(N[(x * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7e+87], N[(x + N[(-0.16666666666666666 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+154], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[Sin[x], $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 90:\\
\;\;\;\;\sin x\\

\mathbf{elif}\;y \leq 2.85 \cdot 10^{+69}:\\
\;\;\;\;\frac{x \cdot \sinh y}{y}\\

\mathbf{elif}\;y \leq 7 \cdot 10^{+87}:\\
\;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\

\mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \frac{\sinh y}{y}\\

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


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

    1. Initial program 100.0%

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

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

    if 90 < y < 2.85e69

    1. Initial program 99.9%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num99.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr99.9%

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

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
    5. Step-by-step derivation
      1. associate-/r*73.2%

        \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      2. associate-*r/73.2%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      3. *-commutative73.2%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
      4. associate-/r/73.2%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
      5. rec-exp73.2%

        \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
      6. sinh-def73.2%

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

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{y}{\sinh y}}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/73.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sinh y}} \cdot x} \]
      2. clear-num73.2%

        \[\leadsto \color{blue}{\frac{\sinh y}{y}} \cdot x \]
    8. Applied egg-rr73.2%

      \[\leadsto \color{blue}{\frac{\sinh y}{y} \cdot x} \]
    9. Step-by-step derivation
      1. associate-*l/73.3%

        \[\leadsto \color{blue}{\frac{\sinh y \cdot x}{y}} \]
    10. Applied egg-rr73.3%

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

    if 2.85e69 < y < 6.99999999999999972e87

    1. Initial program 100.0%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num100.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr100.0%

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

      \[\leadsto \frac{1}{\color{blue}{\frac{1}{\sin x}}} \]
    5. Taylor expanded in x around 0 75.9%

      \[\leadsto \color{blue}{-0.16666666666666666 \cdot {x}^{3} + x} \]

    if 6.99999999999999972e87 < y < 1.35000000000000003e154

    1. Initial program 100.0%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num100.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr100.0%

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

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
    5. Step-by-step derivation
      1. associate-/r*76.5%

        \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      2. associate-*r/76.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      3. *-commutative76.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
      4. associate-/r/76.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
      5. rec-exp76.5%

        \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
      6. sinh-def76.5%

        \[\leadsto \frac{1}{\frac{\frac{y}{\color{blue}{\sinh y}}}{x}} \]
    6. Simplified76.5%

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{y}{\sinh y}}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/76.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sinh y}} \cdot x} \]
      2. clear-num76.5%

        \[\leadsto \color{blue}{\frac{\sinh y}{y}} \cdot x \]
    8. Applied egg-rr76.5%

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

    if 1.35000000000000003e154 < y

    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) \]
    7. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 90:\\ \;\;\;\;\sin x\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{+69}:\\ \;\;\;\;\frac{x \cdot \sinh y}{y}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+87}:\\ \;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \frac{\sinh y}{y}\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(\sin x \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 6: 83.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 90:\\ \;\;\;\;\sin x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{+69}:\\ \;\;\;\;\frac{x \cdot \sinh y}{y}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+87}:\\ \;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \frac{\sinh y}{y}\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(\sin x \cdot \left(y \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y 90.0)
   (* (sin x) (+ 1.0 (* 0.16666666666666666 (* y y))))
   (if (<= y 2.85e+69)
     (/ (* x (sinh y)) y)
     (if (<= y 7e+87)
       (+ x (* -0.16666666666666666 (pow x 3.0)))
       (if (<= y 1.35e+154)
         (* x (/ (sinh y) y))
         (* 0.16666666666666666 (* (sin x) (* y y))))))))
double code(double x, double y) {
	double tmp;
	if (y <= 90.0) {
		tmp = sin(x) * (1.0 + (0.16666666666666666 * (y * y)));
	} else if (y <= 2.85e+69) {
		tmp = (x * sinh(y)) / y;
	} else if (y <= 7e+87) {
		tmp = x + (-0.16666666666666666 * pow(x, 3.0));
	} else if (y <= 1.35e+154) {
		tmp = x * (sinh(y) / y);
	} else {
		tmp = 0.16666666666666666 * (sin(x) * (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 <= 90.0d0) then
        tmp = sin(x) * (1.0d0 + (0.16666666666666666d0 * (y * y)))
    else if (y <= 2.85d+69) then
        tmp = (x * sinh(y)) / y
    else if (y <= 7d+87) then
        tmp = x + ((-0.16666666666666666d0) * (x ** 3.0d0))
    else if (y <= 1.35d+154) then
        tmp = x * (sinh(y) / y)
    else
        tmp = 0.16666666666666666d0 * (sin(x) * (y * y))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= 90.0) {
		tmp = Math.sin(x) * (1.0 + (0.16666666666666666 * (y * y)));
	} else if (y <= 2.85e+69) {
		tmp = (x * Math.sinh(y)) / y;
	} else if (y <= 7e+87) {
		tmp = x + (-0.16666666666666666 * Math.pow(x, 3.0));
	} else if (y <= 1.35e+154) {
		tmp = x * (Math.sinh(y) / y);
	} else {
		tmp = 0.16666666666666666 * (Math.sin(x) * (y * y));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 90.0:
		tmp = math.sin(x) * (1.0 + (0.16666666666666666 * (y * y)))
	elif y <= 2.85e+69:
		tmp = (x * math.sinh(y)) / y
	elif y <= 7e+87:
		tmp = x + (-0.16666666666666666 * math.pow(x, 3.0))
	elif y <= 1.35e+154:
		tmp = x * (math.sinh(y) / y)
	else:
		tmp = 0.16666666666666666 * (math.sin(x) * (y * y))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 90.0)
		tmp = Float64(sin(x) * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))));
	elseif (y <= 2.85e+69)
		tmp = Float64(Float64(x * sinh(y)) / y);
	elseif (y <= 7e+87)
		tmp = Float64(x + Float64(-0.16666666666666666 * (x ^ 3.0)));
	elseif (y <= 1.35e+154)
		tmp = Float64(x * Float64(sinh(y) / y));
	else
		tmp = Float64(0.16666666666666666 * Float64(sin(x) * Float64(y * y)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 90.0)
		tmp = sin(x) * (1.0 + (0.16666666666666666 * (y * y)));
	elseif (y <= 2.85e+69)
		tmp = (x * sinh(y)) / y;
	elseif (y <= 7e+87)
		tmp = x + (-0.16666666666666666 * (x ^ 3.0));
	elseif (y <= 1.35e+154)
		tmp = x * (sinh(y) / y);
	else
		tmp = 0.16666666666666666 * (sin(x) * (y * y));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 90.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.85e+69], N[(N[(x * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7e+87], N[(x + N[(-0.16666666666666666 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+154], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[Sin[x], $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 90:\\
\;\;\;\;\sin x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\

\mathbf{elif}\;y \leq 2.85 \cdot 10^{+69}:\\
\;\;\;\;\frac{x \cdot \sinh y}{y}\\

\mathbf{elif}\;y \leq 7 \cdot 10^{+87}:\\
\;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\

\mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \frac{\sinh y}{y}\\

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


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

    1. Initial program 100.0%

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

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

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

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

    if 90 < y < 2.85e69

    1. Initial program 99.9%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num99.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr99.9%

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

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
    5. Step-by-step derivation
      1. associate-/r*73.2%

        \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      2. associate-*r/73.2%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      3. *-commutative73.2%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
      4. associate-/r/73.2%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
      5. rec-exp73.2%

        \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
      6. sinh-def73.2%

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

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{y}{\sinh y}}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/73.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sinh y}} \cdot x} \]
      2. clear-num73.2%

        \[\leadsto \color{blue}{\frac{\sinh y}{y}} \cdot x \]
    8. Applied egg-rr73.2%

      \[\leadsto \color{blue}{\frac{\sinh y}{y} \cdot x} \]
    9. Step-by-step derivation
      1. associate-*l/73.3%

        \[\leadsto \color{blue}{\frac{\sinh y \cdot x}{y}} \]
    10. Applied egg-rr73.3%

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

    if 2.85e69 < y < 6.99999999999999972e87

    1. Initial program 100.0%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num100.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr100.0%

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

      \[\leadsto \frac{1}{\color{blue}{\frac{1}{\sin x}}} \]
    5. Taylor expanded in x around 0 75.9%

      \[\leadsto \color{blue}{-0.16666666666666666 \cdot {x}^{3} + x} \]

    if 6.99999999999999972e87 < y < 1.35000000000000003e154

    1. Initial program 100.0%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num100.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr100.0%

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

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
    5. Step-by-step derivation
      1. associate-/r*76.5%

        \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      2. associate-*r/76.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      3. *-commutative76.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
      4. associate-/r/76.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
      5. rec-exp76.5%

        \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
      6. sinh-def76.5%

        \[\leadsto \frac{1}{\frac{\frac{y}{\color{blue}{\sinh y}}}{x}} \]
    6. Simplified76.5%

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{y}{\sinh y}}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/76.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sinh y}} \cdot x} \]
      2. clear-num76.5%

        \[\leadsto \color{blue}{\frac{\sinh y}{y}} \cdot x \]
    8. Applied egg-rr76.5%

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

    if 1.35000000000000003e154 < y

    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) \]
    7. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 90:\\ \;\;\;\;\sin x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{+69}:\\ \;\;\;\;\frac{x \cdot \sinh y}{y}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+87}:\\ \;\;\;\;x + -0.16666666666666666 \cdot {x}^{3}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \frac{\sinh y}{y}\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(\sin x \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 7: 59.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\ \mathbf{if}\;y \leq 1.45 \cdot 10^{+38}:\\ \;\;\;\;\sin x\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+159}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+242}:\\ \;\;\;\;x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+270} \lor \neg \left(y \leq 2.9 \cdot 10^{+292}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (* x y) (* y -0.16666666666666666))))
   (if (<= y 1.45e+38)
     (sin x)
     (if (<= y 3.3e+159)
       t_0
       (if (<= y 7.6e+242)
         (* x (+ 1.0 (* 0.16666666666666666 (* y y))))
         (if (or (<= y 5.8e+270) (not (<= y 2.9e+292)))
           t_0
           (* 0.16666666666666666 (* x (* y y)))))))))
double code(double x, double y) {
	double t_0 = (x * y) * (y * -0.16666666666666666);
	double tmp;
	if (y <= 1.45e+38) {
		tmp = sin(x);
	} else if (y <= 3.3e+159) {
		tmp = t_0;
	} else if (y <= 7.6e+242) {
		tmp = x * (1.0 + (0.16666666666666666 * (y * y)));
	} else if ((y <= 5.8e+270) || !(y <= 2.9e+292)) {
		tmp = t_0;
	} else {
		tmp = 0.16666666666666666 * (x * (y * y));
	}
	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 = (x * y) * (y * (-0.16666666666666666d0))
    if (y <= 1.45d+38) then
        tmp = sin(x)
    else if (y <= 3.3d+159) then
        tmp = t_0
    else if (y <= 7.6d+242) then
        tmp = x * (1.0d0 + (0.16666666666666666d0 * (y * y)))
    else if ((y <= 5.8d+270) .or. (.not. (y <= 2.9d+292))) then
        tmp = t_0
    else
        tmp = 0.16666666666666666d0 * (x * (y * y))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = (x * y) * (y * -0.16666666666666666);
	double tmp;
	if (y <= 1.45e+38) {
		tmp = Math.sin(x);
	} else if (y <= 3.3e+159) {
		tmp = t_0;
	} else if (y <= 7.6e+242) {
		tmp = x * (1.0 + (0.16666666666666666 * (y * y)));
	} else if ((y <= 5.8e+270) || !(y <= 2.9e+292)) {
		tmp = t_0;
	} else {
		tmp = 0.16666666666666666 * (x * (y * y));
	}
	return tmp;
}
def code(x, y):
	t_0 = (x * y) * (y * -0.16666666666666666)
	tmp = 0
	if y <= 1.45e+38:
		tmp = math.sin(x)
	elif y <= 3.3e+159:
		tmp = t_0
	elif y <= 7.6e+242:
		tmp = x * (1.0 + (0.16666666666666666 * (y * y)))
	elif (y <= 5.8e+270) or not (y <= 2.9e+292):
		tmp = t_0
	else:
		tmp = 0.16666666666666666 * (x * (y * y))
	return tmp
function code(x, y)
	t_0 = Float64(Float64(x * y) * Float64(y * -0.16666666666666666))
	tmp = 0.0
	if (y <= 1.45e+38)
		tmp = sin(x);
	elseif (y <= 3.3e+159)
		tmp = t_0;
	elseif (y <= 7.6e+242)
		tmp = Float64(x * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))));
	elseif ((y <= 5.8e+270) || !(y <= 2.9e+292))
		tmp = t_0;
	else
		tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (x * y) * (y * -0.16666666666666666);
	tmp = 0.0;
	if (y <= 1.45e+38)
		tmp = sin(x);
	elseif (y <= 3.3e+159)
		tmp = t_0;
	elseif (y <= 7.6e+242)
		tmp = x * (1.0 + (0.16666666666666666 * (y * y)));
	elseif ((y <= 5.8e+270) || ~((y <= 2.9e+292)))
		tmp = t_0;
	else
		tmp = 0.16666666666666666 * (x * (y * y));
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * y), $MachinePrecision] * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.45e+38], N[Sin[x], $MachinePrecision], If[LessEqual[y, 3.3e+159], t$95$0, If[LessEqual[y, 7.6e+242], N[(x * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 5.8e+270], N[Not[LessEqual[y, 2.9e+292]], $MachinePrecision]], t$95$0, N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+159}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq 7.6 \cdot 10^{+242}:\\
\;\;\;\;x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+270} \lor \neg \left(y \leq 2.9 \cdot 10^{+292}\right):\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < 1.45000000000000003e38

    1. Initial program 100.0%

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

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

    if 1.45000000000000003e38 < y < 3.2999999999999999e159 or 7.60000000000000015e242 < y < 5.7999999999999998e270 or 2.89999999999999991e292 < y

    1. Initial program 100.0%

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

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

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified33.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 15.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)} \]
      5. *-commutative15.6%

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

      \[\leadsto \color{blue}{x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u6.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)\right)} \]
      2. expm1-udef6.3%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)} - 1} \]
      3. add-sqr-sqrt6.3%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\sqrt{0.16666666666666666 \cdot \left(y \cdot y\right)} \cdot \sqrt{0.16666666666666666 \cdot \left(y \cdot y\right)}\right)}\right)} - 1 \]
      4. sqrt-unprod24.5%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\sqrt{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      5. swap-sqr24.5%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      6. metadata-eval24.5%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{0.027777777777777776} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      7. metadata-eval24.5%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(-0.16666666666666666 \cdot -0.16666666666666666\right)} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      8. swap-sqr24.5%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      9. *-commutative24.5%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)} \cdot \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      10. *-commutative24.5%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)}}\right)} - 1 \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\sqrt{\left(y \cdot y\right) \cdot -0.16666666666666666} \cdot \sqrt{\left(y \cdot y\right) \cdot -0.16666666666666666}\right)}\right)} - 1 \]
      12. add-sqr-sqrt22.3%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)}\right)} - 1 \]
      13. associate-*l*22.3%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)}\right)} - 1 \]
    12. Applied egg-rr22.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def22.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)\right)\right)} \]
      2. expm1-log1p30.7%

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

        \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)} \]
    14. Simplified30.7%

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

    if 3.2999999999999999e159 < y < 7.60000000000000015e242

    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 91.7%

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

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

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

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

    if 5.7999999999999998e270 < y < 2.89999999999999991e292

    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) \]
    7. Simplified100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.45 \cdot 10^{+38}:\\ \;\;\;\;\sin x\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+159}:\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+242}:\\ \;\;\;\;x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+270} \lor \neg \left(y \leq 2.9 \cdot 10^{+292}\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 8: 35.7% accurate, 11.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 5 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+159} \lor \neg \left(y \leq 7.6 \cdot 10^{+242} \lor \neg \left(y \leq 6 \cdot 10^{+270}\right) \land y \leq 2.2 \cdot 10^{+292}\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y 5e-5)
   x
   (if (or (<= y 3.4e+159)
           (not
            (or (<= y 7.6e+242) (and (not (<= y 6e+270)) (<= y 2.2e+292)))))
     (* (* x y) (* y -0.16666666666666666))
     (* 0.16666666666666666 (* x (* y y))))))
double code(double x, double y) {
	double tmp;
	if (y <= 5e-5) {
		tmp = x;
	} else if ((y <= 3.4e+159) || !((y <= 7.6e+242) || (!(y <= 6e+270) && (y <= 2.2e+292)))) {
		tmp = (x * y) * (y * -0.16666666666666666);
	} else {
		tmp = 0.16666666666666666 * (x * (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 <= 5d-5) then
        tmp = x
    else if ((y <= 3.4d+159) .or. (.not. (y <= 7.6d+242) .or. (.not. (y <= 6d+270)) .and. (y <= 2.2d+292))) then
        tmp = (x * y) * (y * (-0.16666666666666666d0))
    else
        tmp = 0.16666666666666666d0 * (x * (y * y))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= 5e-5) {
		tmp = x;
	} else if ((y <= 3.4e+159) || !((y <= 7.6e+242) || (!(y <= 6e+270) && (y <= 2.2e+292)))) {
		tmp = (x * y) * (y * -0.16666666666666666);
	} else {
		tmp = 0.16666666666666666 * (x * (y * y));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 5e-5:
		tmp = x
	elif (y <= 3.4e+159) or not ((y <= 7.6e+242) or (not (y <= 6e+270) and (y <= 2.2e+292))):
		tmp = (x * y) * (y * -0.16666666666666666)
	else:
		tmp = 0.16666666666666666 * (x * (y * y))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 5e-5)
		tmp = x;
	elseif ((y <= 3.4e+159) || !((y <= 7.6e+242) || (!(y <= 6e+270) && (y <= 2.2e+292))))
		tmp = Float64(Float64(x * y) * Float64(y * -0.16666666666666666));
	else
		tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 5e-5)
		tmp = x;
	elseif ((y <= 3.4e+159) || ~(((y <= 7.6e+242) || (~((y <= 6e+270)) && (y <= 2.2e+292)))))
		tmp = (x * y) * (y * -0.16666666666666666);
	else
		tmp = 0.16666666666666666 * (x * (y * y));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 5e-5], x, If[Or[LessEqual[y, 3.4e+159], N[Not[Or[LessEqual[y, 7.6e+242], And[N[Not[LessEqual[y, 6e+270]], $MachinePrecision], LessEqual[y, 2.2e+292]]]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+159} \lor \neg \left(y \leq 7.6 \cdot 10^{+242} \lor \neg \left(y \leq 6 \cdot 10^{+270}\right) \land y \leq 2.2 \cdot 10^{+292}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 5.00000000000000024e-5

    1. Initial program 100.0%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/87.4%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num87.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr87.3%

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

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
    5. Step-by-step derivation
      1. associate-/r*29.9%

        \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      2. associate-*r/29.9%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      3. *-commutative29.9%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
      4. associate-/r/29.9%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
      5. rec-exp29.9%

        \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
      6. sinh-def57.6%

        \[\leadsto \frac{1}{\frac{\frac{y}{\color{blue}{\sinh y}}}{x}} \]
    6. Simplified57.6%

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

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

    if 5.00000000000000024e-5 < y < 3.39999999999999991e159 or 7.60000000000000015e242 < y < 6.00000000000000028e270 or 2.19999999999999985e292 < y

    1. Initial program 100.0%

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

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

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified26.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 12.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)\right)} \]
      2. expm1-udef5.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)} - 1} \]
      3. add-sqr-sqrt5.1%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\sqrt{0.16666666666666666 \cdot \left(y \cdot y\right)} \cdot \sqrt{0.16666666666666666 \cdot \left(y \cdot y\right)}\right)}\right)} - 1 \]
      4. sqrt-unprod18.8%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\sqrt{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      5. swap-sqr18.8%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      6. metadata-eval18.8%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{0.027777777777777776} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      7. metadata-eval18.8%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(-0.16666666666666666 \cdot -0.16666666666666666\right)} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      8. swap-sqr18.8%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      9. *-commutative18.8%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)} \cdot \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      10. *-commutative18.8%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)}}\right)} - 1 \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\sqrt{\left(y \cdot y\right) \cdot -0.16666666666666666} \cdot \sqrt{\left(y \cdot y\right) \cdot -0.16666666666666666}\right)}\right)} - 1 \]
      12. add-sqr-sqrt17.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)}\right)} - 1 \]
      13. associate-*l*17.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)}\right)} - 1 \]
    12. Applied egg-rr17.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def17.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)\right)\right)} \]
      2. expm1-log1p23.9%

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

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

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

    if 3.39999999999999991e159 < y < 7.60000000000000015e242 or 6.00000000000000028e270 < y < 2.19999999999999985e292

    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) \]
    7. Simplified100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+159} \lor \neg \left(y \leq 7.6 \cdot 10^{+242} \lor \neg \left(y \leq 6 \cdot 10^{+270}\right) \land y \leq 2.2 \cdot 10^{+292}\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 9: 48.8% accurate, 11.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\ \mathbf{if}\;x \leq -2.95 \cdot 10^{+134}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -6.7 \cdot 10^{+72}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{+22} \lor \neg \left(x \leq 6.5 \cdot 10^{+57}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (* x y) (* y -0.16666666666666666))))
   (if (<= x -2.95e+134)
     t_0
     (if (<= x -6.7e+72)
       (* 0.16666666666666666 (* x (* y y)))
       (if (or (<= x -1.6e+22) (not (<= x 6.5e+57)))
         t_0
         (* x (+ 1.0 (* 0.16666666666666666 (* y y)))))))))
double code(double x, double y) {
	double t_0 = (x * y) * (y * -0.16666666666666666);
	double tmp;
	if (x <= -2.95e+134) {
		tmp = t_0;
	} else if (x <= -6.7e+72) {
		tmp = 0.16666666666666666 * (x * (y * y));
	} else if ((x <= -1.6e+22) || !(x <= 6.5e+57)) {
		tmp = t_0;
	} else {
		tmp = x * (1.0 + (0.16666666666666666 * (y * y)));
	}
	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 = (x * y) * (y * (-0.16666666666666666d0))
    if (x <= (-2.95d+134)) then
        tmp = t_0
    else if (x <= (-6.7d+72)) then
        tmp = 0.16666666666666666d0 * (x * (y * y))
    else if ((x <= (-1.6d+22)) .or. (.not. (x <= 6.5d+57))) then
        tmp = t_0
    else
        tmp = x * (1.0d0 + (0.16666666666666666d0 * (y * y)))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = (x * y) * (y * -0.16666666666666666);
	double tmp;
	if (x <= -2.95e+134) {
		tmp = t_0;
	} else if (x <= -6.7e+72) {
		tmp = 0.16666666666666666 * (x * (y * y));
	} else if ((x <= -1.6e+22) || !(x <= 6.5e+57)) {
		tmp = t_0;
	} else {
		tmp = x * (1.0 + (0.16666666666666666 * (y * y)));
	}
	return tmp;
}
def code(x, y):
	t_0 = (x * y) * (y * -0.16666666666666666)
	tmp = 0
	if x <= -2.95e+134:
		tmp = t_0
	elif x <= -6.7e+72:
		tmp = 0.16666666666666666 * (x * (y * y))
	elif (x <= -1.6e+22) or not (x <= 6.5e+57):
		tmp = t_0
	else:
		tmp = x * (1.0 + (0.16666666666666666 * (y * y)))
	return tmp
function code(x, y)
	t_0 = Float64(Float64(x * y) * Float64(y * -0.16666666666666666))
	tmp = 0.0
	if (x <= -2.95e+134)
		tmp = t_0;
	elseif (x <= -6.7e+72)
		tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y)));
	elseif ((x <= -1.6e+22) || !(x <= 6.5e+57))
		tmp = t_0;
	else
		tmp = Float64(x * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (x * y) * (y * -0.16666666666666666);
	tmp = 0.0;
	if (x <= -2.95e+134)
		tmp = t_0;
	elseif (x <= -6.7e+72)
		tmp = 0.16666666666666666 * (x * (y * y));
	elseif ((x <= -1.6e+22) || ~((x <= 6.5e+57)))
		tmp = t_0;
	else
		tmp = x * (1.0 + (0.16666666666666666 * (y * y)));
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * y), $MachinePrecision] * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.95e+134], t$95$0, If[LessEqual[x, -6.7e+72], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.6e+22], N[Not[LessEqual[x, 6.5e+57]], $MachinePrecision]], t$95$0, N[(x * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq -1.6 \cdot 10^{+22} \lor \neg \left(x \leq 6.5 \cdot 10^{+57}\right):\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.95000000000000004e134 or -6.6999999999999998e72 < x < -1.6e22 or 6.4999999999999997e57 < x

    1. Initial program 99.9%

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

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

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified81.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 17.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u9.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)\right)} \]
      2. expm1-udef9.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)} - 1} \]
      3. add-sqr-sqrt9.1%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\sqrt{0.16666666666666666 \cdot \left(y \cdot y\right)} \cdot \sqrt{0.16666666666666666 \cdot \left(y \cdot y\right)}\right)}\right)} - 1 \]
      4. sqrt-unprod9.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\sqrt{\left(0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      5. swap-sqr9.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(0.16666666666666666 \cdot 0.16666666666666666\right) \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      6. metadata-eval9.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{0.027777777777777776} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      7. metadata-eval9.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(-0.16666666666666666 \cdot -0.16666666666666666\right)} \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      8. swap-sqr9.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}\right)} - 1 \]
      9. *-commutative9.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)} \cdot \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right)}\right)} - 1 \]
      10. *-commutative9.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \sqrt{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)}}\right)} - 1 \]
      11. sqrt-unprod0.5%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\sqrt{\left(y \cdot y\right) \cdot -0.16666666666666666} \cdot \sqrt{\left(y \cdot y\right) \cdot -0.16666666666666666}\right)}\right)} - 1 \]
      12. add-sqr-sqrt22.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)}\right)} - 1 \]
      13. associate-*l*22.2%

        \[\leadsto e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)}\right)} - 1 \]
    12. Applied egg-rr22.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def22.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot \left(y \cdot -0.16666666666666666\right)\right)\right)\right)} \]
      2. expm1-log1p36.9%

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

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

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

    if -2.95000000000000004e134 < x < -6.6999999999999998e72

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.6e22 < x < 6.4999999999999997e57

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.95 \cdot 10^{+134}:\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\ \mathbf{elif}\;x \leq -6.7 \cdot 10^{+72}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{+22} \lor \neg \left(x \leq 6.5 \cdot 10^{+57}\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(y \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 10: 37.8% accurate, 22.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 90:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y 90.0) x (* 0.16666666666666666 (* x (* y y)))))
double code(double x, double y) {
	double tmp;
	if (y <= 90.0) {
		tmp = x;
	} else {
		tmp = 0.16666666666666666 * (x * (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 <= 90.0d0) then
        tmp = x
    else
        tmp = 0.16666666666666666d0 * (x * (y * y))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= 90.0) {
		tmp = x;
	} else {
		tmp = 0.16666666666666666 * (x * (y * y));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 90.0:
		tmp = x
	else:
		tmp = 0.16666666666666666 * (x * (y * y))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 90.0)
		tmp = x;
	else
		tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 90.0)
		tmp = x;
	else
		tmp = 0.16666666666666666 * (x * (y * y));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 90.0], x, N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 90:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 90

    1. Initial program 100.0%

      \[\sin x \cdot \frac{\sinh y}{y} \]
    2. Step-by-step derivation
      1. associate-*r/87.6%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
      2. clear-num87.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
    3. Applied egg-rr87.4%

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

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
    5. Step-by-step derivation
      1. associate-/r*29.6%

        \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      2. associate-*r/29.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
      3. *-commutative29.6%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
      4. associate-/r/29.6%

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
      5. rec-exp29.7%

        \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
      6. sinh-def57.0%

        \[\leadsto \frac{1}{\frac{\frac{y}{\color{blue}{\sinh y}}}{x}} \]
    6. Simplified57.0%

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

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

    if 90 < y

    1. Initial program 100.0%

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

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

        \[\leadsto \sin x \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    4. Simplified43.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 43.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 90:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 11: 27.1% 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. Step-by-step derivation
    1. associate-*r/90.5%

      \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{y}} \]
    2. clear-num90.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin x \cdot \sinh y}}} \]
  3. Applied egg-rr90.4%

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

    \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{y}{\left(e^{y} - \frac{1}{e^{y}}\right) \cdot x}}} \]
  5. Step-by-step derivation
    1. associate-/r*38.2%

      \[\leadsto \frac{1}{2 \cdot \color{blue}{\frac{\frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
    2. associate-*r/38.2%

      \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot \frac{y}{e^{y} - \frac{1}{e^{y}}}}{x}}} \]
    3. *-commutative38.2%

      \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{e^{y} - \frac{1}{e^{y}}} \cdot 2}}{x}} \]
    4. associate-/r/38.2%

      \[\leadsto \frac{1}{\frac{\color{blue}{\frac{y}{\frac{e^{y} - \frac{1}{e^{y}}}{2}}}}{x}} \]
    5. rec-exp38.2%

      \[\leadsto \frac{1}{\frac{\frac{y}{\frac{e^{y} - \color{blue}{e^{-y}}}{2}}}{x}} \]
    6. sinh-def59.0%

      \[\leadsto \frac{1}{\frac{\frac{y}{\color{blue}{\sinh y}}}{x}} \]
  6. Simplified59.0%

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

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

    \[\leadsto x \]

Reproduce

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