Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 88.9% → 99.8%
Time: 13.3s
Alternatives: 17
Speedup: 1.4×

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 17 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.8% accurate, 1.0× speedup?

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

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

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
    2. lift-sinh.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
    6. lower-/.f6499.9

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

    \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
  5. Add Preprocessing

Alternative 2: 84.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sinh y \cdot \sin x}{x}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-5}:\\ \;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (* (sinh y) (sin x)) x)))
   (if (<= t_0 (- INFINITY))
     (*
      (* y (* 0.008333333333333333 (* y (* y y))))
      (fma y (* (* x x) -0.16666666666666666) y))
     (if (<= t_0 5e-5)
       (* (/ (sin x) x) (fma (* y y) (* y 0.16666666666666666) y))
       (/
        (*
         (sinh y)
         (fma
          (fma (* x x) 0.008333333333333333 -0.16666666666666666)
          (* x (* x x))
          x))
        x)))))
double code(double x, double y) {
	double t_0 = (sinh(y) * sin(x)) / x;
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = (y * (0.008333333333333333 * (y * (y * y)))) * fma(y, ((x * x) * -0.16666666666666666), y);
	} else if (t_0 <= 5e-5) {
		tmp = (sin(x) / x) * fma((y * y), (y * 0.16666666666666666), y);
	} else {
		tmp = (sinh(y) * fma(fma((x * x), 0.008333333333333333, -0.16666666666666666), (x * (x * x)), x)) / x;
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(Float64(sinh(y) * sin(x)) / x)
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(y * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) * fma(y, Float64(Float64(x * x) * -0.16666666666666666), y));
	elseif (t_0 <= 5e-5)
		tmp = Float64(Float64(sin(x) / x) * fma(Float64(y * y), Float64(y * 0.16666666666666666), y));
	else
		tmp = Float64(Float64(sinh(y) * fma(fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666), Float64(x * Float64(x * x)), x)) / x);
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(y * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-5], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y], $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot y\right)\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} + y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
      3. distribute-rgt-outN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \cdot \left(y + \left(\frac{-1}{6} \cdot y\right) \cdot {x}^{2}\right)} \]
    8. Simplified79.1%

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

      \[\leadsto \color{blue}{\left(\frac{1}{120} \cdot {y}^{4}\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
    10. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \left(\frac{1}{120} \cdot {y}^{\color{blue}{\left(2 \cdot 2\right)}}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      2. pow-sqrN/A

        \[\leadsto \left(\frac{1}{120} \cdot \color{blue}{\left({y}^{2} \cdot {y}^{2}\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      3. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{120} \cdot {y}^{2}\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      5. unpow2N/A

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

        \[\leadsto \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot y\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot y\right)\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      9. unpow2N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot y\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      10. unpow3N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{{y}^{3}}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(y \cdot \left(\frac{1}{120} \cdot {y}^{3}\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {y}^{3}\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      13. cube-multN/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(y \cdot \left(y \cdot y\right)\right)}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      14. unpow2N/A

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

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(y \cdot {y}^{2}\right)}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      16. unpow2N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      17. lower-*.f6479.1

        \[\leadsto \left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right) \]
    11. Simplified79.1%

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

    if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000024e-5

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000024e-5 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 100.0%

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

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

        \[\leadsto \frac{\left(x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) + 1\right)}\right) \cdot \sinh y}{x} \]
      2. distribute-lft-inN/A

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

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

        \[\leadsto \frac{\left(\color{blue}{\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \left(x \cdot {x}^{2}\right)} + x \cdot 1\right) \cdot \sinh y}{x} \]
      5. *-rgt-identityN/A

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, x \cdot {x}^{2}, x\right)} \cdot \sinh y}{x} \]
      7. sub-negN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, x \cdot {x}^{2}, x\right) \cdot \sinh y}{x} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{{x}^{2} \cdot \frac{1}{120}} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right), x \cdot {x}^{2}, x\right) \cdot \sinh y}{x} \]
      9. metadata-evalN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{120}, \frac{-1}{6}\right)}, x \cdot {x}^{2}, x\right) \cdot \sinh y}{x} \]
      11. unpow2N/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \frac{1}{120}, \frac{-1}{6}\right), \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \sinh y}{x} \]
      14. unpow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \frac{1}{120}, \frac{-1}{6}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \sinh y}{x} \]
      15. lower-*.f6477.4

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \sinh y}{x} \]
    5. Simplified77.4%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)} \cdot \sinh y}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -\infty:\\ \;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\ \mathbf{elif}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-5}:\\ \;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 81.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sinh y \cdot \sin x}{x}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-5}:\\ \;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (* (sinh y) (sin x)) x)))
   (if (<= t_0 (- INFINITY))
     (*
      (* y (* 0.008333333333333333 (* y (* y y))))
      (fma y (* (* x x) -0.16666666666666666) y))
     (if (<= t_0 5e-5)
       (* (/ (sin x) x) (fma (* y y) (* y 0.16666666666666666) y))
       (* 0.0001984126984126984 (pow y 7.0))))))
double code(double x, double y) {
	double t_0 = (sinh(y) * sin(x)) / x;
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = (y * (0.008333333333333333 * (y * (y * y)))) * fma(y, ((x * x) * -0.16666666666666666), y);
	} else if (t_0 <= 5e-5) {
		tmp = (sin(x) / x) * fma((y * y), (y * 0.16666666666666666), y);
	} else {
		tmp = 0.0001984126984126984 * pow(y, 7.0);
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(Float64(sinh(y) * sin(x)) / x)
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(y * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) * fma(y, Float64(Float64(x * x) * -0.16666666666666666), y));
	elseif (t_0 <= 5e-5)
		tmp = Float64(Float64(sin(x) / x) * fma(Float64(y * y), Float64(y * 0.16666666666666666), y));
	else
		tmp = Float64(0.0001984126984126984 * (y ^ 7.0));
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(y * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-5], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(0.0001984126984126984 * N[Power[y, 7.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\

\mathbf{else}:\\
\;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot y\right)\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} + y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
      3. distribute-rgt-outN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \cdot \left(y + \left(\frac{-1}{6} \cdot y\right) \cdot {x}^{2}\right)} \]
    8. Simplified79.1%

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

      \[\leadsto \color{blue}{\left(\frac{1}{120} \cdot {y}^{4}\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
    10. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \left(\frac{1}{120} \cdot {y}^{\color{blue}{\left(2 \cdot 2\right)}}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      2. pow-sqrN/A

        \[\leadsto \left(\frac{1}{120} \cdot \color{blue}{\left({y}^{2} \cdot {y}^{2}\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      3. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{120} \cdot {y}^{2}\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      5. unpow2N/A

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

        \[\leadsto \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot y\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot y\right)\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      9. unpow2N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot y\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      10. unpow3N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{{y}^{3}}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(y \cdot \left(\frac{1}{120} \cdot {y}^{3}\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {y}^{3}\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      13. cube-multN/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(y \cdot \left(y \cdot y\right)\right)}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      14. unpow2N/A

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

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(y \cdot {y}^{2}\right)}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      16. unpow2N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      17. lower-*.f6479.1

        \[\leadsto \left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right) \]
    11. Simplified79.1%

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

    if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000024e-5

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000024e-5 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
      2. lift-sinh.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
      6. lower-/.f64100.0

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
    7. Simplified92.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
      3. unpow3N/A

        \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
      4. unpow2N/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
    10. Simplified68.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right) \cdot y, y\right)} \]
    11. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{1}{5040} \cdot {y}^{7}} \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{1}{5040} \cdot {y}^{7}} \]
      2. lower-pow.f6469.9

        \[\leadsto 0.0001984126984126984 \cdot \color{blue}{{y}^{7}} \]
    13. Simplified69.9%

      \[\leadsto \color{blue}{0.0001984126984126984 \cdot {y}^{7}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -\infty:\\ \;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\ \mathbf{elif}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-5}:\\ \;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sinh y \cdot \sin x}{x}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-5}:\\ \;\;\;\;y \cdot \frac{\sin x}{x}\\ \mathbf{else}:\\ \;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (* (sinh y) (sin x)) x)))
   (if (<= t_0 (- INFINITY))
     (*
      (* y (* 0.008333333333333333 (* y (* y y))))
      (fma y (* (* x x) -0.16666666666666666) y))
     (if (<= t_0 5e-5)
       (* y (/ (sin x) x))
       (* 0.0001984126984126984 (pow y 7.0))))))
double code(double x, double y) {
	double t_0 = (sinh(y) * sin(x)) / x;
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = (y * (0.008333333333333333 * (y * (y * y)))) * fma(y, ((x * x) * -0.16666666666666666), y);
	} else if (t_0 <= 5e-5) {
		tmp = y * (sin(x) / x);
	} else {
		tmp = 0.0001984126984126984 * pow(y, 7.0);
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(Float64(sinh(y) * sin(x)) / x)
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(y * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) * fma(y, Float64(Float64(x * x) * -0.16666666666666666), y));
	elseif (t_0 <= 5e-5)
		tmp = Float64(y * Float64(sin(x) / x));
	else
		tmp = Float64(0.0001984126984126984 * (y ^ 7.0));
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(y * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-5], N[(y * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.0001984126984126984 * N[Power[y, 7.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;y \cdot \frac{\sin x}{x}\\

\mathbf{else}:\\
\;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot y\right)\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} + y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
      3. distribute-rgt-outN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \cdot \left(y + \left(\frac{-1}{6} \cdot y\right) \cdot {x}^{2}\right)} \]
    8. Simplified79.1%

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

      \[\leadsto \color{blue}{\left(\frac{1}{120} \cdot {y}^{4}\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
    10. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \left(\frac{1}{120} \cdot {y}^{\color{blue}{\left(2 \cdot 2\right)}}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      2. pow-sqrN/A

        \[\leadsto \left(\frac{1}{120} \cdot \color{blue}{\left({y}^{2} \cdot {y}^{2}\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      3. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{120} \cdot {y}^{2}\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      5. unpow2N/A

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

        \[\leadsto \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot y\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot y\right)\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      9. unpow2N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot y\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      10. unpow3N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{{y}^{3}}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(y \cdot \left(\frac{1}{120} \cdot {y}^{3}\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {y}^{3}\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      13. cube-multN/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(y \cdot \left(y \cdot y\right)\right)}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      14. unpow2N/A

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

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(y \cdot {y}^{2}\right)}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      16. unpow2N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      17. lower-*.f6479.1

        \[\leadsto \left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right) \]
    11. Simplified79.1%

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

    if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000024e-5

    1. Initial program 77.7%

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

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

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

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

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

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

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

    if 5.00000000000000024e-5 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
      2. lift-sinh.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
      6. lower-/.f64100.0

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
    7. Simplified92.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
      3. unpow3N/A

        \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
      4. unpow2N/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
    10. Simplified68.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right) \cdot y, y\right)} \]
    11. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{1}{5040} \cdot {y}^{7}} \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{1}{5040} \cdot {y}^{7}} \]
      2. lower-pow.f6469.9

        \[\leadsto 0.0001984126984126984 \cdot \color{blue}{{y}^{7}} \]
    13. Simplified69.9%

      \[\leadsto \color{blue}{0.0001984126984126984 \cdot {y}^{7}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -\infty:\\ \;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\ \mathbf{elif}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-5}:\\ \;\;\;\;y \cdot \frac{\sin x}{x}\\ \mathbf{else}:\\ \;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 90.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-5}:\\ \;\;\;\;\sin x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (/ (* (sinh y) (sin x)) x) 5e-5)
   (*
    (sin x)
    (/
     (fma
      (fma
       (* y y)
       (fma y (* y 0.0001984126984126984) 0.008333333333333333)
       0.16666666666666666)
      (* y (* y y))
      y)
     x))
   (/
    (*
     (sinh y)
     (fma
      (fma (* x x) 0.008333333333333333 -0.16666666666666666)
      (* x (* x x))
      x))
    x)))
double code(double x, double y) {
	double tmp;
	if (((sinh(y) * sin(x)) / x) <= 5e-5) {
		tmp = sin(x) * (fma(fma((y * y), fma(y, (y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) / x);
	} else {
		tmp = (sinh(y) * fma(fma((x * x), 0.008333333333333333, -0.16666666666666666), (x * (x * x)), x)) / x;
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (Float64(Float64(sinh(y) * sin(x)) / x) <= 5e-5)
		tmp = Float64(sin(x) * Float64(fma(fma(Float64(y * y), fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x));
	else
		tmp = Float64(Float64(sinh(y) * fma(fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666), Float64(x * Float64(x * x)), x)) / x);
	end
	return tmp
end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-5], N[(N[Sin[x], $MachinePrecision] * N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y], $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\sin x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000024e-5

    1. Initial program 83.7%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
      2. lift-sinh.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
      6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
    7. Simplified98.4%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}}{x} \cdot \sin x \]

    if 5.00000000000000024e-5 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 100.0%

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

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

        \[\leadsto \frac{\left(x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) + 1\right)}\right) \cdot \sinh y}{x} \]
      2. distribute-lft-inN/A

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

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

        \[\leadsto \frac{\left(\color{blue}{\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \left(x \cdot {x}^{2}\right)} + x \cdot 1\right) \cdot \sinh y}{x} \]
      5. *-rgt-identityN/A

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, x \cdot {x}^{2}, x\right)} \cdot \sinh y}{x} \]
      7. sub-negN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, x \cdot {x}^{2}, x\right) \cdot \sinh y}{x} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{{x}^{2} \cdot \frac{1}{120}} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right), x \cdot {x}^{2}, x\right) \cdot \sinh y}{x} \]
      9. metadata-evalN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{120}, \frac{-1}{6}\right)}, x \cdot {x}^{2}, x\right) \cdot \sinh y}{x} \]
      11. unpow2N/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \frac{1}{120}, \frac{-1}{6}\right), \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \sinh y}{x} \]
      14. unpow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \frac{1}{120}, \frac{-1}{6}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \sinh y}{x} \]
      15. lower-*.f6477.4

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \sinh y}{x} \]
    5. Simplified77.4%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)} \cdot \sinh y}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-5}:\\ \;\;\;\;\sin x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -1 \cdot 10^{-322}:\\ \;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (/ (* (sinh y) (sin x)) x) -1e-322)
   (*
    (* y (* 0.008333333333333333 (* y (* y y))))
    (fma y (* (* x x) -0.16666666666666666) y))
   (fma
    (* y y)
    (*
     y
     (fma
      (* y y)
      (fma (* y y) 0.0001984126984126984 0.008333333333333333)
      0.16666666666666666))
    y)))
double code(double x, double y) {
	double tmp;
	if (((sinh(y) * sin(x)) / x) <= -1e-322) {
		tmp = (y * (0.008333333333333333 * (y * (y * y)))) * fma(y, ((x * x) * -0.16666666666666666), y);
	} else {
		tmp = fma((y * y), (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y);
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (Float64(Float64(sinh(y) * sin(x)) / x) <= -1e-322)
		tmp = Float64(Float64(y * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) * fma(y, Float64(Float64(x * x) * -0.16666666666666666), y));
	else
		tmp = fma(Float64(y * y), Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y);
	end
	return tmp
end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-322], N[(N[(y * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(y * y), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -1 \cdot 10^{-322}:\\
\;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.88131e-323

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot y\right)\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} + y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
      3. distribute-rgt-outN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \cdot \left(y + \left(\frac{-1}{6} \cdot y\right) \cdot {x}^{2}\right)} \]
    8. Simplified67.1%

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

      \[\leadsto \color{blue}{\left(\frac{1}{120} \cdot {y}^{4}\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
    10. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \left(\frac{1}{120} \cdot {y}^{\color{blue}{\left(2 \cdot 2\right)}}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      2. pow-sqrN/A

        \[\leadsto \left(\frac{1}{120} \cdot \color{blue}{\left({y}^{2} \cdot {y}^{2}\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      3. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{120} \cdot {y}^{2}\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      5. unpow2N/A

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

        \[\leadsto \color{blue}{\left(y \cdot \left(y \cdot \left(\frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot y\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot y\right)\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      9. unpow2N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot y\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      10. unpow3N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{{y}^{3}}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(y \cdot \left(\frac{1}{120} \cdot {y}^{3}\right)\right)} \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      12. lower-*.f64N/A

        \[\leadsto \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {y}^{3}\right)}\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      13. cube-multN/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(y \cdot \left(y \cdot y\right)\right)}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      14. unpow2N/A

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

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(y \cdot {y}^{2}\right)}\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      16. unpow2N/A

        \[\leadsto \left(y \cdot \left(\frac{1}{120} \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot \frac{-1}{6}, y\right) \]
      17. lower-*.f6446.8

        \[\leadsto \left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right) \]
    11. Simplified46.8%

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

    if -9.88131e-323 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 81.6%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
      2. lift-sinh.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
      6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
    7. Simplified97.0%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
      3. unpow3N/A

        \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
      4. unpow2N/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
    10. Simplified60.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right) \cdot y, y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -1 \cdot 10^{-322}:\\ \;\;\;\;\left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 56.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (/ (* (sinh y) (sin x)) x) -2e-237)
   (*
    (fma x (* x -0.16666666666666666) 1.0)
    (fma y (* (* y y) 0.16666666666666666) y))
   (fma
    (* y y)
    (*
     y
     (fma
      (* y y)
      (fma (* y y) 0.0001984126984126984 0.008333333333333333)
      0.16666666666666666))
    y)))
double code(double x, double y) {
	double tmp;
	if (((sinh(y) * sin(x)) / x) <= -2e-237) {
		tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(y, ((y * y) * 0.16666666666666666), y);
	} else {
		tmp = fma((y * y), (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y);
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (Float64(Float64(sinh(y) * sin(x)) / x) <= -2e-237)
		tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(y, Float64(Float64(y * y) * 0.16666666666666666), y));
	else
		tmp = fma(Float64(y * y), Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y);
	end
	return tmp
end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-237], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(y * y), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-237

    1. Initial program 99.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sin x \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{6} \cdot y, y\right)}}{x} \]
      7. unpow2N/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} \cdot y, y\right)}{x} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} \cdot y, y\right)}{x} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot \frac{1}{6}}, y\right)}{x} \]
      10. lower-*.f6478.0

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot 0.16666666666666666}, y\right)}{x} \]
    5. Simplified78.0%

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

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

        \[\leadsto \frac{\left(x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) + 1\right)}\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      2. distribute-rgt-inN/A

        \[\leadsto \frac{\color{blue}{\left(\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right)\right) \cdot x + 1 \cdot x\right)} \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      3. *-lft-identityN/A

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

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

        \[\leadsto \frac{\left(\color{blue}{\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \left({x}^{2} \cdot x\right)} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      6. pow-plusN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \color{blue}{{x}^{\left(2 + 1\right)}} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot {x}^{\color{blue}{3}} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      8. cube-unmultN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      9. unpow2N/A

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, x \cdot {x}^{2}, x\right)} \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      11. sub-negN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, x \cdot {x}^{2}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      12. metadata-evalN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{1}{120}, {x}^{2}, \frac{-1}{6}\right)}, x \cdot {x}^{2}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      14. unpow2N/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{120}, x \cdot x, \frac{-1}{6}\right), \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      17. unpow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{120}, x \cdot x, \frac{-1}{6}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      18. lower-*.f6460.6

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)}{x} \]
    8. Simplified60.6%

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

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

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

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

        \[\leadsto \left(y + \frac{1}{6} \cdot {y}^{3}\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right)} \]
      4. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot x\right)} + 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      12. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      15. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(\frac{1}{6} \cdot {y}^{3} + y\right)} \]
      16. unpow3N/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \left(\frac{1}{6} \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y\right) \]
      17. unpow2N/A

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

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

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{y \cdot \left(\frac{1}{6} \cdot {y}^{2}\right)} + y\right) \]
      20. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(y, \frac{1}{6} \cdot {y}^{2}, y\right)} \]
    11. Simplified65.4%

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

    if -2e-237 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 82.3%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
      2. lift-sinh.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
      6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
    7. Simplified97.1%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
      3. unpow3N/A

        \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
      4. unpow2N/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
    10. Simplified57.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right) \cdot y, y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 56.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \left(y \cdot y\right) \cdot 0.0001984126984126984, 0.16666666666666666\right), y\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (/ (* (sinh y) (sin x)) x) -2e-237)
   (*
    (fma x (* x -0.16666666666666666) 1.0)
    (fma y (* (* y y) 0.16666666666666666) y))
   (fma
    (* y y)
    (* y (fma (* y y) (* (* y y) 0.0001984126984126984) 0.16666666666666666))
    y)))
double code(double x, double y) {
	double tmp;
	if (((sinh(y) * sin(x)) / x) <= -2e-237) {
		tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(y, ((y * y) * 0.16666666666666666), y);
	} else {
		tmp = fma((y * y), (y * fma((y * y), ((y * y) * 0.0001984126984126984), 0.16666666666666666)), y);
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (Float64(Float64(sinh(y) * sin(x)) / x) <= -2e-237)
		tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(y, Float64(Float64(y * y) * 0.16666666666666666), y));
	else
		tmp = fma(Float64(y * y), Float64(y * fma(Float64(y * y), Float64(Float64(y * y) * 0.0001984126984126984), 0.16666666666666666)), y);
	end
	return tmp
end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-237], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(y * y), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \left(y \cdot y\right) \cdot 0.0001984126984126984, 0.16666666666666666\right), y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-237

    1. Initial program 99.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sin x \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{6} \cdot y, y\right)}}{x} \]
      7. unpow2N/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} \cdot y, y\right)}{x} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} \cdot y, y\right)}{x} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot \frac{1}{6}}, y\right)}{x} \]
      10. lower-*.f6478.0

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot 0.16666666666666666}, y\right)}{x} \]
    5. Simplified78.0%

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

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

        \[\leadsto \frac{\left(x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) + 1\right)}\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      2. distribute-rgt-inN/A

        \[\leadsto \frac{\color{blue}{\left(\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right)\right) \cdot x + 1 \cdot x\right)} \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      3. *-lft-identityN/A

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

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

        \[\leadsto \frac{\left(\color{blue}{\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \left({x}^{2} \cdot x\right)} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      6. pow-plusN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \color{blue}{{x}^{\left(2 + 1\right)}} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot {x}^{\color{blue}{3}} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      8. cube-unmultN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      9. unpow2N/A

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, x \cdot {x}^{2}, x\right)} \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      11. sub-negN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, x \cdot {x}^{2}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      12. metadata-evalN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{1}{120}, {x}^{2}, \frac{-1}{6}\right)}, x \cdot {x}^{2}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      14. unpow2N/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{120}, x \cdot x, \frac{-1}{6}\right), \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      17. unpow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{120}, x \cdot x, \frac{-1}{6}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      18. lower-*.f6460.6

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)}{x} \]
    8. Simplified60.6%

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

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

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

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

        \[\leadsto \left(y + \frac{1}{6} \cdot {y}^{3}\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right)} \]
      4. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot x\right)} + 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      12. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      15. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(\frac{1}{6} \cdot {y}^{3} + y\right)} \]
      16. unpow3N/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \left(\frac{1}{6} \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y\right) \]
      17. unpow2N/A

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

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

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{y \cdot \left(\frac{1}{6} \cdot {y}^{2}\right)} + y\right) \]
      20. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(y, \frac{1}{6} \cdot {y}^{2}, y\right)} \]
    11. Simplified65.4%

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

    if -2e-237 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 82.3%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
      2. lift-sinh.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
      6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
    7. Simplified97.1%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
      3. unpow3N/A

        \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
      4. unpow2N/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
    10. Simplified57.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right) \cdot y, y\right)} \]
    11. Taylor expanded in y around inf

      \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\frac{1}{5040} \cdot {y}^{2}}, \frac{1}{6}\right) \cdot y, y\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{{y}^{2} \cdot \frac{1}{5040}}, \frac{1}{6}\right) \cdot y, y\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{5040}, \frac{1}{6}\right) \cdot y, y\right) \]
      4. lower-*.f6457.8

        \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\left(y \cdot y\right)} \cdot 0.0001984126984126984, 0.16666666666666666\right) \cdot y, y\right) \]
    13. Simplified57.8%

      \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\left(y \cdot y\right) \cdot 0.0001984126984126984}, 0.16666666666666666\right) \cdot y, y\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \left(y \cdot y\right) \cdot 0.0001984126984126984, 0.16666666666666666\right), y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 56.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right), y\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (/ (* (sinh y) (sin x)) x) -2e-237)
   (*
    (fma x (* x -0.16666666666666666) 1.0)
    (fma y (* (* y y) 0.16666666666666666) y))
   (fma (* y y) (* y (* y (* y (* (* y y) 0.0001984126984126984)))) y)))
double code(double x, double y) {
	double tmp;
	if (((sinh(y) * sin(x)) / x) <= -2e-237) {
		tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(y, ((y * y) * 0.16666666666666666), y);
	} else {
		tmp = fma((y * y), (y * (y * (y * ((y * y) * 0.0001984126984126984)))), y);
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (Float64(Float64(sinh(y) * sin(x)) / x) <= -2e-237)
		tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(y, Float64(Float64(y * y) * 0.16666666666666666), y));
	else
		tmp = fma(Float64(y * y), Float64(y * Float64(y * Float64(y * Float64(Float64(y * y) * 0.0001984126984126984)))), y);
	end
	return tmp
end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-237], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right), y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-237

    1. Initial program 99.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sin x \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{6} \cdot y, y\right)}}{x} \]
      7. unpow2N/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} \cdot y, y\right)}{x} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} \cdot y, y\right)}{x} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot \frac{1}{6}}, y\right)}{x} \]
      10. lower-*.f6478.0

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot 0.16666666666666666}, y\right)}{x} \]
    5. Simplified78.0%

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

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

        \[\leadsto \frac{\left(x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) + 1\right)}\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      2. distribute-rgt-inN/A

        \[\leadsto \frac{\color{blue}{\left(\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right)\right) \cdot x + 1 \cdot x\right)} \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      3. *-lft-identityN/A

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

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

        \[\leadsto \frac{\left(\color{blue}{\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \left({x}^{2} \cdot x\right)} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      6. pow-plusN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \color{blue}{{x}^{\left(2 + 1\right)}} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot {x}^{\color{blue}{3}} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      8. cube-unmultN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      9. unpow2N/A

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, x \cdot {x}^{2}, x\right)} \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      11. sub-negN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, x \cdot {x}^{2}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      12. metadata-evalN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{1}{120}, {x}^{2}, \frac{-1}{6}\right)}, x \cdot {x}^{2}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      14. unpow2N/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{120}, x \cdot x, \frac{-1}{6}\right), \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      17. unpow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{120}, x \cdot x, \frac{-1}{6}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      18. lower-*.f6460.6

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)}{x} \]
    8. Simplified60.6%

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

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

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

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

        \[\leadsto \left(y + \frac{1}{6} \cdot {y}^{3}\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right)} \]
      4. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot x\right)} + 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      12. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      15. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(\frac{1}{6} \cdot {y}^{3} + y\right)} \]
      16. unpow3N/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \left(\frac{1}{6} \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y\right) \]
      17. unpow2N/A

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

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

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{y \cdot \left(\frac{1}{6} \cdot {y}^{2}\right)} + y\right) \]
      20. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(y, \frac{1}{6} \cdot {y}^{2}, y\right)} \]
    11. Simplified65.4%

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

    if -2e-237 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 82.3%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
      2. lift-sinh.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
      6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
    7. Simplified97.1%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
      3. unpow3N/A

        \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
      4. unpow2N/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
    10. Simplified57.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right) \cdot y, y\right)} \]
    11. Taylor expanded in y around inf

      \[\leadsto \mathsf{fma}\left(y \cdot y, \color{blue}{\left(\frac{1}{5040} \cdot {y}^{4}\right)} \cdot y, y\right) \]
    12. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y \cdot y, \left(\frac{1}{5040} \cdot {y}^{\color{blue}{\left(2 \cdot 2\right)}}\right) \cdot y, y\right) \]
      2. pow-sqrN/A

        \[\leadsto \mathsf{fma}\left(y \cdot y, \left(\frac{1}{5040} \cdot \color{blue}{\left({y}^{2} \cdot {y}^{2}\right)}\right) \cdot y, y\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(y \cdot y, \color{blue}{\left(\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \cdot y, y\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y \cdot y, \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)} \cdot y, y\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y \cdot y, \left(\color{blue}{\left(y \cdot y\right)} \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right) \]
      6. associate-*l*N/A

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

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

        \[\leadsto \mathsf{fma}\left(y \cdot y, \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)}\right) \cdot y, y\right) \]
      9. *-commutativeN/A

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

        \[\leadsto \mathsf{fma}\left(y \cdot y, \left(y \cdot \left(y \cdot \color{blue}{\left({y}^{2} \cdot \frac{1}{5040}\right)}\right)\right) \cdot y, y\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y \cdot y, \left(y \cdot \left(y \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{5040}\right)\right)\right) \cdot y, y\right) \]
      12. lower-*.f6457.6

        \[\leadsto \mathsf{fma}\left(y \cdot y, \left(y \cdot \left(y \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot 0.0001984126984126984\right)\right)\right) \cdot y, y\right) \]
    13. Simplified57.6%

      \[\leadsto \mathsf{fma}\left(y \cdot y, \color{blue}{\left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)} \cdot y, y\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right), y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 55.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (/ (* (sinh y) (sin x)) x) -2e-237)
   (*
    (fma x (* x -0.16666666666666666) 1.0)
    (fma y (* (* y y) 0.16666666666666666) y))
   (fma
    (* y y)
    (* y (fma (* y y) 0.008333333333333333 0.16666666666666666))
    y)))
double code(double x, double y) {
	double tmp;
	if (((sinh(y) * sin(x)) / x) <= -2e-237) {
		tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(y, ((y * y) * 0.16666666666666666), y);
	} else {
		tmp = fma((y * y), (y * fma((y * y), 0.008333333333333333, 0.16666666666666666)), y);
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (Float64(Float64(sinh(y) * sin(x)) / x) <= -2e-237)
		tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(y, Float64(Float64(y * y) * 0.16666666666666666), y));
	else
		tmp = fma(Float64(y * y), Float64(y * fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666)), y);
	end
	return tmp
end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-237], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(y * y), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-237

    1. Initial program 99.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sin x \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{6} \cdot y, y\right)}}{x} \]
      7. unpow2N/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} \cdot y, y\right)}{x} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} \cdot y, y\right)}{x} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot \frac{1}{6}}, y\right)}{x} \]
      10. lower-*.f6478.0

        \[\leadsto \frac{\sin x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot 0.16666666666666666}, y\right)}{x} \]
    5. Simplified78.0%

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

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

        \[\leadsto \frac{\left(x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) + 1\right)}\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      2. distribute-rgt-inN/A

        \[\leadsto \frac{\color{blue}{\left(\left({x}^{2} \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right)\right) \cdot x + 1 \cdot x\right)} \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      3. *-lft-identityN/A

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

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

        \[\leadsto \frac{\left(\color{blue}{\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \left({x}^{2} \cdot x\right)} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      6. pow-plusN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \color{blue}{{x}^{\left(2 + 1\right)}} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot {x}^{\color{blue}{3}} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      8. cube-unmultN/A

        \[\leadsto \frac{\left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} + x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      9. unpow2N/A

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}, x \cdot {x}^{2}, x\right)} \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      11. sub-negN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, x \cdot {x}^{2}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      12. metadata-evalN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{1}{120}, {x}^{2}, \frac{-1}{6}\right)}, x \cdot {x}^{2}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      14. unpow2N/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{120}, x \cdot x, \frac{-1}{6}\right), \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      17. unpow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{120}, x \cdot x, \frac{-1}{6}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \frac{1}{6}, y\right)}{x} \]
      18. lower-*.f6460.6

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)}{x} \]
    8. Simplified60.6%

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

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

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

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

        \[\leadsto \left(y + \frac{1}{6} \cdot {y}^{3}\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right)} \]
      4. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot x\right)} + 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      12. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right) \cdot \left(y + \frac{1}{6} \cdot {y}^{3}\right) \]
      15. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(\frac{1}{6} \cdot {y}^{3} + y\right)} \]
      16. unpow3N/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \left(\frac{1}{6} \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y\right) \]
      17. unpow2N/A

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

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

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{y \cdot \left(\frac{1}{6} \cdot {y}^{2}\right)} + y\right) \]
      20. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(y, \frac{1}{6} \cdot {y}^{2}, y\right)} \]
    11. Simplified65.4%

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

    if -2e-237 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

    1. Initial program 82.3%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
      2. lift-sinh.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
      6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
    7. Simplified97.1%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
      3. unpow3N/A

        \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
      4. unpow2N/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
    10. Simplified57.8%

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

      \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\frac{1}{120}}, \frac{1}{6}\right) \cdot y, y\right) \]
    12. Step-by-step derivation
      1. Simplified55.0%

        \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{0.008333333333333333}, 0.16666666666666666\right) \cdot y, y\right) \]
    13. Recombined 2 regimes into one program.
    14. Final simplification58.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y\right)\\ \end{array} \]
    15. Add Preprocessing

    Alternative 11: 52.9% accurate, 0.9× speedup?

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

      1. Initial program 82.1%

        \[\frac{\sin x \cdot \sinh y}{x} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-sin.f64N/A

          \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
        2. lift-sinh.f64N/A

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

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

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

          \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
        6. lower-/.f6499.9

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

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

        \[\leadsto \color{blue}{\frac{y}{x}} \cdot \sin x \]
      6. Step-by-step derivation
        1. lower-/.f6479.4

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

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

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

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

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

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

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

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

          \[\leadsto \frac{y}{x} \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} + 1 \cdot x\right) \]
        7. unpow2N/A

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

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

          \[\leadsto \frac{y}{x} \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{6}, x \cdot {x}^{2}, x\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \frac{y}{x} \cdot \mathsf{fma}\left(\frac{-1}{6}, \color{blue}{x \cdot {x}^{2}}, x\right) \]
        11. unpow2N/A

          \[\leadsto \frac{y}{x} \cdot \mathsf{fma}\left(\frac{-1}{6}, x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \]
        12. lower-*.f6448.8

          \[\leadsto \frac{y}{x} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \]
      10. Simplified48.8%

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

      if 1.00000000000000003e-117 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

      1. Initial program 99.8%

        \[\frac{\sin x \cdot \sinh y}{x} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-sin.f64N/A

          \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
        2. lift-sinh.f64N/A

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

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

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

          \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
        6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
      7. Simplified93.9%

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

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

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

          \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
        3. unpow3N/A

          \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
        4. unpow2N/A

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
      10. Simplified73.0%

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

        \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\frac{1}{120}}, \frac{1}{6}\right) \cdot y, y\right) \]
      12. Step-by-step derivation
        1. Simplified67.0%

          \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{0.008333333333333333}, 0.16666666666666666\right) \cdot y, y\right) \]
      13. Recombined 2 regimes into one program.
      14. Final simplification54.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 10^{-117}:\\ \;\;\;\;\frac{y}{x} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y\right)\\ \end{array} \]
      15. Add Preprocessing

      Alternative 12: 46.7% accurate, 0.9× speedup?

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

        1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot y + \color{blue}{\left(\frac{1}{120} \cdot {x}^{2}\right) \cdot y}\right), y\right) \]
          7. distribute-rgt-outN/A

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {x}^{2} + \frac{-1}{6}\right)}\right), y\right) \]
          9. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \left(\frac{1}{120} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}\right)\right), y\right) \]
          10. sub-negN/A

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right)\right)}, y\right) \]
          12. sub-negN/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)}\right), y\right) \]
          13. metadata-evalN/A

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{120}, {x}^{2}, \frac{-1}{6}\right)}\right), y\right) \]
          15. unpow2N/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \mathsf{fma}\left(\frac{1}{120}, \color{blue}{x \cdot x}, \frac{-1}{6}\right)\right), y\right) \]
          16. lower-*.f6432.4

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

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

          \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(\frac{-1}{6} \cdot y\right)}, y\right) \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(y \cdot \frac{-1}{6}\right)}, y\right) \]
          2. lower-*.f6433.9

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

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

        if -2e-237 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

        1. Initial program 82.3%

          \[\frac{\sin x \cdot \sinh y}{x} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-sin.f64N/A

            \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
          2. lift-sinh.f64N/A

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

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

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

            \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
          6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
        7. Simplified97.1%

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

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

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

            \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
          3. unpow3N/A

            \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
          4. unpow2N/A

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
        10. Simplified57.8%

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

          \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\frac{1}{120}}, \frac{1}{6}\right) \cdot y, y\right) \]
        12. Step-by-step derivation
          1. Simplified55.0%

            \[\leadsto \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{0.008333333333333333}, 0.16666666666666666\right) \cdot y, y\right) \]
        13. Recombined 2 regimes into one program.
        14. Final simplification48.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot \left(y \cdot -0.16666666666666666\right), y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y\right)\\ \end{array} \]
        15. Add Preprocessing

        Alternative 13: 44.5% accurate, 0.9× speedup?

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

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot y + \color{blue}{\left(\frac{1}{120} \cdot {x}^{2}\right) \cdot y}\right), y\right) \]
            7. distribute-rgt-outN/A

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

              \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {x}^{2} + \frac{-1}{6}\right)}\right), y\right) \]
            9. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \left(\frac{1}{120} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}\right)\right), y\right) \]
            10. sub-negN/A

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

              \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right)\right)}, y\right) \]
            12. sub-negN/A

              \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)}\right), y\right) \]
            13. metadata-evalN/A

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

              \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{120}, {x}^{2}, \frac{-1}{6}\right)}\right), y\right) \]
            15. unpow2N/A

              \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \mathsf{fma}\left(\frac{1}{120}, \color{blue}{x \cdot x}, \frac{-1}{6}\right)\right), y\right) \]
            16. lower-*.f6432.4

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

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(\frac{-1}{6} \cdot y\right)}, y\right) \]
          10. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(y \cdot \frac{-1}{6}\right)}, y\right) \]
            2. lower-*.f6433.9

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

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

          if -2e-237 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x)

          1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{y + \frac{1}{6} \cdot {y}^{3}} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{1}{6} \cdot {y}^{3} + y} \]
            2. cube-multN/A

              \[\leadsto \frac{1}{6} \cdot \color{blue}{\left(y \cdot \left(y \cdot y\right)\right)} + y \]
            3. unpow2N/A

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{1}{6} \cdot {y}^{2}}, y\right) \]
            9. unpow2N/A

              \[\leadsto \mathsf{fma}\left(y, \frac{1}{6} \cdot \color{blue}{\left(y \cdot y\right)}, y\right) \]
            10. lower-*.f6450.7

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot \left(y \cdot -0.16666666666666666\right), y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 14: 89.8% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 35000:\\ \;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+62}:\\ \;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)}{x}\\ \end{array} \end{array} \]
        (FPCore (x y)
         :precision binary64
         (if (<= y 35000.0)
           (* (/ (sin x) x) (fma (* y y) (* y 0.16666666666666666) y))
           (if (<= y 1.2e+62)
             (/ (* (sinh y) (fma x (* (* x x) -0.16666666666666666) x)) x)
             (/
              (*
               y
               (*
                (sin x)
                (fma
                 (* y y)
                 (fma y (* y 0.008333333333333333) 0.16666666666666666)
                 1.0)))
              x))))
        double code(double x, double y) {
        	double tmp;
        	if (y <= 35000.0) {
        		tmp = (sin(x) / x) * fma((y * y), (y * 0.16666666666666666), y);
        	} else if (y <= 1.2e+62) {
        		tmp = (sinh(y) * fma(x, ((x * x) * -0.16666666666666666), x)) / x;
        	} else {
        		tmp = (y * (sin(x) * fma((y * y), fma(y, (y * 0.008333333333333333), 0.16666666666666666), 1.0))) / x;
        	}
        	return tmp;
        }
        
        function code(x, y)
        	tmp = 0.0
        	if (y <= 35000.0)
        		tmp = Float64(Float64(sin(x) / x) * fma(Float64(y * y), Float64(y * 0.16666666666666666), y));
        	elseif (y <= 1.2e+62)
        		tmp = Float64(Float64(sinh(y) * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x)) / x);
        	else
        		tmp = Float64(Float64(y * Float64(sin(x) * fma(Float64(y * y), fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), 1.0))) / x);
        	end
        	return tmp
        end
        
        code[x_, y_] := If[LessEqual[y, 35000.0], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+62], N[(N[(N[Sinh[y], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(y * N[(N[Sin[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq 35000:\\
        \;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\
        
        \mathbf{elif}\;y \leq 1.2 \cdot 10^{+62}:\\
        \;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{y \cdot \left(\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)}{x}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < 35000

          1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 35000 < y < 1.2e62

          1. Initial program 100.0%

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, \frac{-1}{6} \cdot {x}^{2}, x\right)} \cdot \sinh y}{x} \]
            5. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{-1}{6}}, x\right) \cdot \sinh y}{x} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{-1}{6}}, x\right) \cdot \sinh y}{x} \]
            7. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{-1}{6}, x\right) \cdot \sinh y}{x} \]
            8. lower-*.f6466.7

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

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

          if 1.2e62 < y

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{y \cdot \left(\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)}}{x} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification91.9%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 35000:\\ \;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+62}:\\ \;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)}{x}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 15: 64.6% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.6 \cdot 10^{-153}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right), y\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+52}:\\ \;\;\;\;\left(x \cdot x\right) \cdot \left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(y, -0.16666666666666666, \frac{y}{x \cdot x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\ \end{array} \end{array} \]
        (FPCore (x y)
         :precision binary64
         (if (<= x 1.6e-153)
           (fma (* y y) (* y (* y (* y (* (* y y) 0.0001984126984126984)))) y)
           (if (<= x 3.9e+52)
             (*
              (* x x)
              (*
               (fma (* y y) (fma y (* y 0.008333333333333333) 0.16666666666666666) 1.0)
               (fma y -0.16666666666666666 (/ y (* x x)))))
             (* 0.0001984126984126984 (pow y 7.0)))))
        double code(double x, double y) {
        	double tmp;
        	if (x <= 1.6e-153) {
        		tmp = fma((y * y), (y * (y * (y * ((y * y) * 0.0001984126984126984)))), y);
        	} else if (x <= 3.9e+52) {
        		tmp = (x * x) * (fma((y * y), fma(y, (y * 0.008333333333333333), 0.16666666666666666), 1.0) * fma(y, -0.16666666666666666, (y / (x * x))));
        	} else {
        		tmp = 0.0001984126984126984 * pow(y, 7.0);
        	}
        	return tmp;
        }
        
        function code(x, y)
        	tmp = 0.0
        	if (x <= 1.6e-153)
        		tmp = fma(Float64(y * y), Float64(y * Float64(y * Float64(y * Float64(Float64(y * y) * 0.0001984126984126984)))), y);
        	elseif (x <= 3.9e+52)
        		tmp = Float64(Float64(x * x) * Float64(fma(Float64(y * y), fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), 1.0) * fma(y, -0.16666666666666666, Float64(y / Float64(x * x)))));
        	else
        		tmp = Float64(0.0001984126984126984 * (y ^ 7.0));
        	end
        	return tmp
        end
        
        code[x_, y_] := If[LessEqual[x, 1.6e-153], N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[x, 3.9e+52], N[(N[(x * x), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * -0.16666666666666666 + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0001984126984126984 * N[Power[y, 7.0], $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 1.6 \cdot 10^{-153}:\\
        \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right), y\right)\\
        
        \mathbf{elif}\;x \leq 3.9 \cdot 10^{+52}:\\
        \;\;\;\;\left(x \cdot x\right) \cdot \left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(y, -0.16666666666666666, \frac{y}{x \cdot x}\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < 1.6e-153

          1. Initial program 83.2%

            \[\frac{\sin x \cdot \sinh y}{x} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-sin.f64N/A

              \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
            2. lift-sinh.f64N/A

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

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

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

              \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
            6. lower-/.f6499.9

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
          7. Simplified98.8%

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

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

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

              \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
            3. unpow3N/A

              \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
            4. unpow2N/A

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
          10. Simplified68.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right) \cdot y, y\right)} \]
          11. Taylor expanded in y around inf

            \[\leadsto \mathsf{fma}\left(y \cdot y, \color{blue}{\left(\frac{1}{5040} \cdot {y}^{4}\right)} \cdot y, y\right) \]
          12. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(y \cdot y, \left(\frac{1}{5040} \cdot {y}^{\color{blue}{\left(2 \cdot 2\right)}}\right) \cdot y, y\right) \]
            2. pow-sqrN/A

              \[\leadsto \mathsf{fma}\left(y \cdot y, \left(\frac{1}{5040} \cdot \color{blue}{\left({y}^{2} \cdot {y}^{2}\right)}\right) \cdot y, y\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{fma}\left(y \cdot y, \color{blue}{\left(\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \cdot y, y\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(y \cdot y, \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)} \cdot y, y\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{fma}\left(y \cdot y, \left(\color{blue}{\left(y \cdot y\right)} \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right) \]
            6. associate-*l*N/A

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

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

              \[\leadsto \mathsf{fma}\left(y \cdot y, \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)}\right) \cdot y, y\right) \]
            9. *-commutativeN/A

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

              \[\leadsto \mathsf{fma}\left(y \cdot y, \left(y \cdot \left(y \cdot \color{blue}{\left({y}^{2} \cdot \frac{1}{5040}\right)}\right)\right) \cdot y, y\right) \]
            11. unpow2N/A

              \[\leadsto \mathsf{fma}\left(y \cdot y, \left(y \cdot \left(y \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{5040}\right)\right)\right) \cdot y, y\right) \]
            12. lower-*.f6468.0

              \[\leadsto \mathsf{fma}\left(y \cdot y, \left(y \cdot \left(y \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot 0.0001984126984126984\right)\right)\right) \cdot y, y\right) \]
          13. Simplified68.0%

            \[\leadsto \mathsf{fma}\left(y \cdot y, \color{blue}{\left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)} \cdot y, y\right) \]

          if 1.6e-153 < x < 3.9e52

          1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot \left({x}^{2} \cdot y\right)\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} + y \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
            3. distribute-rgt-outN/A

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

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

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

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

              \[\leadsto \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \cdot \left(y + \left(\frac{-1}{6} \cdot y\right) \cdot {x}^{2}\right)} \]
          8. Simplified83.5%

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

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

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

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

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

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

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

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

              \[\leadsto \left(x \cdot x\right) \cdot \left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \cdot \left(\frac{-1}{6} \cdot y\right) + \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \cdot \frac{y}{{x}^{2}}}\right) \]
            8. distribute-lft-outN/A

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

              \[\leadsto \left(x \cdot x\right) \cdot \color{blue}{\left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \cdot \left(\frac{-1}{6} \cdot y + \frac{y}{{x}^{2}}\right)\right)} \]
          11. Simplified83.4%

            \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot \left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(y, -0.16666666666666666, \frac{y}{x \cdot x}\right)\right)} \]

          if 3.9e52 < x

          1. Initial program 99.9%

            \[\frac{\sin x \cdot \sinh y}{x} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-sin.f64N/A

              \[\leadsto \frac{\color{blue}{\sin x} \cdot \sinh y}{x} \]
            2. lift-sinh.f64N/A

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

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

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

              \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
            6. lower-/.f6499.8

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{3}, y\right)}}{x} \cdot \sin x \]
          7. Simplified89.3%

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

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

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

              \[\leadsto \color{blue}{\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot {y}^{3}} + y \]
            3. unpow3N/A

              \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)} + y \]
            4. unpow2N/A

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot y, y\right)} \]
          10. Simplified16.4%

            \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right) \cdot y, y\right)} \]
          11. Taylor expanded in y around inf

            \[\leadsto \color{blue}{\frac{1}{5040} \cdot {y}^{7}} \]
          12. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \color{blue}{\frac{1}{5040} \cdot {y}^{7}} \]
            2. lower-pow.f6449.5

              \[\leadsto 0.0001984126984126984 \cdot \color{blue}{{y}^{7}} \]
          13. Simplified49.5%

            \[\leadsto \color{blue}{0.0001984126984126984 \cdot {y}^{7}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification67.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.6 \cdot 10^{-153}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot \left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right), y\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+52}:\\ \;\;\;\;\left(x \cdot x\right) \cdot \left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(y, -0.16666666666666666, \frac{y}{x \cdot x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.0001984126984126984 \cdot {y}^{7}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 16: 35.7% accurate, 12.8× speedup?

        \[\begin{array}{l} \\ \mathsf{fma}\left(x, x \cdot \left(y \cdot -0.16666666666666666\right), y\right) \end{array} \]
        (FPCore (x y) :precision binary64 (fma x (* x (* y -0.16666666666666666)) y))
        double code(double x, double y) {
        	return fma(x, (x * (y * -0.16666666666666666)), y);
        }
        
        function code(x, y)
        	return fma(x, Float64(x * Float64(y * -0.16666666666666666)), y)
        end
        
        code[x_, y_] := N[(x * N[(x * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \mathsf{fma}\left(x, x \cdot \left(y \cdot -0.16666666666666666\right), y\right)
        \end{array}
        
        Derivation
        1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(\frac{-1}{6} \cdot y + \color{blue}{\left(\frac{1}{120} \cdot {x}^{2}\right) \cdot y}\right), y\right) \]
          7. distribute-rgt-outN/A

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {x}^{2} + \frac{-1}{6}\right)}\right), y\right) \]
          9. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \left(\frac{1}{120} \cdot {x}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}\right)\right), y\right) \]
          10. sub-negN/A

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right)\right)}, y\right) \]
          12. sub-negN/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\left(\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)}\right), y\right) \]
          13. metadata-evalN/A

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

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{120}, {x}^{2}, \frac{-1}{6}\right)}\right), y\right) \]
          15. unpow2N/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \left(y \cdot \mathsf{fma}\left(\frac{1}{120}, \color{blue}{x \cdot x}, \frac{-1}{6}\right)\right), y\right) \]
          16. lower-*.f6439.5

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

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

          \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(\frac{-1}{6} \cdot y\right)}, y\right) \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(y \cdot \frac{-1}{6}\right)}, y\right) \]
          2. lower-*.f6437.4

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

          \[\leadsto \mathsf{fma}\left(x, x \cdot \color{blue}{\left(y \cdot -0.16666666666666666\right)}, y\right) \]
        12. Add Preprocessing

        Alternative 17: 27.8% accurate, 217.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 87.6%

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

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

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

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

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

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

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

          \[\leadsto y \cdot \color{blue}{1} \]
        7. Step-by-step derivation
          1. Simplified31.7%

            \[\leadsto y \cdot \color{blue}{1} \]
          2. Step-by-step derivation
            1. *-rgt-identity31.7

              \[\leadsto \color{blue}{y} \]
          3. Applied egg-rr31.7%

            \[\leadsto \color{blue}{y} \]
          4. Add Preprocessing

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

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

          Reproduce

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