Linear.Quaternion:$ccos from linear-1.19.1.3

Percentage Accurate: 100.0% → 100.0%
Time: 14.9s
Alternatives: 24
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 24 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

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

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

      \[\leadsto \sin x \cdot \color{blue}{\frac{1}{\frac{y}{\sinh y}}} \]
    4. un-div-invN/A

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

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

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

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

Alternative 2: 81.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)\\

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
      22. metadata-eval60.2

        \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{-0.001388888888888889}, 0.008333333333333333\right)\right) \]
    11. Simplified60.2%

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

    if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      3. *-lft-identityN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 80.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\sin x\\

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
      22. metadata-eval60.2

        \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{-0.001388888888888889}, 0.008333333333333333\right)\right) \]
    11. Simplified60.2%

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

    if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\sin x} \]
    4. Step-by-step derivation
      1. lower-sin.f6497.9

        \[\leadsto \color{blue}{\sin x} \]
    5. Simplified97.9%

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

    if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      3. *-lft-identityN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.5% accurate, 0.6× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \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 \frac{\sinh y}{y} \]
      9. *-commutativeN/A

        \[\leadsto \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 \frac{\sinh y}{y} \]
      10. unpow2N/A

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.4% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

    if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      3. *-lft-identityN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 58.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 100.0%

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

      \[\leadsto \sin x \cdot \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)}}{y} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \sin x \cdot \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)}}{y} \]
      2. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot x, x\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{\left(y \cdot y\right)} \cdot 0.0001984126984126984, 0.16666666666666666\right)\right), y\right)}{y} \]
    11. Simplified44.5%

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

    if -0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      3. *-lft-identityN/A

        \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 56.6% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \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)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \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)} \]
      2. distribute-rgt-inN/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 x + 1 \cdot x} \]
      3. *-commutativeN/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 x + 1 \cdot x \]
      4. associate-*l*N/A

        \[\leadsto \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 x\right)} + 1 \cdot x \]
      5. *-lft-identityN/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), \left(y \cdot y\right) \cdot x, x\right)} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)} \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
      5. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot x\right)} + x \]
    10. Applied egg-rr43.3%

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

Alternative 8: 52.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot 0.008333333333333333\right)\right) \cdot y, y, \mathsf{fma}\left(y, \color{blue}{y \cdot 0.16666666666666666}, 1\right)\right) \]
    7. Applied egg-rr85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 46.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq -0.01:\\
\;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\\

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, -0.027777777777777776, -0.16666666666666666\right) \]
    14. Simplified18.2%

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

    if -0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot 0.008333333333333333\right)\right) \cdot y, y, \mathsf{fma}\left(y, \color{blue}{y \cdot 0.16666666666666666}, 1\right)\right) \]
    7. Applied egg-rr90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 48.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq -0.01:\\
\;\;\;\;x \cdot \left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(x, x \cdot -0.027777777777777776, 0.16666666666666666\right)\right)\\

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \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)} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{-1}{36}, \frac{1}{6}\right)}\right) \]
      16. lower-*.f6434.7

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

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

    if -0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \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)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \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)} \]
      2. distribute-rgt-inN/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 x + 1 \cdot x} \]
      3. *-commutativeN/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 x + 1 \cdot x \]
      4. associate-*l*N/A

        \[\leadsto \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 x\right)} + 1 \cdot x \]
      5. *-lft-identityN/A

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

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

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

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

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

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

    Alternative 11: 41.0% accurate, 0.9× speedup?

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

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\sin x} \]
      4. Step-by-step derivation
        1. lower-sin.f6433.4

          \[\leadsto \color{blue}{\sin x} \]
      5. Simplified33.4%

        \[\leadsto \color{blue}{\sin x} \]
      6. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{6} \cdot {x}^{3}} \]
      10. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{-1}{6} \cdot {x}^{3}} \]
        2. cube-multN/A

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

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

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

          \[\leadsto \frac{-1}{6} \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \]
        6. lower-*.f6415.6

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

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

      if -0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \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)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto x \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)} \]
        2. distribute-rgt-inN/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 x + 1 \cdot x} \]
        3. *-commutativeN/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 x + 1 \cdot x \]
        4. associate-*l*N/A

          \[\leadsto \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 x\right)} + 1 \cdot x \]
        5. *-lft-identityN/A

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{0.16666666666666666}, \left(y \cdot y\right) \cdot x, x\right) \]
      11. Recombined 2 regimes into one program.
      12. Final simplification41.9%

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

      Alternative 12: 41.0% accurate, 0.9× speedup?

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

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{\sin x} \]
        4. Step-by-step derivation
          1. lower-sin.f6433.4

            \[\leadsto \color{blue}{\sin x} \]
        5. Simplified33.4%

          \[\leadsto \color{blue}{\sin x} \]
        6. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{6} \cdot {x}^{3}} \]
        10. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{-1}{6} \cdot {x}^{3}} \]
          2. cube-multN/A

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

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

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

            \[\leadsto \frac{-1}{6} \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \]
          6. lower-*.f6415.6

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

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

        if -0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y))

        1. Initial program 100.0%

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

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

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

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

            \[\leadsto \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)} \]
          4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 13: 100.0% accurate, 1.0× speedup?

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

        \[\sin x \cdot \frac{\sinh y}{y} \]
      2. Add Preprocessing
      3. Add Preprocessing

      Alternative 14: 58.1% accurate, 1.3× speedup?

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

        1. Initial program 100.0%

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

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

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

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

            \[\leadsto \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)} \]
          4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -0.0100000000000000002 < (sin.f64 x)

        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\sin x \cdot \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
        5. Simplified91.2%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          2. distribute-rgt-inN/A

            \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          3. *-lft-identityN/A

            \[\leadsto \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, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          4. associate-*l*N/A

            \[\leadsto \left(\color{blue}{{x}^{2} \cdot \left(\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot x\right)} + x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          5. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{2}, \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot x, x\right)} \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          6. unpow2N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          7. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          8. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x \cdot x, \color{blue}{\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6}\right) \cdot x}, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          9. sub-negN/A

            \[\leadsto \mathsf{fma}\left(x \cdot x, \color{blue}{\left(\frac{1}{120} \cdot {x}^{2} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)} \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          10. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(x \cdot x, \left(\color{blue}{{x}^{2} \cdot \frac{1}{120}} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right) \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          11. unpow2N/A

            \[\leadsto \mathsf{fma}\left(x \cdot x, \left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{120} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right) \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          12. associate-*l*N/A

            \[\leadsto \mathsf{fma}\left(x \cdot x, \left(\color{blue}{x \cdot \left(x \cdot \frac{1}{120}\right)} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right) \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          13. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(x \cdot x, \left(x \cdot \left(x \cdot \frac{1}{120}\right) + \color{blue}{\frac{-1}{6}}\right) \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          14. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(x \cdot x, \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{120}, \frac{-1}{6}\right)} \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          15. lower-*.f6468.8

            \[\leadsto \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.008333333333333333}, -0.16666666666666666\right) \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right) \]
        8. Simplified68.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right) \cdot x, x\right)} \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification57.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;x \cdot \left(\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 15: 57.8% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right)\\ \mathbf{if}\;\sin x \leq 0.002:\\ \;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, t\_0, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(x \cdot x, x \cdot -0.16666666666666666, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot t\_0, 0.16666666666666666\right), y\right) \cdot \frac{x}{y}\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (let* ((t_0 (fma (* y y) 0.0001984126984126984 0.008333333333333333)))
         (if (<= (sin x) 0.002)
           (*
            (fma y (* y (fma (* y y) t_0 0.16666666666666666)) 1.0)
            (fma (* x x) (* x -0.16666666666666666) x))
           (* (fma (* y (* y y)) (fma y (* y t_0) 0.16666666666666666) y) (/ x y)))))
      double code(double x, double y) {
      	double t_0 = fma((y * y), 0.0001984126984126984, 0.008333333333333333);
      	double tmp;
      	if (sin(x) <= 0.002) {
      		tmp = fma(y, (y * fma((y * y), t_0, 0.16666666666666666)), 1.0) * fma((x * x), (x * -0.16666666666666666), x);
      	} else {
      		tmp = fma((y * (y * y)), fma(y, (y * t_0), 0.16666666666666666), y) * (x / y);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	t_0 = fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)
      	tmp = 0.0
      	if (sin(x) <= 0.002)
      		tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), t_0, 0.16666666666666666)), 1.0) * fma(Float64(x * x), Float64(x * -0.16666666666666666), x));
      	else
      		tmp = Float64(fma(Float64(y * Float64(y * y)), fma(y, Float64(y * t_0), 0.16666666666666666), y) * Float64(x / y));
      	end
      	return tmp
      end
      
      code[x_, y_] := Block[{t$95$0 = N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]}, If[LessEqual[N[Sin[x], $MachinePrecision], 0.002], N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * t$95$0 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * t$95$0), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right)\\
      \mathbf{if}\;\sin x \leq 0.002:\\
      \;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, t\_0, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(x \cdot x, x \cdot -0.16666666666666666, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot t\_0, 0.16666666666666666\right), y\right) \cdot \frac{x}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (sin.f64 x) < 2e-3

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
        4. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto \sin x + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)\right)} \]
          2. associate-+r+N/A

            \[\leadsto \color{blue}{\left(\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
          3. *-lft-identityN/A

            \[\leadsto \left(\color{blue}{1 \cdot \sin x} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left({y}^{2} \cdot \frac{1}{6}\right) \cdot \sin x}\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          6. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)} + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          7. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left({y}^{2} \cdot {y}^{2}\right) \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)} \]
          8. *-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right)} \]
          9. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\color{blue}{\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          10. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\sin x \cdot \left(\frac{1}{5040} \cdot {y}^{2} + \frac{1}{120}\right)\right)} \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          11. +-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\sin x \cdot \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
        5. Simplified92.6%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          2. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x + 1 \cdot x\right)} \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          3. *-lft-identityN/A

            \[\leadsto \left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x + \color{blue}{x}\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          4. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} \cdot x + x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          5. associate-*l*N/A

            \[\leadsto \left(\color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot x\right)} + x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot x, x\right)} \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          8. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot x, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right), 1\right) \]
          9. lower-*.f6467.9

            \[\leadsto \mathsf{fma}\left(x \cdot x, \color{blue}{-0.16666666666666666 \cdot x}, x\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right) \]
        8. Simplified67.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot x, x\right)} \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right) \]

        if 2e-3 < (sin.f64 x)

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \sin x \cdot \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)}}{y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \sin x \cdot \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)}}{y} \]
          2. distribute-lft-inN/A

            \[\leadsto \sin x \cdot \frac{\color{blue}{y \cdot \left({y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right) + y \cdot 1}}{y} \]
          3. *-rgt-identityN/A

            \[\leadsto \sin x \cdot \frac{y \cdot \left({y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right) + \color{blue}{y}}{y} \]
          4. lower-fma.f64N/A

            \[\leadsto \sin x \cdot \frac{\color{blue}{\mathsf{fma}\left(y, {y}^{2} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right), y\right)}}{y} \]
        5. Simplified92.7%

          \[\leadsto \sin x \cdot \frac{\color{blue}{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right)\right), y\right)}}{y} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
          2. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x + 1 \cdot x\right)} \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
          3. *-lft-identityN/A

            \[\leadsto \left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x + \color{blue}{x}\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
          4. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} \cdot x + x\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
          5. associate-*l*N/A

            \[\leadsto \left(\color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot x\right)} + x\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot x, x\right)} \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
          7. unpow2N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot x, x\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
          8. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot x, x\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)\right), y\right)}{y} \]
          9. lower-*.f6431.1

            \[\leadsto \mathsf{fma}\left(x \cdot x, \color{blue}{-0.16666666666666666 \cdot x}, x\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right)\right), y\right)}{y} \]
        8. Simplified31.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot x, x\right)} \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right)\right), y\right)}{y} \]
        9. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{x \cdot \left(y + {y}^{3} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right)}{y}} \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{\left(y + {y}^{3} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right) \cdot x}}{y} \]
          2. associate-/l*N/A

            \[\leadsto \color{blue}{\left(y + {y}^{3} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right) \cdot \frac{x}{y}} \]
          3. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(y + {y}^{3} \cdot \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right)\right) \cdot \frac{x}{y}} \]
        11. Simplified27.7%

          \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right) \cdot \frac{x}{y}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification57.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\sin x \leq 0.002:\\ \;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(x \cdot x, x \cdot -0.16666666666666666, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right) \cdot \frac{x}{y}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 16: 78.9% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= x 1.8e-11)
         (* (/ (sinh y) y) (fma -0.16666666666666666 (* x (* x x)) x))
         (*
          (sin x)
          (fma
           y
           (*
            y
            (fma
             (* y y)
             (fma (* y y) 0.0001984126984126984 0.008333333333333333)
             0.16666666666666666))
           1.0))))
      double code(double x, double y) {
      	double tmp;
      	if (x <= 1.8e-11) {
      		tmp = (sinh(y) / y) * fma(-0.16666666666666666, (x * (x * x)), x);
      	} else {
      		tmp = sin(x) * fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (x <= 1.8e-11)
      		tmp = Float64(Float64(sinh(y) / y) * fma(-0.16666666666666666, Float64(x * Float64(x * x)), x));
      	else
      		tmp = Float64(sin(x) * fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0));
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[x, 1.8e-11], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq 1.8 \cdot 10^{-11}:\\
      \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 1.79999999999999992e-11

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \cdot \frac{\sinh y}{y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right) \cdot \frac{\sinh y}{y} \]
          2. distribute-lft-inN/A

            \[\leadsto \color{blue}{\left(x \cdot \left(\frac{-1}{6} \cdot {x}^{2}\right) + x \cdot 1\right)} \cdot \frac{\sinh y}{y} \]
          3. *-commutativeN/A

            \[\leadsto \left(x \cdot \color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          4. associate-*r*N/A

            \[\leadsto \left(\color{blue}{\left(x \cdot {x}^{2}\right) \cdot \frac{-1}{6}} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          5. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\frac{-1}{6} \cdot \left(x \cdot {x}^{2}\right)} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          6. *-rgt-identityN/A

            \[\leadsto \left(\frac{-1}{6} \cdot \left(x \cdot {x}^{2}\right) + \color{blue}{x}\right) \cdot \frac{\sinh y}{y} \]
          7. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{6}, x \cdot {x}^{2}, x\right)} \cdot \frac{\sinh y}{y} \]
          8. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \frac{\sinh y}{y} \]
          9. unpow2N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \frac{\sinh y}{y} \]
          10. lower-*.f6477.5

            \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \frac{\sinh y}{y} \]
        5. Simplified77.5%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)} \cdot \frac{\sinh y}{y} \]

        if 1.79999999999999992e-11 < x

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
        4. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto \sin x + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)\right)} \]
          2. associate-+r+N/A

            \[\leadsto \color{blue}{\left(\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
          3. *-lft-identityN/A

            \[\leadsto \left(\color{blue}{1 \cdot \sin x} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left({y}^{2} \cdot \frac{1}{6}\right) \cdot \sin x}\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          6. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)} + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          7. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left({y}^{2} \cdot {y}^{2}\right) \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)} \]
          8. *-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right)} \]
          9. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\color{blue}{\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          10. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\sin x \cdot \left(\frac{1}{5040} \cdot {y}^{2} + \frac{1}{120}\right)\right)} \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          11. +-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\sin x \cdot \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
        5. Simplified94.6%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification82.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 17: 57.6% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= (sin x) -0.01)
         (*
          x
          (*
           (* (* y y) (* y y))
           (fma (* x x) -0.001388888888888889 0.008333333333333333)))
         (fma
          (*
           (* y y)
           (fma
            (* y y)
            (fma y (* y 0.0001984126984126984) 0.008333333333333333)
            0.16666666666666666))
          x
          x)))
      double code(double x, double y) {
      	double tmp;
      	if (sin(x) <= -0.01) {
      		tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
      	} else {
      		tmp = fma(((y * y) * fma((y * y), fma(y, (y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), x, x);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (sin(x) <= -0.01)
      		tmp = Float64(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333)));
      	else
      		tmp = fma(Float64(Float64(y * y) * fma(Float64(y * y), fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), x, x);
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * x + x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\sin x \leq -0.01:\\
      \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (sin.f64 x) < -0.0100000000000000002

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right)} \]
        4. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \sin x + \color{blue}{\left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right)} \]
          2. *-rgt-identityN/A

            \[\leadsto \color{blue}{\sin x \cdot 1} + \left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right) \]
          3. distribute-rgt-inN/A

            \[\leadsto \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)} \]
          4. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}} \]
          5. associate-*r*N/A

            \[\leadsto \sin x \cdot 1 + \left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2} \]
          6. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\sin x \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)\right)} \cdot {y}^{2} \]
          7. +-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \left(\sin x \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right) \cdot {y}^{2} \]
          8. associate-*l*N/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\sin x \cdot \left(\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          10. distribute-lft-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          12. lower-sin.f64N/A

            \[\leadsto \color{blue}{\sin x} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + 1\right)} \]
        5. Simplified93.6%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \left(1 + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)}\right) \]
          3. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)} \]
          4. associate-*r*N/A

            \[\leadsto x \cdot \left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}\right) \]
          5. distribute-rgt1-inN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {x}^{2}\right)} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        8. Simplified26.6%

          \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{4} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
        10. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{4}\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{4} \cdot \frac{1}{120}\right)} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto x \cdot \color{blue}{\left({y}^{4} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          4. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left({y}^{4} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          5. metadata-evalN/A

            \[\leadsto x \cdot \left({y}^{\color{blue}{\left(2 \cdot 2\right)}} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          6. pow-sqrN/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot {y}^{2}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot {y}^{2}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          11. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          12. +-commutativeN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right)\right) \]
          13. distribute-rgt-inN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \frac{1}{120} + 1 \cdot \frac{1}{120}\right)}\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} \cdot \frac{1}{120} + 1 \cdot \frac{1}{120}\right)\right) \]
          15. associate-*l*N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{1}{120}\right)} + 1 \cdot \frac{1}{120}\right)\right) \]
          16. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \color{blue}{\frac{-1}{720}} + 1 \cdot \frac{1}{120}\right)\right) \]
          17. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{1}{120} \cdot \frac{-1}{6}\right)} + 1 \cdot \frac{1}{120}\right)\right) \]
          18. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \left(\frac{1}{120} \cdot \frac{-1}{6}\right) + \color{blue}{\frac{1}{120}}\right)\right) \]
          19. lower-fma.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)}\right) \]
          20. unpow2N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
          21. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
          22. metadata-eval26.3

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{-0.001388888888888889}, 0.008333333333333333\right)\right) \]
        11. Simplified26.3%

          \[\leadsto x \cdot \color{blue}{\left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)} \]

        if -0.0100000000000000002 < (sin.f64 x)

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
        4. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto \sin x + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)\right)} \]
          2. associate-+r+N/A

            \[\leadsto \color{blue}{\left(\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
          3. *-lft-identityN/A

            \[\leadsto \left(\color{blue}{1 \cdot \sin x} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left({y}^{2} \cdot \frac{1}{6}\right) \cdot \sin x}\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          6. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)} + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          7. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left({y}^{2} \cdot {y}^{2}\right) \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)} \]
          8. *-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right)} \]
          9. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\color{blue}{\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          10. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\sin x \cdot \left(\frac{1}{5040} \cdot {y}^{2} + \frac{1}{120}\right)\right)} \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          11. +-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\sin x \cdot \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
        5. Simplified91.2%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \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)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \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)} \]
          2. distribute-rgt-inN/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 x + 1 \cdot x} \]
          3. *-commutativeN/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 x + 1 \cdot x \]
          4. associate-*l*N/A

            \[\leadsto \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 x\right)} + 1 \cdot x \]
          5. *-lft-identityN/A

            \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \left({y}^{2} \cdot x\right) + \color{blue}{x} \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{2} \cdot x, x\right)} \]
        8. Simplified65.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), \left(y \cdot y\right) \cdot x, x\right)} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(y \cdot \left(y \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{5040} + \frac{1}{120}\right)\right) + \frac{1}{6}\right) \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
          2. lift-fma.f64N/A

            \[\leadsto \left(y \cdot \left(y \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right)}\right) + \frac{1}{6}\right) \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
          3. lift-*.f64N/A

            \[\leadsto \left(y \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right)\right)} + \frac{1}{6}\right) \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
          4. lift-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)} \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
          5. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right) \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot x\right) + x \]
          6. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot x\right)} + x \]
        10. Applied egg-rr67.3%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x, x\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 18: 56.8% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x \cdot y, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= (sin x) -0.01)
         (*
          x
          (*
           (* (* y y) (* y y))
           (fma (* x x) -0.001388888888888889 0.008333333333333333)))
         (fma
          (*
           y
           (fma
            (* y y)
            (fma y (* y 0.0001984126984126984) 0.008333333333333333)
            0.16666666666666666))
          (* x y)
          x)))
      double code(double x, double y) {
      	double tmp;
      	if (sin(x) <= -0.01) {
      		tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
      	} else {
      		tmp = fma((y * fma((y * y), fma(y, (y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), (x * y), x);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (sin(x) <= -0.01)
      		tmp = Float64(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333)));
      	else
      		tmp = fma(Float64(y * fma(Float64(y * y), fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), Float64(x * y), x);
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(x * y), $MachinePrecision] + x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\sin x \leq -0.01:\\
      \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x \cdot y, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (sin.f64 x) < -0.0100000000000000002

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right)} \]
        4. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \sin x + \color{blue}{\left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right)} \]
          2. *-rgt-identityN/A

            \[\leadsto \color{blue}{\sin x \cdot 1} + \left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right) \]
          3. distribute-rgt-inN/A

            \[\leadsto \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)} \]
          4. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}} \]
          5. associate-*r*N/A

            \[\leadsto \sin x \cdot 1 + \left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2} \]
          6. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\sin x \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)\right)} \cdot {y}^{2} \]
          7. +-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \left(\sin x \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right) \cdot {y}^{2} \]
          8. associate-*l*N/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\sin x \cdot \left(\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          10. distribute-lft-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          12. lower-sin.f64N/A

            \[\leadsto \color{blue}{\sin x} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + 1\right)} \]
        5. Simplified93.6%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \left(1 + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)}\right) \]
          3. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)} \]
          4. associate-*r*N/A

            \[\leadsto x \cdot \left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}\right) \]
          5. distribute-rgt1-inN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {x}^{2}\right)} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        8. Simplified26.6%

          \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{4} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
        10. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{4}\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{4} \cdot \frac{1}{120}\right)} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto x \cdot \color{blue}{\left({y}^{4} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          4. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left({y}^{4} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          5. metadata-evalN/A

            \[\leadsto x \cdot \left({y}^{\color{blue}{\left(2 \cdot 2\right)}} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          6. pow-sqrN/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot {y}^{2}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot {y}^{2}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          11. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          12. +-commutativeN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right)\right) \]
          13. distribute-rgt-inN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \frac{1}{120} + 1 \cdot \frac{1}{120}\right)}\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} \cdot \frac{1}{120} + 1 \cdot \frac{1}{120}\right)\right) \]
          15. associate-*l*N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{1}{120}\right)} + 1 \cdot \frac{1}{120}\right)\right) \]
          16. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \color{blue}{\frac{-1}{720}} + 1 \cdot \frac{1}{120}\right)\right) \]
          17. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{1}{120} \cdot \frac{-1}{6}\right)} + 1 \cdot \frac{1}{120}\right)\right) \]
          18. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \left(\frac{1}{120} \cdot \frac{-1}{6}\right) + \color{blue}{\frac{1}{120}}\right)\right) \]
          19. lower-fma.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)}\right) \]
          20. unpow2N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
          21. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
          22. metadata-eval26.3

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{-0.001388888888888889}, 0.008333333333333333\right)\right) \]
        11. Simplified26.3%

          \[\leadsto x \cdot \color{blue}{\left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)} \]

        if -0.0100000000000000002 < (sin.f64 x)

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
        4. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto \sin x + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)\right)} \]
          2. associate-+r+N/A

            \[\leadsto \color{blue}{\left(\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
          3. *-lft-identityN/A

            \[\leadsto \left(\color{blue}{1 \cdot \sin x} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left({y}^{2} \cdot \frac{1}{6}\right) \cdot \sin x}\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          6. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)} + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          7. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left({y}^{2} \cdot {y}^{2}\right) \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)} \]
          8. *-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right)} \]
          9. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\color{blue}{\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          10. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\sin x \cdot \left(\frac{1}{5040} \cdot {y}^{2} + \frac{1}{120}\right)\right)} \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          11. +-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\sin x \cdot \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
        5. Simplified91.2%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \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)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \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)} \]
          2. distribute-rgt-inN/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 x + 1 \cdot x} \]
          3. *-commutativeN/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 x + 1 \cdot x \]
          4. associate-*l*N/A

            \[\leadsto \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 x\right)} + 1 \cdot x \]
          5. *-lft-identityN/A

            \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \left({y}^{2} \cdot x\right) + \color{blue}{x} \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{2} \cdot x, x\right)} \]
        8. Simplified65.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), \left(y \cdot y\right) \cdot x, x\right)} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(y \cdot \left(y \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{5040} + \frac{1}{120}\right)\right) + \frac{1}{6}\right) \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
          2. lift-fma.f64N/A

            \[\leadsto \left(y \cdot \left(y \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right)}\right) + \frac{1}{6}\right) \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
          3. lift-*.f64N/A

            \[\leadsto \left(y \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right)\right)} + \frac{1}{6}\right) \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
          4. lift-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right)} \cdot \left(\left(y \cdot y\right) \cdot x\right) + x \]
          5. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right) \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot x\right) + x \]
          6. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right), \frac{1}{6}\right) \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot x\right)} + x \]
        10. Applied egg-rr66.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot x, x\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification56.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x \cdot y, x\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 19: 77.9% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot \left(y \cdot 0.008333333333333333\right)\right), y, \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= x 5e-7)
         (* (/ (sinh y) y) (fma -0.16666666666666666 (* x (* x x)) x))
         (*
          (sin x)
          (fma
           (* y (* y (* y 0.008333333333333333)))
           y
           (fma y (* y 0.16666666666666666) 1.0)))))
      double code(double x, double y) {
      	double tmp;
      	if (x <= 5e-7) {
      		tmp = (sinh(y) / y) * fma(-0.16666666666666666, (x * (x * x)), x);
      	} else {
      		tmp = sin(x) * fma((y * (y * (y * 0.008333333333333333))), y, fma(y, (y * 0.16666666666666666), 1.0));
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (x <= 5e-7)
      		tmp = Float64(Float64(sinh(y) / y) * fma(-0.16666666666666666, Float64(x * Float64(x * x)), x));
      	else
      		tmp = Float64(sin(x) * fma(Float64(y * Float64(y * Float64(y * 0.008333333333333333))), y, fma(y, Float64(y * 0.16666666666666666), 1.0)));
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[x, 5e-7], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq 5 \cdot 10^{-7}:\\
      \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot \left(y \cdot 0.008333333333333333\right)\right), y, \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 4.99999999999999977e-7

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \cdot \frac{\sinh y}{y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right) \cdot \frac{\sinh y}{y} \]
          2. distribute-lft-inN/A

            \[\leadsto \color{blue}{\left(x \cdot \left(\frac{-1}{6} \cdot {x}^{2}\right) + x \cdot 1\right)} \cdot \frac{\sinh y}{y} \]
          3. *-commutativeN/A

            \[\leadsto \left(x \cdot \color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          4. associate-*r*N/A

            \[\leadsto \left(\color{blue}{\left(x \cdot {x}^{2}\right) \cdot \frac{-1}{6}} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          5. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\frac{-1}{6} \cdot \left(x \cdot {x}^{2}\right)} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          6. *-rgt-identityN/A

            \[\leadsto \left(\frac{-1}{6} \cdot \left(x \cdot {x}^{2}\right) + \color{blue}{x}\right) \cdot \frac{\sinh y}{y} \]
          7. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{6}, x \cdot {x}^{2}, x\right)} \cdot \frac{\sinh y}{y} \]
          8. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \frac{\sinh y}{y} \]
          9. unpow2N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \frac{\sinh y}{y} \]
          10. lower-*.f6477.6

            \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \frac{\sinh y}{y} \]
        5. Simplified77.6%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)} \cdot \frac{\sinh y}{y} \]

        if 4.99999999999999977e-7 < x

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right)} \]
        4. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \sin x + \color{blue}{\left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right)} \]
          2. *-rgt-identityN/A

            \[\leadsto \color{blue}{\sin x \cdot 1} + \left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right) \]
          3. distribute-rgt-inN/A

            \[\leadsto \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)} \]
          4. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}} \]
          5. associate-*r*N/A

            \[\leadsto \sin x \cdot 1 + \left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2} \]
          6. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\sin x \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)\right)} \cdot {y}^{2} \]
          7. +-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \left(\sin x \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right) \cdot {y}^{2} \]
          8. associate-*l*N/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\sin x \cdot \left(\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          10. distribute-lft-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          12. lower-sin.f64N/A

            \[\leadsto \color{blue}{\sin x} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + 1\right)} \]
        5. Simplified91.8%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \sin x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \left(y \cdot \left(y \cdot \frac{1}{120}\right) + \frac{1}{6}\right) + 1\right) \]
          2. lift-*.f64N/A

            \[\leadsto \sin x \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot \color{blue}{\left(y \cdot \frac{1}{120}\right)} + \frac{1}{6}\right) + 1\right) \]
          3. lift-fma.f64N/A

            \[\leadsto \sin x \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(y, y \cdot \frac{1}{120}, \frac{1}{6}\right)} + 1\right) \]
          4. lift-fma.f64N/A

            \[\leadsto \sin x \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot \left(y \cdot \frac{1}{120}\right) + \frac{1}{6}\right)} + 1\right) \]
          5. distribute-rgt-inN/A

            \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot \left(y \cdot y\right) + \frac{1}{6} \cdot \left(y \cdot y\right)\right)} + 1\right) \]
          6. associate-+l+N/A

            \[\leadsto \sin x \cdot \color{blue}{\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot \left(y \cdot y\right) + \left(\frac{1}{6} \cdot \left(y \cdot y\right) + 1\right)\right)} \]
          7. lift-*.f64N/A

            \[\leadsto \sin x \cdot \left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot \color{blue}{\left(y \cdot y\right)} + \left(\frac{1}{6} \cdot \left(y \cdot y\right) + 1\right)\right) \]
          8. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y\right) \cdot y} + \left(\frac{1}{6} \cdot \left(y \cdot y\right) + 1\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot \left(\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y\right) \cdot y + \left(\color{blue}{\left(y \cdot y\right) \cdot \frac{1}{6}} + 1\right)\right) \]
          10. lower-fma.f64N/A

            \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y, y, \left(y \cdot y\right) \cdot \frac{1}{6} + 1\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\color{blue}{\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y}, y, \left(y \cdot y\right) \cdot \frac{1}{6} + 1\right) \]
          12. lower-*.f64N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\color{blue}{\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right)} \cdot y, y, \left(y \cdot y\right) \cdot \frac{1}{6} + 1\right) \]
          13. lift-*.f64N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y, y, \color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{6} + 1\right) \]
          14. associate-*l*N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y, y, \color{blue}{y \cdot \left(y \cdot \frac{1}{6}\right)} + 1\right) \]
          15. lower-fma.f64N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y, y, \color{blue}{\mathsf{fma}\left(y, y \cdot \frac{1}{6}, 1\right)}\right) \]
          16. lower-*.f6491.8

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot 0.008333333333333333\right)\right) \cdot y, y, \mathsf{fma}\left(y, \color{blue}{y \cdot 0.16666666666666666}, 1\right)\right) \]
        7. Applied egg-rr91.8%

          \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\left(y \cdot \left(y \cdot 0.008333333333333333\right)\right) \cdot y, y, \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification81.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot \left(y \cdot 0.008333333333333333\right)\right), y, \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 20: 55.7% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right), x \cdot \left(y \cdot y\right), x\right)\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= (sin x) -0.01)
         (*
          x
          (*
           (* (* y y) (* y y))
           (fma (* x x) -0.001388888888888889 0.008333333333333333)))
         (fma (* y (* y (* (* y y) 0.0001984126984126984))) (* x (* y y)) x)))
      double code(double x, double y) {
      	double tmp;
      	if (sin(x) <= -0.01) {
      		tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
      	} else {
      		tmp = fma((y * (y * ((y * y) * 0.0001984126984126984))), (x * (y * y)), x);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (sin(x) <= -0.01)
      		tmp = Float64(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333)));
      	else
      		tmp = fma(Float64(y * Float64(y * Float64(Float64(y * y) * 0.0001984126984126984))), Float64(x * Float64(y * y)), x);
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\sin x \leq -0.01:\\
      \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right), x \cdot \left(y \cdot y\right), x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (sin.f64 x) < -0.0100000000000000002

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right)} \]
        4. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \sin x + \color{blue}{\left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right)} \]
          2. *-rgt-identityN/A

            \[\leadsto \color{blue}{\sin x \cdot 1} + \left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right) \]
          3. distribute-rgt-inN/A

            \[\leadsto \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)} \]
          4. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}} \]
          5. associate-*r*N/A

            \[\leadsto \sin x \cdot 1 + \left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2} \]
          6. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\sin x \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)\right)} \cdot {y}^{2} \]
          7. +-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \left(\sin x \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right) \cdot {y}^{2} \]
          8. associate-*l*N/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\sin x \cdot \left(\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          10. distribute-lft-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          12. lower-sin.f64N/A

            \[\leadsto \color{blue}{\sin x} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + 1\right)} \]
        5. Simplified93.6%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \left(1 + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)}\right) \]
          3. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)} \]
          4. associate-*r*N/A

            \[\leadsto x \cdot \left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}\right) \]
          5. distribute-rgt1-inN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {x}^{2}\right)} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        8. Simplified26.6%

          \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{4} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
        10. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{4}\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{4} \cdot \frac{1}{120}\right)} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto x \cdot \color{blue}{\left({y}^{4} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          4. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left({y}^{4} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          5. metadata-evalN/A

            \[\leadsto x \cdot \left({y}^{\color{blue}{\left(2 \cdot 2\right)}} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          6. pow-sqrN/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot {y}^{2}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot {y}^{2}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          11. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          12. +-commutativeN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right)\right) \]
          13. distribute-rgt-inN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \frac{1}{120} + 1 \cdot \frac{1}{120}\right)}\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} \cdot \frac{1}{120} + 1 \cdot \frac{1}{120}\right)\right) \]
          15. associate-*l*N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{1}{120}\right)} + 1 \cdot \frac{1}{120}\right)\right) \]
          16. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \color{blue}{\frac{-1}{720}} + 1 \cdot \frac{1}{120}\right)\right) \]
          17. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{1}{120} \cdot \frac{-1}{6}\right)} + 1 \cdot \frac{1}{120}\right)\right) \]
          18. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \left(\frac{1}{120} \cdot \frac{-1}{6}\right) + \color{blue}{\frac{1}{120}}\right)\right) \]
          19. lower-fma.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)}\right) \]
          20. unpow2N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
          21. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
          22. metadata-eval26.3

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{-0.001388888888888889}, 0.008333333333333333\right)\right) \]
        11. Simplified26.3%

          \[\leadsto x \cdot \color{blue}{\left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)} \]

        if -0.0100000000000000002 < (sin.f64 x)

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
        4. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto \sin x + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)\right)} \]
          2. associate-+r+N/A

            \[\leadsto \color{blue}{\left(\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
          3. *-lft-identityN/A

            \[\leadsto \left(\color{blue}{1 \cdot \sin x} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left({y}^{2} \cdot \frac{1}{6}\right) \cdot \sin x}\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          6. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)} + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          7. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left({y}^{2} \cdot {y}^{2}\right) \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)} \]
          8. *-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right)} \]
          9. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\color{blue}{\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          10. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\sin x \cdot \left(\frac{1}{5040} \cdot {y}^{2} + \frac{1}{120}\right)\right)} \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          11. +-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\sin x \cdot \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
        5. Simplified91.2%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \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)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \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)} \]
          2. distribute-rgt-inN/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 x + 1 \cdot x} \]
          3. *-commutativeN/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 x + 1 \cdot x \]
          4. associate-*l*N/A

            \[\leadsto \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 x\right)} + 1 \cdot x \]
          5. *-lft-identityN/A

            \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \left({y}^{2} \cdot x\right) + \color{blue}{x} \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{2} \cdot x, x\right)} \]
        8. Simplified65.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), \left(y \cdot y\right) \cdot x, x\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{5040} \cdot {y}^{4}}, \left(y \cdot y\right) \cdot x, x\right) \]
        10. Step-by-step derivation
          1. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(\frac{1}{5040} \cdot {y}^{\color{blue}{\left(2 \cdot 2\right)}}, \left(y \cdot y\right) \cdot x, x\right) \]
          2. pow-sqrN/A

            \[\leadsto \mathsf{fma}\left(\frac{1}{5040} \cdot \color{blue}{\left({y}^{2} \cdot {y}^{2}\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          3. associate-*l*N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot {y}^{2}}, \left(y \cdot y\right) \cdot x, x\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{{y}^{2} \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y \cdot y\right)} \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right), \left(y \cdot y\right) \cdot x, x\right) \]
          6. associate-*l*N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(y \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\left(\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          8. associate-*r*N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\left(\frac{1}{5040} \cdot \left({y}^{2} \cdot y\right)\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          9. unpow2N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \left(\frac{1}{5040} \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot y\right)\right), \left(y \cdot y\right) \cdot x, x\right) \]
          10. unpow3N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \left(\frac{1}{5040} \cdot \color{blue}{{y}^{3}}\right), \left(y \cdot y\right) \cdot x, x\right) \]
          11. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(\frac{1}{5040} \cdot {y}^{3}\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          12. unpow3N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \left(\frac{1}{5040} \cdot \color{blue}{\left(\left(y \cdot y\right) \cdot y\right)}\right), \left(y \cdot y\right) \cdot x, x\right) \]
          13. unpow2N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \left(\frac{1}{5040} \cdot \left(\color{blue}{{y}^{2}} \cdot y\right)\right), \left(y \cdot y\right) \cdot x, x\right) \]
          14. associate-*r*N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\left(\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot y\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          15. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          16. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{5040} \cdot {y}^{2}\right)\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
          17. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(y \cdot \left(y \cdot \color{blue}{\left({y}^{2} \cdot \frac{1}{5040}\right)}\right), \left(y \cdot y\right) \cdot x, x\right) \]
          18. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \left(y \cdot \color{blue}{\left({y}^{2} \cdot \frac{1}{5040}\right)}\right), \left(y \cdot y\right) \cdot x, x\right) \]
          19. unpow2N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \left(y \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{5040}\right)\right), \left(y \cdot y\right) \cdot x, x\right) \]
          20. lower-*.f6465.3

            \[\leadsto \mathsf{fma}\left(y \cdot \left(y \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot 0.0001984126984126984\right)\right), \left(y \cdot y\right) \cdot x, x\right) \]
        11. Simplified65.3%

          \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)}, \left(y \cdot y\right) \cdot x, x\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification55.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right), x \cdot \left(y \cdot y\right), x\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 21: 55.3% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= (sin x) -0.01)
         (*
          x
          (*
           (* (* y y) (* y y))
           (fma (* x x) -0.001388888888888889 0.008333333333333333)))
         (*
          x
          (fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))))
      double code(double x, double y) {
      	double tmp;
      	if (sin(x) <= -0.01) {
      		tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
      	} else {
      		tmp = x * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (sin(x) <= -0.01)
      		tmp = Float64(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333)));
      	else
      		tmp = Float64(x * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0));
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\sin x \leq -0.01:\\
      \;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (sin.f64 x) < -0.0100000000000000002

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right)} \]
        4. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \sin x + \color{blue}{\left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right)} \]
          2. *-rgt-identityN/A

            \[\leadsto \color{blue}{\sin x \cdot 1} + \left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right) \]
          3. distribute-rgt-inN/A

            \[\leadsto \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)} \]
          4. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}} \]
          5. associate-*r*N/A

            \[\leadsto \sin x \cdot 1 + \left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2} \]
          6. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\sin x \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)\right)} \cdot {y}^{2} \]
          7. +-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \left(\sin x \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right) \cdot {y}^{2} \]
          8. associate-*l*N/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\sin x \cdot \left(\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          10. distribute-lft-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          12. lower-sin.f64N/A

            \[\leadsto \color{blue}{\sin x} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + 1\right)} \]
        5. Simplified93.6%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \left(1 + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)}\right) \]
          3. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)} \]
          4. associate-*r*N/A

            \[\leadsto x \cdot \left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}\right) \]
          5. distribute-rgt1-inN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {x}^{2}\right)} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        8. Simplified26.6%

          \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{4} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
        10. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{4}\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{4} \cdot \frac{1}{120}\right)} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto x \cdot \color{blue}{\left({y}^{4} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          4. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left({y}^{4} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          5. metadata-evalN/A

            \[\leadsto x \cdot \left({y}^{\color{blue}{\left(2 \cdot 2\right)}} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          6. pow-sqrN/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \left(\color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot {y}^{2}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot y\right)} \cdot {y}^{2}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          11. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{120} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right) \]
          12. +-commutativeN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{120} \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right)\right) \]
          13. distribute-rgt-inN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \frac{1}{120} + 1 \cdot \frac{1}{120}\right)}\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} \cdot \frac{1}{120} + 1 \cdot \frac{1}{120}\right)\right) \]
          15. associate-*l*N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{1}{120}\right)} + 1 \cdot \frac{1}{120}\right)\right) \]
          16. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \color{blue}{\frac{-1}{720}} + 1 \cdot \frac{1}{120}\right)\right) \]
          17. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \color{blue}{\left(\frac{1}{120} \cdot \frac{-1}{6}\right)} + 1 \cdot \frac{1}{120}\right)\right) \]
          18. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left({x}^{2} \cdot \left(\frac{1}{120} \cdot \frac{-1}{6}\right) + \color{blue}{\frac{1}{120}}\right)\right) \]
          19. lower-fma.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)}\right) \]
          20. unpow2N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
          21. lower-*.f64N/A

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{120} \cdot \frac{-1}{6}, \frac{1}{120}\right)\right) \]
          22. metadata-eval26.3

            \[\leadsto x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{-0.001388888888888889}, 0.008333333333333333\right)\right) \]
        11. Simplified26.3%

          \[\leadsto x \cdot \color{blue}{\left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)} \]

        if -0.0100000000000000002 < (sin.f64 x)

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right)} \]
        4. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \sin x + \color{blue}{\left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right)} \]
          2. *-rgt-identityN/A

            \[\leadsto \color{blue}{\sin x \cdot 1} + \left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right) \]
          3. distribute-rgt-inN/A

            \[\leadsto \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)} \]
          4. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}} \]
          5. associate-*r*N/A

            \[\leadsto \sin x \cdot 1 + \left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2} \]
          6. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\sin x \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)\right)} \cdot {y}^{2} \]
          7. +-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \left(\sin x \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right) \cdot {y}^{2} \]
          8. associate-*l*N/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\sin x \cdot \left(\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          10. distribute-lft-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          12. lower-sin.f64N/A

            \[\leadsto \color{blue}{\sin x} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + 1\right)} \]
        5. Simplified87.7%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \sin x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \left(y \cdot \left(y \cdot \frac{1}{120}\right) + \frac{1}{6}\right) + 1\right) \]
          2. lift-*.f64N/A

            \[\leadsto \sin x \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot \color{blue}{\left(y \cdot \frac{1}{120}\right)} + \frac{1}{6}\right) + 1\right) \]
          3. lift-fma.f64N/A

            \[\leadsto \sin x \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(y, y \cdot \frac{1}{120}, \frac{1}{6}\right)} + 1\right) \]
          4. lift-fma.f64N/A

            \[\leadsto \sin x \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot \left(y \cdot \frac{1}{120}\right) + \frac{1}{6}\right)} + 1\right) \]
          5. distribute-rgt-inN/A

            \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot \left(y \cdot y\right) + \frac{1}{6} \cdot \left(y \cdot y\right)\right)} + 1\right) \]
          6. associate-+l+N/A

            \[\leadsto \sin x \cdot \color{blue}{\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot \left(y \cdot y\right) + \left(\frac{1}{6} \cdot \left(y \cdot y\right) + 1\right)\right)} \]
          7. lift-*.f64N/A

            \[\leadsto \sin x \cdot \left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot \color{blue}{\left(y \cdot y\right)} + \left(\frac{1}{6} \cdot \left(y \cdot y\right) + 1\right)\right) \]
          8. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(\color{blue}{\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y\right) \cdot y} + \left(\frac{1}{6} \cdot \left(y \cdot y\right) + 1\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot \left(\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y\right) \cdot y + \left(\color{blue}{\left(y \cdot y\right) \cdot \frac{1}{6}} + 1\right)\right) \]
          10. lower-fma.f64N/A

            \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y, y, \left(y \cdot y\right) \cdot \frac{1}{6} + 1\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\color{blue}{\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y}, y, \left(y \cdot y\right) \cdot \frac{1}{6} + 1\right) \]
          12. lower-*.f64N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\color{blue}{\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right)} \cdot y, y, \left(y \cdot y\right) \cdot \frac{1}{6} + 1\right) \]
          13. lift-*.f64N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y, y, \color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{6} + 1\right) \]
          14. associate-*l*N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y, y, \color{blue}{y \cdot \left(y \cdot \frac{1}{6}\right)} + 1\right) \]
          15. lower-fma.f64N/A

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot \frac{1}{120}\right)\right) \cdot y, y, \color{blue}{\mathsf{fma}\left(y, y \cdot \frac{1}{6}, 1\right)}\right) \]
          16. lower-*.f6487.7

            \[\leadsto \sin x \cdot \mathsf{fma}\left(\left(y \cdot \left(y \cdot 0.008333333333333333\right)\right) \cdot y, y, \mathsf{fma}\left(y, \color{blue}{y \cdot 0.16666666666666666}, 1\right)\right) \]
        7. Applied egg-rr87.7%

          \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\left(y \cdot \left(y \cdot 0.008333333333333333\right)\right) \cdot y, y, \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)} \]
        8. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{1}{120} \cdot {y}^{4} + \frac{1}{6} \cdot {y}^{2}\right)\right)} \]
        9. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{1}{120} \cdot {y}^{4} + \frac{1}{6} \cdot {y}^{2}\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{1}{120} \cdot {y}^{4} + \frac{1}{6} \cdot {y}^{2}\right) + 1\right)} \]
          3. metadata-evalN/A

            \[\leadsto x \cdot \left(\left(\frac{1}{120} \cdot {y}^{\color{blue}{\left(2 \cdot 2\right)}} + \frac{1}{6} \cdot {y}^{2}\right) + 1\right) \]
          4. pow-sqrN/A

            \[\leadsto x \cdot \left(\left(\frac{1}{120} \cdot \color{blue}{\left({y}^{2} \cdot {y}^{2}\right)} + \frac{1}{6} \cdot {y}^{2}\right) + 1\right) \]
          5. associate-*l*N/A

            \[\leadsto x \cdot \left(\left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}} + \frac{1}{6} \cdot {y}^{2}\right) + 1\right) \]
          6. distribute-rgt-inN/A

            \[\leadsto x \cdot \left(\color{blue}{{y}^{2} \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)} + 1\right) \]
          7. +-commutativeN/A

            \[\leadsto x \cdot \left({y}^{2} \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)} + 1\right) \]
          8. lower-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{6} + \frac{1}{120} \cdot {y}^{2}, 1\right)} \]
          9. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} + \frac{1}{120} \cdot {y}^{2}, 1\right) \]
          10. lower-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{6} + \frac{1}{120} \cdot {y}^{2}, 1\right) \]
          11. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}}, 1\right) \]
          12. *-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{{y}^{2} \cdot \frac{1}{120}} + \frac{1}{6}, 1\right) \]
          13. lower-fma.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{120}, \frac{1}{6}\right)}, 1\right) \]
          14. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{120}, \frac{1}{6}\right), 1\right) \]
          15. lower-*.f6465.2

            \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(\color{blue}{y \cdot y}, 0.008333333333333333, 0.16666666666666666\right), 1\right) \]
        10. Simplified65.2%

          \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 22: 77.9% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= x 5e-7)
         (* (/ (sinh y) y) (fma -0.16666666666666666 (* x (* x x)) x))
         (*
          (sin x)
          (fma (* y y) (fma y (* y 0.008333333333333333) 0.16666666666666666) 1.0))))
      double code(double x, double y) {
      	double tmp;
      	if (x <= 5e-7) {
      		tmp = (sinh(y) / y) * fma(-0.16666666666666666, (x * (x * x)), x);
      	} else {
      		tmp = sin(x) * fma((y * y), fma(y, (y * 0.008333333333333333), 0.16666666666666666), 1.0);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (x <= 5e-7)
      		tmp = Float64(Float64(sinh(y) / y) * fma(-0.16666666666666666, Float64(x * Float64(x * x)), x));
      	else
      		tmp = Float64(sin(x) * fma(Float64(y * y), fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), 1.0));
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[x, 5e-7], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq 5 \cdot 10^{-7}:\\
      \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 4.99999999999999977e-7

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \cdot \frac{\sinh y}{y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right) \cdot \frac{\sinh y}{y} \]
          2. distribute-lft-inN/A

            \[\leadsto \color{blue}{\left(x \cdot \left(\frac{-1}{6} \cdot {x}^{2}\right) + x \cdot 1\right)} \cdot \frac{\sinh y}{y} \]
          3. *-commutativeN/A

            \[\leadsto \left(x \cdot \color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          4. associate-*r*N/A

            \[\leadsto \left(\color{blue}{\left(x \cdot {x}^{2}\right) \cdot \frac{-1}{6}} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          5. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\frac{-1}{6} \cdot \left(x \cdot {x}^{2}\right)} + x \cdot 1\right) \cdot \frac{\sinh y}{y} \]
          6. *-rgt-identityN/A

            \[\leadsto \left(\frac{-1}{6} \cdot \left(x \cdot {x}^{2}\right) + \color{blue}{x}\right) \cdot \frac{\sinh y}{y} \]
          7. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{6}, x \cdot {x}^{2}, x\right)} \cdot \frac{\sinh y}{y} \]
          8. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, \color{blue}{x \cdot {x}^{2}}, x\right) \cdot \frac{\sinh y}{y} \]
          9. unpow2N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \frac{\sinh y}{y} \]
          10. lower-*.f6477.6

            \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot \color{blue}{\left(x \cdot x\right)}, x\right) \cdot \frac{\sinh y}{y} \]
        5. Simplified77.6%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)} \cdot \frac{\sinh y}{y} \]

        if 4.99999999999999977e-7 < x

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right)} \]
        4. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \sin x + \color{blue}{\left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right)} \]
          2. *-rgt-identityN/A

            \[\leadsto \color{blue}{\sin x \cdot 1} + \left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right) \]
          3. distribute-rgt-inN/A

            \[\leadsto \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)} \]
          4. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}} \]
          5. associate-*r*N/A

            \[\leadsto \sin x \cdot 1 + \left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2} \]
          6. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\sin x \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)\right)} \cdot {y}^{2} \]
          7. +-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \left(\sin x \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right) \cdot {y}^{2} \]
          8. associate-*l*N/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\sin x \cdot \left(\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          10. distribute-lft-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          12. lower-sin.f64N/A

            \[\leadsto \color{blue}{\sin x} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + 1\right)} \]
        5. Simplified91.8%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification81.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 23: 48.6% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.16666666666666666, x \cdot \left(y \cdot y\right), x\right)\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (<= (sin x) -0.01)
         (* (* x (* x x)) (fma (* y y) -0.027777777777777776 -0.16666666666666666))
         (fma 0.16666666666666666 (* x (* y y)) x)))
      double code(double x, double y) {
      	double tmp;
      	if (sin(x) <= -0.01) {
      		tmp = (x * (x * x)) * fma((y * y), -0.027777777777777776, -0.16666666666666666);
      	} else {
      		tmp = fma(0.16666666666666666, (x * (y * y)), x);
      	}
      	return tmp;
      }
      
      function code(x, y)
      	tmp = 0.0
      	if (sin(x) <= -0.01)
      		tmp = Float64(Float64(x * Float64(x * x)) * fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666));
      	else
      		tmp = fma(0.16666666666666666, Float64(x * Float64(y * y)), x);
      	end
      	return tmp
      end
      
      code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\sin x \leq -0.01:\\
      \;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(0.16666666666666666, x \cdot \left(y \cdot y\right), x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (sin.f64 x) < -0.0100000000000000002

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right)} \]
        4. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \sin x + \color{blue}{\left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right)} \]
          2. *-rgt-identityN/A

            \[\leadsto \color{blue}{\sin x \cdot 1} + \left(\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right)\right) \cdot {y}^{2} + \left(\frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}\right) \]
          3. distribute-rgt-inN/A

            \[\leadsto \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)} \]
          4. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\frac{1}{120} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2}} \]
          5. associate-*r*N/A

            \[\leadsto \sin x \cdot 1 + \left(\color{blue}{\left(\frac{1}{120} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{6} \cdot \sin x\right) \cdot {y}^{2} \]
          6. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\left(\sin x \cdot \left(\frac{1}{120} \cdot {y}^{2} + \frac{1}{6}\right)\right)} \cdot {y}^{2} \]
          7. +-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \left(\sin x \cdot \color{blue}{\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)}\right) \cdot {y}^{2} \]
          8. associate-*l*N/A

            \[\leadsto \sin x \cdot 1 + \color{blue}{\sin x \cdot \left(\left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) \cdot {y}^{2}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \sin x \cdot 1 + \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          10. distribute-lft-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          12. lower-sin.f64N/A

            \[\leadsto \color{blue}{\sin x} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \sin x \cdot \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + 1\right)} \]
        5. Simplified93.6%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \left(1 + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)}\right) \]
          3. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \frac{-1}{6} \cdot \left({x}^{2} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)\right)} \]
          4. associate-*r*N/A

            \[\leadsto x \cdot \left(\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)}\right) \]
          5. distribute-rgt1-inN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {x}^{2} + 1\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {x}^{2}\right)} \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {x}^{2}\right) \cdot \left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)\right)} \]
        8. Simplified26.6%

          \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)} \]
        9. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + \left(\frac{-1}{6} \cdot {x}^{2} + \frac{1}{6} \cdot \left({y}^{2} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)\right)} \]
        10. Step-by-step derivation
          1. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {x}^{2}\right) + \frac{1}{6} \cdot \left({y}^{2} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)\right)} \]
          2. associate-*r*N/A

            \[\leadsto x \cdot \left(\left(1 + \frac{-1}{6} \cdot {x}^{2}\right) + \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)}\right) \]
          3. distribute-rgt1-inN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\frac{1}{6} \cdot {y}^{2} + 1\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          5. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + \frac{1}{6} \cdot {y}^{2}\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(\frac{1}{6} \cdot {y}^{2} + 1\right)} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          7. lower-fma.f64N/A

            \[\leadsto x \cdot \left(\color{blue}{\mathsf{fma}\left(\frac{1}{6}, {y}^{2}, 1\right)} \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, \color{blue}{y \cdot y}, 1\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, \color{blue}{y \cdot y}, 1\right) \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)\right) \]
          10. +-commutativeN/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, y \cdot y, 1\right) \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)}\right) \]
          11. *-commutativeN/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, y \cdot y, 1\right) \cdot \left(\color{blue}{{x}^{2} \cdot \frac{-1}{6}} + 1\right)\right) \]
          12. unpow2N/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, y \cdot y, 1\right) \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{-1}{6} + 1\right)\right) \]
          13. associate-*l*N/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, y \cdot y, 1\right) \cdot \left(\color{blue}{x \cdot \left(x \cdot \frac{-1}{6}\right)} + 1\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, y \cdot y, 1\right) \cdot \left(x \cdot \color{blue}{\left(\frac{-1}{6} \cdot x\right)} + 1\right)\right) \]
          15. lower-fma.f64N/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, y \cdot y, 1\right) \cdot \color{blue}{\mathsf{fma}\left(x, \frac{-1}{6} \cdot x, 1\right)}\right) \]
          16. *-commutativeN/A

            \[\leadsto x \cdot \left(\mathsf{fma}\left(\frac{1}{6}, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{-1}{6}}, 1\right)\right) \]
          17. lower-*.f6426.6

            \[\leadsto x \cdot \left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, \color{blue}{x \cdot -0.16666666666666666}, 1\right)\right) \]
        11. Simplified26.6%

          \[\leadsto x \cdot \color{blue}{\left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\right)} \]
        12. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({x}^{3} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right)} \]
        13. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot {x}^{3}\right) \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
          2. *-commutativeN/A

            \[\leadsto \color{blue}{\left({x}^{3} \cdot \frac{-1}{6}\right)} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) \]
          3. associate-*r*N/A

            \[\leadsto \color{blue}{{x}^{3} \cdot \left(\frac{-1}{6} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right)} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{{x}^{3} \cdot \left(\frac{-1}{6} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right)} \]
          5. cube-multN/A

            \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot \left(\frac{-1}{6} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right) \]
          6. unpow2N/A

            \[\leadsto \left(x \cdot \color{blue}{{x}^{2}}\right) \cdot \left(\frac{-1}{6} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right) \]
          7. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(x \cdot {x}^{2}\right)} \cdot \left(\frac{-1}{6} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right) \]
          8. unpow2N/A

            \[\leadsto \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot \left(\frac{-1}{6} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot \left(\frac{-1}{6} \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)\right) \]
          10. +-commutativeN/A

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(\frac{1}{6} \cdot {y}^{2} + 1\right)}\right) \]
          11. distribute-rgt-inN/A

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \color{blue}{\left(\left(\frac{1}{6} \cdot {y}^{2}\right) \cdot \frac{-1}{6} + 1 \cdot \frac{-1}{6}\right)} \]
          12. *-commutativeN/A

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\color{blue}{\left({y}^{2} \cdot \frac{1}{6}\right)} \cdot \frac{-1}{6} + 1 \cdot \frac{-1}{6}\right) \]
          13. associate-*l*N/A

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\color{blue}{{y}^{2} \cdot \left(\frac{1}{6} \cdot \frac{-1}{6}\right)} + 1 \cdot \frac{-1}{6}\right) \]
          14. metadata-evalN/A

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \left({y}^{2} \cdot \color{blue}{\frac{-1}{36}} + 1 \cdot \frac{-1}{6}\right) \]
          15. metadata-evalN/A

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \left({y}^{2} \cdot \frac{-1}{36} + \color{blue}{\frac{-1}{6}}\right) \]
          16. lower-fma.f64N/A

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{-1}{36}, \frac{-1}{6}\right)} \]
          17. unpow2N/A

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{-1}{36}, \frac{-1}{6}\right) \]
          18. lower-*.f6426.6

            \[\leadsto \left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, -0.027777777777777776, -0.16666666666666666\right) \]
        14. Simplified26.6%

          \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)} \]

        if -0.0100000000000000002 < (sin.f64 x)

        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x + {y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
        4. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto \sin x + \color{blue}{\left({y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)\right)} \]
          2. associate-+r+N/A

            \[\leadsto \color{blue}{\left(\sin x + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right)} \]
          3. *-lft-identityN/A

            \[\leadsto \left(\color{blue}{1 \cdot \sin x} + {y}^{2} \cdot \left(\frac{1}{6} \cdot \sin x\right)\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left({y}^{2} \cdot \frac{1}{6}\right) \cdot \sin x}\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(1 \cdot \sin x + \color{blue}{\left(\frac{1}{6} \cdot {y}^{2}\right)} \cdot \sin x\right) + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          6. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right)} + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)\right) \]
          7. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left({y}^{2} \cdot {y}^{2}\right) \cdot \left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right)} \]
          8. *-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\frac{1}{5040} \cdot \left({y}^{2} \cdot \sin x\right) + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right)} \]
          9. associate-*r*N/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\color{blue}{\left(\frac{1}{5040} \cdot {y}^{2}\right) \cdot \sin x} + \frac{1}{120} \cdot \sin x\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          10. distribute-rgt-outN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \color{blue}{\left(\sin x \cdot \left(\frac{1}{5040} \cdot {y}^{2} + \frac{1}{120}\right)\right)} \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
          11. +-commutativeN/A

            \[\leadsto \sin x \cdot \left(1 + \frac{1}{6} \cdot {y}^{2}\right) + \left(\sin x \cdot \color{blue}{\left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)}\right) \cdot \left({y}^{2} \cdot {y}^{2}\right) \]
        5. Simplified91.2%

          \[\leadsto \color{blue}{\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \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)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \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)} \]
          2. distribute-rgt-inN/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 x + 1 \cdot x} \]
          3. *-commutativeN/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 x + 1 \cdot x \]
          4. associate-*l*N/A

            \[\leadsto \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 x\right)} + 1 \cdot x \]
          5. *-lft-identityN/A

            \[\leadsto \left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right)\right) \cdot \left({y}^{2} \cdot x\right) + \color{blue}{x} \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{6} + {y}^{2} \cdot \left(\frac{1}{120} + \frac{1}{5040} \cdot {y}^{2}\right), {y}^{2} \cdot x, x\right)} \]
        8. Simplified65.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), \left(y \cdot y\right) \cdot x, x\right)} \]
        9. Taylor expanded in y around 0

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{6}}, \left(y \cdot y\right) \cdot x, x\right) \]
        10. Step-by-step derivation
          1. Simplified57.4%

            \[\leadsto \mathsf{fma}\left(\color{blue}{0.16666666666666666}, \left(y \cdot y\right) \cdot x, x\right) \]
        11. Recombined 2 regimes into one program.
        12. Final simplification49.3%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\sin x \leq -0.01:\\ \;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.16666666666666666, x \cdot \left(y \cdot y\right), x\right)\\ \end{array} \]
        13. Add Preprocessing

        Alternative 24: 10.5% accurate, 13.6× speedup?

        \[\begin{array}{l} \\ -0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right) \end{array} \]
        (FPCore (x y) :precision binary64 (* -0.16666666666666666 (* x (* x x))))
        double code(double x, double y) {
        	return -0.16666666666666666 * (x * (x * x));
        }
        
        real(8) function code(x, y)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            code = (-0.16666666666666666d0) * (x * (x * x))
        end function
        
        public static double code(double x, double y) {
        	return -0.16666666666666666 * (x * (x * x));
        }
        
        def code(x, y):
        	return -0.16666666666666666 * (x * (x * x))
        
        function code(x, y)
        	return Float64(-0.16666666666666666 * Float64(x * Float64(x * x)))
        end
        
        function tmp = code(x, y)
        	tmp = -0.16666666666666666 * (x * (x * x));
        end
        
        code[x_, y_] := N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        -0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)
        \end{array}
        
        Derivation
        1. Initial program 100.0%

          \[\sin x \cdot \frac{\sinh y}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\sin x} \]
        4. Step-by-step derivation
          1. lower-sin.f6447.0

            \[\leadsto \color{blue}{\sin x} \]
        5. Simplified47.0%

          \[\leadsto \color{blue}{\sin x} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(1 + \frac{-1}{6} \cdot {x}^{2}\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2} + 1\right)} \]
          2. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x + 1 \cdot x} \]
          3. *-lft-identityN/A

            \[\leadsto \left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x + \color{blue}{x} \]
          4. *-commutativeN/A

            \[\leadsto \color{blue}{\left({x}^{2} \cdot \frac{-1}{6}\right)} \cdot x + x \]
          5. associate-*l*N/A

            \[\leadsto \color{blue}{{x}^{2} \cdot \left(\frac{-1}{6} \cdot x\right)} + x \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{-1}{6} \cdot x, x\right)} \]
          7. unpow2N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot x, x\right) \]
          8. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{-1}{6} \cdot x, x\right) \]
          9. lower-*.f6434.1

            \[\leadsto \mathsf{fma}\left(x \cdot x, \color{blue}{-0.16666666666666666 \cdot x}, x\right) \]
        8. Simplified34.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot x, -0.16666666666666666 \cdot x, x\right)} \]
        9. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{-1}{6} \cdot {x}^{3}} \]
        10. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{-1}{6} \cdot {x}^{3}} \]
          2. cube-multN/A

            \[\leadsto \frac{-1}{6} \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \]
          3. unpow2N/A

            \[\leadsto \frac{-1}{6} \cdot \left(x \cdot \color{blue}{{x}^{2}}\right) \]
          4. lower-*.f64N/A

            \[\leadsto \frac{-1}{6} \cdot \color{blue}{\left(x \cdot {x}^{2}\right)} \]
          5. unpow2N/A

            \[\leadsto \frac{-1}{6} \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \]
          6. lower-*.f6412.4

            \[\leadsto -0.16666666666666666 \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \]
        11. Simplified12.4%

          \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)} \]
        12. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2024208 
        (FPCore (x y)
          :name "Linear.Quaternion:$ccos from linear-1.19.1.3"
          :precision binary64
          (* (sin x) (/ (sinh y) y)))