Linear.Quaternion:$ccos from linear-1.19.1.3

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

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 68.6% accurate, 1.8× speedup?

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

    if 0.0850000000000000061 < y < 1.64999999999999998e173

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if 1.64999999999999998e173 < 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) \]
      2. associate-*l*79.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 0.085:\\ \;\;\;\;\sin x\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+173}:\\ \;\;\;\;x \cdot \frac{\sinh y}{y}\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\sin x \cdot y\right)\right)\\ \end{array} \]

Alternative 3: 71.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 0.088:\\ \;\;\;\;\sin x\\ \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 0.088)
   (sin x)
   (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 <= 0.088) {
		tmp = sin(x);
	} 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 <= 0.088d0) then
        tmp = sin(x)
    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 <= 0.088) {
		tmp = Math.sin(x);
	} 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 <= 0.088:
		tmp = math.sin(x)
	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 <= 0.088)
		tmp = sin(x);
	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 <= 0.088)
		tmp = sin(x);
	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, 0.088], N[Sin[x], $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 0.088:\\
\;\;\;\;\sin x\\

\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 3 regimes
  2. if y < 0.087999999999999995

    1. Initial program 100.0%

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

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

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

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

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

    if 0.087999999999999995 < y < 1.35000000000000003e154

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{\frac{y}{\sin x}}} \]
    3. Simplified86.5%

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{y} \cdot x} \]
    6. Applied egg-rr81.1%

      \[\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) \]
      2. *-commutative100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 0.088:\\ \;\;\;\;\sin x\\ \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 4: 84.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 0.26:\\ \;\;\;\;\sin x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \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 0.26)
   (* (sin x) (+ 1.0 (* 0.16666666666666666 (* y y))))
   (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 <= 0.26) {
		tmp = sin(x) * (1.0 + (0.16666666666666666 * (y * y)));
	} 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 <= 0.26d0) then
        tmp = sin(x) * (1.0d0 + (0.16666666666666666d0 * (y * y)))
    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 <= 0.26) {
		tmp = Math.sin(x) * (1.0 + (0.16666666666666666 * (y * y)));
	} 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 <= 0.26:
		tmp = math.sin(x) * (1.0 + (0.16666666666666666 * (y * y)))
	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 <= 0.26)
		tmp = Float64(sin(x) * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))));
	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 <= 0.26)
		tmp = sin(x) * (1.0 + (0.16666666666666666 * (y * y)));
	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, 0.26], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $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 0.26:\\
\;\;\;\;\sin x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\

\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 3 regimes
  2. if y < 0.26000000000000001

    1. Initial program 100.0%

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

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

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

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

    if 0.26000000000000001 < y < 1.35000000000000003e154

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{\frac{y}{\sin x}}} \]
    3. Simplified86.5%

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{y} \cdot x} \]
    6. Applied egg-rr81.1%

      \[\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) \]
      2. *-commutative100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 0.26:\\ \;\;\;\;\sin x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \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 5: 68.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 0.085:\\ \;\;\;\;\sin x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\sinh y}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y 0.085) (sin x) (* x (/ (sinh y) y))))
double code(double x, double y) {
	double tmp;
	if (y <= 0.085) {
		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 (y <= 0.085d0) 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 (y <= 0.085) {
		tmp = Math.sin(x);
	} else {
		tmp = x * (Math.sinh(y) / y);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 0.085:
		tmp = math.sin(x)
	else:
		tmp = x * (math.sinh(y) / y)
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 0.085)
		tmp = sin(x);
	else
		tmp = Float64(x * Float64(sinh(y) / y));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 0.085)
		tmp = sin(x);
	else
		tmp = x * (sinh(y) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 0.085], N[Sin[x], $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

    if 0.0850000000000000061 < y

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{\frac{y}{\sin x}}} \]
    3. Simplified75.4%

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{y} \cdot x} \]
    6. Applied egg-rr84.1%

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

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

Alternative 6: 60.8% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

    if 0.440000000000000002 < y

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{\frac{y}{\sin x}}} \]
    3. Simplified75.4%

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{y} \cdot x} \]
    6. Applied egg-rr84.1%

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

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

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

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

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

Alternative 7: 33.7% accurate, 22.6× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \frac{\sinh y}{\color{blue}{\frac{y}{x}}} \]
    5. Taylor expanded in y around 0 31.3%

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

    if 8500 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 36.8% accurate, 22.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 8500:\\ \;\;\;\;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 8500.0) x (* 0.16666666666666666 (* x (* y y)))))
double code(double x, double y) {
	double tmp;
	if (y <= 8500.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 <= 8500.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 <= 8500.0) {
		tmp = x;
	} else {
		tmp = 0.16666666666666666 * (x * (y * y));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 8500.0:
		tmp = x
	else:
		tmp = 0.16666666666666666 * (x * (y * y))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 8500.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 <= 8500.0)
		tmp = x;
	else
		tmp = 0.16666666666666666 * (x * (y * y));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 8500.0], x, N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 8500:\\
\;\;\;\;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 < 8500

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \frac{\sinh y}{\color{blue}{\frac{y}{x}}} \]
    5. Taylor expanded in y around 0 31.3%

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

    if 8500 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 47.4% accurate, 22.8× speedup?

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

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

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

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

      \[\leadsto \color{blue}{\frac{\sinh y}{\frac{y}{\sin x}}} \]
  3. Simplified88.2%

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

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

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

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

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

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

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

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

Alternative 10: 26.0% accurate, 205.0× speedup?

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

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

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

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

      \[\leadsto \color{blue}{\frac{\sinh y}{\frac{y}{\sin x}}} \]
  3. Simplified88.2%

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

    \[\leadsto \frac{\sinh y}{\color{blue}{\frac{y}{x}}} \]
  5. Taylor expanded in y around 0 23.8%

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

    \[\leadsto x \]

Reproduce

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