Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 88.9% → 99.9%
Time: 9.9s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 88.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
  4. Final simplification99.9%

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

Alternative 2: 86.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\ \;\;\;\;\sin x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (sinh y) (- INFINITY))
   (sinh y)
   (if (<= (sinh y) 2e-12) (* (sin x) (/ y x)) (sinh y))))
double code(double x, double y) {
	double tmp;
	if (sinh(y) <= -((double) INFINITY)) {
		tmp = sinh(y);
	} else if (sinh(y) <= 2e-12) {
		tmp = sin(x) * (y / x);
	} else {
		tmp = sinh(y);
	}
	return tmp;
}
public static double code(double x, double y) {
	double tmp;
	if (Math.sinh(y) <= -Double.POSITIVE_INFINITY) {
		tmp = Math.sinh(y);
	} else if (Math.sinh(y) <= 2e-12) {
		tmp = Math.sin(x) * (y / x);
	} else {
		tmp = Math.sinh(y);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if math.sinh(y) <= -math.inf:
		tmp = math.sinh(y)
	elif math.sinh(y) <= 2e-12:
		tmp = math.sin(x) * (y / x)
	else:
		tmp = math.sinh(y)
	return tmp
function code(x, y)
	tmp = 0.0
	if (sinh(y) <= Float64(-Inf))
		tmp = sinh(y);
	elseif (sinh(y) <= 2e-12)
		tmp = Float64(sin(x) * Float64(y / x));
	else
		tmp = sinh(y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (sinh(y) <= -Inf)
		tmp = sinh(y);
	elseif (sinh(y) <= 2e-12)
		tmp = sin(x) * (y / x);
	else
		tmp = sinh(y);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], (-Infinity)], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 2e-12], N[(N[Sin[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -\infty:\\
\;\;\;\;\sinh y\\

\mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\
\;\;\;\;\sin x \cdot \frac{y}{x}\\

\mathbf{else}:\\
\;\;\;\;\sinh y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (sinh.f64 y) < -inf.0 or 1.99999999999999996e-12 < (sinh.f64 y)

    1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

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

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

    if -inf.0 < (sinh.f64 y) < 1.99999999999999996e-12

    1. Initial program 71.2%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/99.4%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \sin x} \]
    6. Simplified99.4%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \sin x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\ \;\;\;\;\sin x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]

Alternative 3: 86.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (sinh y) (- INFINITY))
   (sinh y)
   (if (<= (sinh y) 2e-12) (* (/ (sin x) x) y) (sinh y))))
double code(double x, double y) {
	double tmp;
	if (sinh(y) <= -((double) INFINITY)) {
		tmp = sinh(y);
	} else if (sinh(y) <= 2e-12) {
		tmp = (sin(x) / x) * y;
	} else {
		tmp = sinh(y);
	}
	return tmp;
}
public static double code(double x, double y) {
	double tmp;
	if (Math.sinh(y) <= -Double.POSITIVE_INFINITY) {
		tmp = Math.sinh(y);
	} else if (Math.sinh(y) <= 2e-12) {
		tmp = (Math.sin(x) / x) * y;
	} else {
		tmp = Math.sinh(y);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if math.sinh(y) <= -math.inf:
		tmp = math.sinh(y)
	elif math.sinh(y) <= 2e-12:
		tmp = (math.sin(x) / x) * y
	else:
		tmp = math.sinh(y)
	return tmp
function code(x, y)
	tmp = 0.0
	if (sinh(y) <= Float64(-Inf))
		tmp = sinh(y);
	elseif (sinh(y) <= 2e-12)
		tmp = Float64(Float64(sin(x) / x) * y);
	else
		tmp = sinh(y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (sinh(y) <= -Inf)
		tmp = sinh(y);
	elseif (sinh(y) <= 2e-12)
		tmp = (sin(x) / x) * y;
	else
		tmp = sinh(y);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], (-Infinity)], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 2e-12], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -\infty:\\
\;\;\;\;\sinh y\\

\mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\\

\mathbf{else}:\\
\;\;\;\;\sinh y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (sinh.f64 y) < -inf.0 or 1.99999999999999996e-12 < (sinh.f64 y)

    1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

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

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

    if -inf.0 < (sinh.f64 y) < 1.99999999999999996e-12

    1. Initial program 71.2%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
    6. Simplified99.6%

      \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
    7. Step-by-step derivation
      1. clear-num99.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{x}{\sin x}}{y}}} \]
      2. associate-/r/99.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{x}{\sin x}} \cdot y} \]
      3. clear-num99.6%

        \[\leadsto \color{blue}{\frac{\sin x}{x}} \cdot y \]
    8. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]

Alternative 4: 86.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{\frac{x}{\sin x}}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (sinh y) (- INFINITY))
   (sinh y)
   (if (<= (sinh y) 2e-12) (/ y (/ x (sin x))) (sinh y))))
double code(double x, double y) {
	double tmp;
	if (sinh(y) <= -((double) INFINITY)) {
		tmp = sinh(y);
	} else if (sinh(y) <= 2e-12) {
		tmp = y / (x / sin(x));
	} else {
		tmp = sinh(y);
	}
	return tmp;
}
public static double code(double x, double y) {
	double tmp;
	if (Math.sinh(y) <= -Double.POSITIVE_INFINITY) {
		tmp = Math.sinh(y);
	} else if (Math.sinh(y) <= 2e-12) {
		tmp = y / (x / Math.sin(x));
	} else {
		tmp = Math.sinh(y);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if math.sinh(y) <= -math.inf:
		tmp = math.sinh(y)
	elif math.sinh(y) <= 2e-12:
		tmp = y / (x / math.sin(x))
	else:
		tmp = math.sinh(y)
	return tmp
function code(x, y)
	tmp = 0.0
	if (sinh(y) <= Float64(-Inf))
		tmp = sinh(y);
	elseif (sinh(y) <= 2e-12)
		tmp = Float64(y / Float64(x / sin(x)));
	else
		tmp = sinh(y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (sinh(y) <= -Inf)
		tmp = sinh(y);
	elseif (sinh(y) <= 2e-12)
		tmp = y / (x / sin(x));
	else
		tmp = sinh(y);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], (-Infinity)], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 2e-12], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -\infty:\\
\;\;\;\;\sinh y\\

\mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\

\mathbf{else}:\\
\;\;\;\;\sinh y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (sinh.f64 y) < -inf.0 or 1.99999999999999996e-12 < (sinh.f64 y)

    1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

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

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

    if -inf.0 < (sinh.f64 y) < 1.99999999999999996e-12

    1. Initial program 71.2%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
    6. Simplified99.6%

      \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 2 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{\frac{x}{\sin x}}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]

Alternative 5: 74.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -\infty:\\
\;\;\;\;\sinh y\\

\mathbf{elif}\;\sinh y \leq 10^{-114}:\\
\;\;\;\;\frac{\frac{y}{x}}{x \cdot 0.16666666666666666 + \frac{1}{x}}\\

\mathbf{else}:\\
\;\;\;\;\sinh y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (sinh.f64 y) < -inf.0 or 1.0000000000000001e-114 < (sinh.f64 y)

    1. Initial program 98.1%

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

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

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

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

    if -inf.0 < (sinh.f64 y) < 1.0000000000000001e-114

    1. Initial program 67.8%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/99.4%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \sin x} \]
    6. Simplified99.4%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. div-inv99.3%

        \[\leadsto \frac{y}{\color{blue}{x \cdot \frac{1}{\sin x}}} \]
      3. associate-/r*99.2%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{\frac{1}{\sin x}}} \]
    8. Applied egg-rr99.2%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{\frac{1}{\sin x}}} \]
    9. Taylor expanded in x around 0 81.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 10^{-114}:\\ \;\;\;\;\frac{\frac{y}{x}}{x \cdot 0.16666666666666666 + \frac{1}{x}}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]

Alternative 6: 99.8% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
  4. Final simplification99.9%

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

Alternative 7: 55.1% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+179}:\\ \;\;\;\;\frac{y \cdot \left(-y\right)}{y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) - y}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{+166} \lor \neg \left(y \leq 1.25 \cdot 10^{+169}\right):\\ \;\;\;\;\sqrt{y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{\frac{x}{y}}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y -2.2e+179)
   (/ (* y (- y)) (- (* y (* x (* x -0.16666666666666666))) y))
   (if (or (<= y -7.5e+166) (not (<= y 1.25e+169)))
     (sqrt (* y y))
     (* x (/ 1.0 (/ x y))))))
double code(double x, double y) {
	double tmp;
	if (y <= -2.2e+179) {
		tmp = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y);
	} else if ((y <= -7.5e+166) || !(y <= 1.25e+169)) {
		tmp = sqrt((y * y));
	} else {
		tmp = x * (1.0 / (x / 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.2d+179)) then
        tmp = (y * -y) / ((y * (x * (x * (-0.16666666666666666d0)))) - y)
    else if ((y <= (-7.5d+166)) .or. (.not. (y <= 1.25d+169))) then
        tmp = sqrt((y * y))
    else
        tmp = x * (1.0d0 / (x / y))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= -2.2e+179) {
		tmp = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y);
	} else if ((y <= -7.5e+166) || !(y <= 1.25e+169)) {
		tmp = Math.sqrt((y * y));
	} else {
		tmp = x * (1.0 / (x / y));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= -2.2e+179:
		tmp = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y)
	elif (y <= -7.5e+166) or not (y <= 1.25e+169):
		tmp = math.sqrt((y * y))
	else:
		tmp = x * (1.0 / (x / y))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= -2.2e+179)
		tmp = Float64(Float64(y * Float64(-y)) / Float64(Float64(y * Float64(x * Float64(x * -0.16666666666666666))) - y));
	elseif ((y <= -7.5e+166) || !(y <= 1.25e+169))
		tmp = sqrt(Float64(y * y));
	else
		tmp = Float64(x * Float64(1.0 / Float64(x / y)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= -2.2e+179)
		tmp = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y);
	elseif ((y <= -7.5e+166) || ~((y <= 1.25e+169)))
		tmp = sqrt((y * y));
	else
		tmp = x * (1.0 / (x / y));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, -2.2e+179], N[(N[(y * (-y)), $MachinePrecision] / N[(N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -7.5e+166], N[Not[LessEqual[y, 1.25e+169]], $MachinePrecision]], N[Sqrt[N[(y * y), $MachinePrecision]], $MachinePrecision], N[(x * N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.5 \cdot 10^{+166} \lor \neg \left(y \leq 1.25 \cdot 10^{+169}\right):\\
\;\;\;\;\sqrt{y \cdot y}\\

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


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

    1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified100.0%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/59.2%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \sin x} \]
    6. Simplified59.2%

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

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

        \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + y} \]
      2. remove-double-neg14.5%

        \[\leadsto -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + \color{blue}{\left(-\left(-y\right)\right)} \]
      3. unsub-neg14.5%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, {x}^{2} \cdot -0.16666666666666666, -\left(-y\right)\right)} \]
      7. unpow214.5%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666, -\left(-y\right)\right) \]
      8. remove-double-neg14.5%

        \[\leadsto \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, \color{blue}{y}\right) \]
    9. Simplified14.5%

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

        \[\leadsto \color{blue}{y \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) + y} \]
      2. flip-+47.6%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\color{blue}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)} \cdot y - y} \]
    11. Applied egg-rr47.6%

      \[\leadsto \color{blue}{\frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y - y}} \]
    12. Taylor expanded in x around 0 66.7%

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

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(y \cdot y\right)}}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y - y} \]
      2. neg-mul-166.7%

        \[\leadsto \frac{\color{blue}{-y \cdot y}}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y - y} \]
      3. distribute-rgt-neg-in66.7%

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

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

    if -2.2e179 < y < -7.50000000000000029e166 or 1.25000000000000004e169 < y

    1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified100.0%

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x}}{x} \]
    6. Step-by-step derivation
      1. div-inv22.5%

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

        \[\leadsto \color{blue}{y \cdot \left(x \cdot \frac{1}{x}\right)} \]
      3. div-inv4.6%

        \[\leadsto y \cdot \color{blue}{\frac{x}{x}} \]
      4. *-inverses4.6%

        \[\leadsto y \cdot \color{blue}{1} \]
      5. *-commutative4.6%

        \[\leadsto \color{blue}{1 \cdot y} \]
      6. *-un-lft-identity4.6%

        \[\leadsto \color{blue}{y} \]
      7. add-sqr-sqrt4.5%

        \[\leadsto \color{blue}{\sqrt{y} \cdot \sqrt{y}} \]
      8. sqrt-unprod80.6%

        \[\leadsto \color{blue}{\sqrt{y \cdot y}} \]
    7. Applied egg-rr80.6%

      \[\leadsto \color{blue}{\sqrt{y \cdot y}} \]

    if -7.50000000000000029e166 < y < 1.25000000000000004e169

    1. Initial program 82.5%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x}}{x} \]
    6. Step-by-step derivation
      1. div-inv26.2%

        \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot \frac{1}{x}} \]
      2. *-commutative26.2%

        \[\leadsto \color{blue}{\left(x \cdot y\right)} \cdot \frac{1}{x} \]
      3. associate-*l*58.3%

        \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{1}{x}\right)} \]
    7. Applied egg-rr58.3%

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{1}{x}\right)} \]
    8. Step-by-step derivation
      1. div-inv58.4%

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{x}{y}}} \]
    9. Applied egg-rr59.1%

      \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{x}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+179}:\\ \;\;\;\;\frac{y \cdot \left(-y\right)}{y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) - y}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{+166} \lor \neg \left(y \leq 1.25 \cdot 10^{+169}\right):\\ \;\;\;\;\sqrt{y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{\frac{x}{y}}\\ \end{array} \]

Alternative 8: 48.7% accurate, 13.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+137}:\\ \;\;\;\;\frac{x}{\frac{x}{y}}\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;y + \left(y \cdot -0.16666666666666666\right) \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -3.7e+137)
   (/ x (/ x y))
   (if (<= x -3.1e+91)
     (* x (* x (* y -0.16666666666666666)))
     (if (<= x 9e-92)
       (* x (/ y x))
       (+ y (* (* y -0.16666666666666666) (* x x)))))))
double code(double x, double y) {
	double tmp;
	if (x <= -3.7e+137) {
		tmp = x / (x / y);
	} else if (x <= -3.1e+91) {
		tmp = x * (x * (y * -0.16666666666666666));
	} else if (x <= 9e-92) {
		tmp = x * (y / x);
	} else {
		tmp = y + ((y * -0.16666666666666666) * (x * x));
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-3.7d+137)) then
        tmp = x / (x / y)
    else if (x <= (-3.1d+91)) then
        tmp = x * (x * (y * (-0.16666666666666666d0)))
    else if (x <= 9d-92) then
        tmp = x * (y / x)
    else
        tmp = y + ((y * (-0.16666666666666666d0)) * (x * x))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -3.7e+137) {
		tmp = x / (x / y);
	} else if (x <= -3.1e+91) {
		tmp = x * (x * (y * -0.16666666666666666));
	} else if (x <= 9e-92) {
		tmp = x * (y / x);
	} else {
		tmp = y + ((y * -0.16666666666666666) * (x * x));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -3.7e+137:
		tmp = x / (x / y)
	elif x <= -3.1e+91:
		tmp = x * (x * (y * -0.16666666666666666))
	elif x <= 9e-92:
		tmp = x * (y / x)
	else:
		tmp = y + ((y * -0.16666666666666666) * (x * x))
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -3.7e+137)
		tmp = Float64(x / Float64(x / y));
	elseif (x <= -3.1e+91)
		tmp = Float64(x * Float64(x * Float64(y * -0.16666666666666666)));
	elseif (x <= 9e-92)
		tmp = Float64(x * Float64(y / x));
	else
		tmp = Float64(y + Float64(Float64(y * -0.16666666666666666) * Float64(x * x)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -3.7e+137)
		tmp = x / (x / y);
	elseif (x <= -3.1e+91)
		tmp = x * (x * (y * -0.16666666666666666));
	elseif (x <= 9e-92)
		tmp = x * (y / x);
	else
		tmp = y + ((y * -0.16666666666666666) * (x * x));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -3.7e+137], N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.1e+91], N[(x * N[(x * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e-92], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(y * -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{+137}:\\
\;\;\;\;\frac{x}{\frac{x}{y}}\\

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

\mathbf{elif}\;x \leq 9 \cdot 10^{-92}:\\
\;\;\;\;x \cdot \frac{y}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.7000000000000002e137

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
      2. associate-/r/41.3%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
    7. Applied egg-rr41.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{x}} \]
      2. *-commutative25.8%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{x} \]
      3. associate-/l*43.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{x}{y}}} \]
    9. Applied egg-rr43.5%

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

    if -3.7000000000000002e137 < x < -3.09999999999999998e91

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/27.3%

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

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

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

        \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + y} \]
      2. remove-double-neg51.5%

        \[\leadsto -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + \color{blue}{\left(-\left(-y\right)\right)} \]
      3. unsub-neg51.5%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, {x}^{2} \cdot -0.16666666666666666, -\left(-y\right)\right)} \]
      7. unpow251.5%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666, -\left(-y\right)\right) \]
      8. remove-double-neg51.5%

        \[\leadsto \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, \color{blue}{y}\right) \]
    9. Simplified51.5%

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

        \[\leadsto \color{blue}{y \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) + y} \]
      2. flip-+13.1%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\color{blue}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)} \cdot y - y} \]
    11. Applied egg-rr13.1%

      \[\leadsto \color{blue}{\frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y - y}} \]
    12. Taylor expanded in x around inf 51.5%

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

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

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

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

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

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

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

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

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

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

    if -3.09999999999999998e91 < x < 9.0000000000000001e-92

    1. Initial program 75.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
      2. associate-/r/75.1%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
    7. Applied egg-rr75.1%

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

    if 9.0000000000000001e-92 < x

    1. Initial program 98.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/42.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+137}:\\ \;\;\;\;\frac{x}{\frac{x}{y}}\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;y + \left(y \cdot -0.16666666666666666\right) \cdot \left(x \cdot x\right)\\ \end{array} \]

Alternative 9: 48.8% accurate, 13.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+137}:\\ \;\;\;\;\frac{x}{\frac{x}{y}}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \left(y \cdot \left(x \cdot -0.16666666666666666\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -3.7e+137)
   (/ x (/ x y))
   (if (<= x -1.45e+90)
     (* x (* x (* y -0.16666666666666666)))
     (if (<= x 9.5e-92)
       (* x (/ y x))
       (+ y (* x (* y (* x -0.16666666666666666))))))))
double code(double x, double y) {
	double tmp;
	if (x <= -3.7e+137) {
		tmp = x / (x / y);
	} else if (x <= -1.45e+90) {
		tmp = x * (x * (y * -0.16666666666666666));
	} else if (x <= 9.5e-92) {
		tmp = x * (y / x);
	} else {
		tmp = y + (x * (y * (x * -0.16666666666666666)));
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-3.7d+137)) then
        tmp = x / (x / y)
    else if (x <= (-1.45d+90)) then
        tmp = x * (x * (y * (-0.16666666666666666d0)))
    else if (x <= 9.5d-92) then
        tmp = x * (y / x)
    else
        tmp = y + (x * (y * (x * (-0.16666666666666666d0))))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -3.7e+137) {
		tmp = x / (x / y);
	} else if (x <= -1.45e+90) {
		tmp = x * (x * (y * -0.16666666666666666));
	} else if (x <= 9.5e-92) {
		tmp = x * (y / x);
	} else {
		tmp = y + (x * (y * (x * -0.16666666666666666)));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -3.7e+137:
		tmp = x / (x / y)
	elif x <= -1.45e+90:
		tmp = x * (x * (y * -0.16666666666666666))
	elif x <= 9.5e-92:
		tmp = x * (y / x)
	else:
		tmp = y + (x * (y * (x * -0.16666666666666666)))
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -3.7e+137)
		tmp = Float64(x / Float64(x / y));
	elseif (x <= -1.45e+90)
		tmp = Float64(x * Float64(x * Float64(y * -0.16666666666666666)));
	elseif (x <= 9.5e-92)
		tmp = Float64(x * Float64(y / x));
	else
		tmp = Float64(y + Float64(x * Float64(y * Float64(x * -0.16666666666666666))));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -3.7e+137)
		tmp = x / (x / y);
	elseif (x <= -1.45e+90)
		tmp = x * (x * (y * -0.16666666666666666));
	elseif (x <= 9.5e-92)
		tmp = x * (y / x);
	else
		tmp = y + (x * (y * (x * -0.16666666666666666)));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -3.7e+137], N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e+90], N[(x * N[(x * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e-92], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(y + N[(x * N[(y * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{+137}:\\
\;\;\;\;\frac{x}{\frac{x}{y}}\\

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

\mathbf{elif}\;x \leq 9.5 \cdot 10^{-92}:\\
\;\;\;\;x \cdot \frac{y}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.7000000000000002e137

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
      2. associate-/r/41.3%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
    7. Applied egg-rr41.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{x}} \]
      2. *-commutative25.8%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{x} \]
      3. associate-/l*43.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{x}{y}}} \]
    9. Applied egg-rr43.5%

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

    if -3.7000000000000002e137 < x < -1.4500000000000001e90

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/27.3%

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

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

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

        \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + y} \]
      2. remove-double-neg51.5%

        \[\leadsto -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + \color{blue}{\left(-\left(-y\right)\right)} \]
      3. unsub-neg51.5%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, {x}^{2} \cdot -0.16666666666666666, -\left(-y\right)\right)} \]
      7. unpow251.5%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666, -\left(-y\right)\right) \]
      8. remove-double-neg51.5%

        \[\leadsto \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, \color{blue}{y}\right) \]
    9. Simplified51.5%

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

        \[\leadsto \color{blue}{y \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) + y} \]
      2. flip-+13.1%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\color{blue}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)} \cdot y - y} \]
    11. Applied egg-rr13.1%

      \[\leadsto \color{blue}{\frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y - y}} \]
    12. Taylor expanded in x around inf 51.5%

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

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

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

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

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

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

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

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

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

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

    if -1.4500000000000001e90 < x < 9.49999999999999946e-92

    1. Initial program 75.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
      2. associate-/r/75.1%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
    7. Applied egg-rr75.1%

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

    if 9.49999999999999946e-92 < x

    1. Initial program 98.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/42.6%

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

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

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

        \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + y} \]
      2. remove-double-neg40.5%

        \[\leadsto -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + \color{blue}{\left(-\left(-y\right)\right)} \]
      3. unsub-neg40.5%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, {x}^{2} \cdot -0.16666666666666666, -\left(-y\right)\right)} \]
      7. unpow240.5%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666, -\left(-y\right)\right) \]
      8. remove-double-neg40.5%

        \[\leadsto \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, \color{blue}{y}\right) \]
    9. Simplified40.5%

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

        \[\leadsto \color{blue}{y \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) + y} \]
      2. flip-+15.1%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\color{blue}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)} \cdot y - y} \]
    11. Applied egg-rr15.1%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(x \cdot -0.16666666666666666\right)\right)} + y \]
    13. Applied egg-rr40.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+137}:\\ \;\;\;\;\frac{x}{\frac{x}{y}}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \left(y \cdot \left(x \cdot -0.16666666666666666\right)\right)\\ \end{array} \]

Alternative 10: 49.2% accurate, 15.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+136}:\\
\;\;\;\;\frac{x}{\frac{x}{y}}\\

\mathbf{elif}\;x \leq -1.55 \cdot 10^{+90} \lor \neg \left(x \leq 48\right):\\
\;\;\;\;-0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.8000000000000001e136

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
      2. associate-/r/41.3%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
    7. Applied egg-rr41.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{x}} \]
      2. *-commutative25.8%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{x} \]
      3. associate-/l*43.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{x}{y}}} \]
    9. Applied egg-rr43.5%

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

    if -4.8000000000000001e136 < x < -1.54999999999999994e90 or 48 < x

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/33.0%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \sin x} \]
    6. Simplified33.0%

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

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

        \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + y} \]
      2. remove-double-neg34.4%

        \[\leadsto -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + \color{blue}{\left(-\left(-y\right)\right)} \]
      3. unsub-neg34.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666, -\left(-y\right)\right) \]
      8. remove-double-neg34.4%

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

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

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

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

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

    if -1.54999999999999994e90 < x < 48

    1. Initial program 78.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
      2. associate-/r/72.5%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
    7. Applied egg-rr72.5%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+136}:\\ \;\;\;\;\frac{x}{\frac{x}{y}}\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{+90} \lor \neg \left(x \leq 48\right):\\ \;\;\;\;-0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{x}\\ \end{array} \]

Alternative 11: 49.2% accurate, 15.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+136}:\\
\;\;\;\;\frac{x}{\frac{x}{y}}\\

\mathbf{elif}\;x \leq -1.45 \cdot 10^{+90} \lor \neg \left(x \leq 48\right):\\
\;\;\;\;x \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.8000000000000001e136

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
      2. associate-/r/41.3%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
    7. Applied egg-rr41.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{x}} \]
      2. *-commutative25.8%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{x} \]
      3. associate-/l*43.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{x}{y}}} \]
    9. Applied egg-rr43.5%

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

    if -4.8000000000000001e136 < x < -1.4500000000000001e90 or 48 < x

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
      2. associate-/r/33.0%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \sin x} \]
    6. Simplified33.0%

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

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

        \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + y} \]
      2. remove-double-neg34.4%

        \[\leadsto -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + \color{blue}{\left(-\left(-y\right)\right)} \]
      3. unsub-neg34.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666, -\left(-y\right)\right) \]
      8. remove-double-neg34.4%

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

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

        \[\leadsto \color{blue}{y \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right) + y} \]
      2. flip-+2.4%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\color{blue}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)} \cdot y - y} \]
    11. Applied egg-rr2.4%

      \[\leadsto \color{blue}{\frac{\left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y\right) - y \cdot y}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y - y}} \]
    12. Taylor expanded in x around inf 34.4%

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

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

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

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

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

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

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

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

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

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

    if -1.4500000000000001e90 < x < 48

    1. Initial program 78.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
      2. associate-/r/72.5%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
    7. Applied egg-rr72.5%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification60.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+136}:\\ \;\;\;\;\frac{x}{\frac{x}{y}}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{+90} \lor \neg \left(x \leq 48\right):\\ \;\;\;\;x \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{x}\\ \end{array} \]

Alternative 12: 49.7% accurate, 41.0× speedup?

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

\\
x \cdot \frac{y}{x}
\end{array}
Derivation
  1. Initial program 86.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{x}{x}}} \]
    2. associate-/r/55.6%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot x} \]
  7. Applied egg-rr55.6%

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

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

Alternative 13: 27.7% accurate, 205.0× speedup?

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

\\
y
\end{array}
Derivation
  1. Initial program 86.0%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{x}{\sin x}}} \]
    2. associate-/r/65.1%

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

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

    \[\leadsto \color{blue}{y} \]
  8. Final simplification33.0%

    \[\leadsto y \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023174 
(FPCore (x y)
  :name "Linear.Quaternion:$ccosh from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (* (sin x) (/ (sinh y) x))

  (/ (* (sin x) (sinh y)) x))