Linear.Quaternion:$ccos from linear-1.19.1.3

Percentage Accurate: 100.0% → 99.2%
Time: 4.2s
Alternatives: 17
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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    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 17 alternatives:

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

Initial Program: 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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    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: 99.2% accurate, 0.4× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_0 := \frac{\sinh y}{y}\\ t_1 := \sin x\_m \cdot t\_0\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\ \mathbf{elif}\;t\_1 \leq 1:\\ \;\;\;\;\sin x\_m \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot t\_0\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
 :precision binary64
 (let* ((t_0 (/ (sinh y) y)) (t_1 (* (sin x_m) t_0)))
   (*
    x_s
    (if (<= t_1 (- INFINITY))
      (*
       (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
       (fma
        (fma (* y y) 0.008333333333333333 0.16666666666666666)
        (* y y)
        1.0))
      (if (<= t_1 1.0)
        (*
         (sin x_m)
         (fma
          (fma
           (fma 0.0001984126984126984 (* y y) 0.008333333333333333)
           (* y y)
           0.16666666666666666)
          (* y y)
          1.0))
        (* x_m t_0))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
	double t_0 = sinh(y) / y;
	double t_1 = sin(x_m) * t_0;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
	} else if (t_1 <= 1.0) {
		tmp = sin(x_m) * fma(fma(fma(0.0001984126984126984, (y * y), 0.008333333333333333), (y * y), 0.16666666666666666), (y * y), 1.0);
	} else {
		tmp = x_m * t_0;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y)
	t_0 = Float64(sinh(y) / y)
	t_1 = Float64(sin(x_m) * t_0)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0));
	elseif (t_1 <= 1.0)
		tmp = Float64(sin(x_m) * fma(fma(fma(0.0001984126984126984, Float64(y * y), 0.008333333333333333), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0));
	else
		tmp = Float64(x_m * t_0);
	end
	return Float64(x_s * tmp)
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[x$95$m], $MachinePrecision] * t$95$0), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1.0], N[(N[Sin[x$95$m], $MachinePrecision] * N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x$95$m * t$95$0), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

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

\mathbf{else}:\\
\;\;\;\;x\_m \cdot t\_0\\


\end{array}
\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 \sin x \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 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(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \]
    8. Applied rewrites63.5%

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

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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin x \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot \color{blue}{y}, 1\right) \]
    5. Applied rewrites100.0%

      \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), 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 x around 0

      \[\leadsto \color{blue}{x} \cdot \frac{\sinh y}{y} \]
    4. Step-by-step derivation
      1. Applied rewrites78.1%

        \[\leadsto \color{blue}{x} \cdot \frac{\sinh y}{y} \]
    5. Recombined 3 regimes into one program.
    6. Add Preprocessing

    Alternative 2: 99.1% accurate, 0.4× speedup?

    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\ t_1 := \frac{\sinh y}{y}\\ t_2 := \sin x\_m \cdot t\_1\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot t\_0\\ \mathbf{elif}\;t\_2 \leq 1:\\ \;\;\;\;\sin x\_m \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot t\_1\\ \end{array} \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    (FPCore (x_s x_m y)
     :precision binary64
     (let* ((t_0
             (fma
              (fma (* y y) 0.008333333333333333 0.16666666666666666)
              (* y y)
              1.0))
            (t_1 (/ (sinh y) y))
            (t_2 (* (sin x_m) t_1)))
       (*
        x_s
        (if (<= t_2 (- INFINITY))
          (* (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m) t_0)
          (if (<= t_2 1.0) (* (sin x_m) t_0) (* x_m t_1))))))
    x\_m = fabs(x);
    x\_s = copysign(1.0, x);
    double code(double x_s, double x_m, double y) {
    	double t_0 = fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
    	double t_1 = sinh(y) / y;
    	double t_2 = sin(x_m) * t_1;
    	double tmp;
    	if (t_2 <= -((double) INFINITY)) {
    		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * t_0;
    	} else if (t_2 <= 1.0) {
    		tmp = sin(x_m) * t_0;
    	} else {
    		tmp = x_m * t_1;
    	}
    	return x_s * tmp;
    }
    
    x\_m = abs(x)
    x\_s = copysign(1.0, x)
    function code(x_s, x_m, y)
    	t_0 = fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0)
    	t_1 = Float64(sinh(y) / y)
    	t_2 = Float64(sin(x_m) * t_1)
    	tmp = 0.0
    	if (t_2 <= Float64(-Inf))
    		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * t_0);
    	elseif (t_2 <= 1.0)
    		tmp = Float64(sin(x_m) * t_0);
    	else
    		tmp = Float64(x_m * t_1);
    	end
    	return Float64(x_s * tmp)
    end
    
    x\_m = N[Abs[x], $MachinePrecision]
    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[x$95$m], $MachinePrecision] * t$95$1), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[t$95$2, 1.0], N[(N[Sin[x$95$m], $MachinePrecision] * t$95$0), $MachinePrecision], N[(x$95$m * t$95$1), $MachinePrecision]]]), $MachinePrecision]]]]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    
    \\
    \begin{array}{l}
    t_0 := \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\
    t_1 := \frac{\sinh y}{y}\\
    t_2 := \sin x\_m \cdot t\_1\\
    x\_s \cdot \begin{array}{l}
    \mathbf{if}\;t\_2 \leq -\infty:\\
    \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot t\_0\\
    
    \mathbf{elif}\;t\_2 \leq 1:\\
    \;\;\;\;\sin x\_m \cdot t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;x\_m \cdot t\_1\\
    
    
    \end{array}
    \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 \sin x \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 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(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
      7. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \]
      8. Applied rewrites63.5%

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

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 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 x around 0

        \[\leadsto \color{blue}{x} \cdot \frac{\sinh y}{y} \]
      4. Step-by-step derivation
        1. Applied rewrites78.1%

          \[\leadsto \color{blue}{x} \cdot \frac{\sinh y}{y} \]
      5. Recombined 3 regimes into one program.
      6. Add Preprocessing

      Alternative 3: 99.0% accurate, 0.4× speedup?

      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_0 := \frac{\sinh y}{y}\\ t_1 := \sin x\_m \cdot t\_0\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\ \mathbf{elif}\;t\_1 \leq 1:\\ \;\;\;\;\sin x\_m \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot t\_0\\ \end{array} \end{array} \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      (FPCore (x_s x_m y)
       :precision binary64
       (let* ((t_0 (/ (sinh y) y)) (t_1 (* (sin x_m) t_0)))
         (*
          x_s
          (if (<= t_1 (- INFINITY))
            (*
             (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
             (fma
              (fma (* y y) 0.008333333333333333 0.16666666666666666)
              (* y y)
              1.0))
            (if (<= t_1 1.0)
              (* (sin x_m) (fma (* y y) 0.16666666666666666 1.0))
              (* x_m t_0))))))
      x\_m = fabs(x);
      x\_s = copysign(1.0, x);
      double code(double x_s, double x_m, double y) {
      	double t_0 = sinh(y) / y;
      	double t_1 = sin(x_m) * t_0;
      	double tmp;
      	if (t_1 <= -((double) INFINITY)) {
      		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
      	} else if (t_1 <= 1.0) {
      		tmp = sin(x_m) * fma((y * y), 0.16666666666666666, 1.0);
      	} else {
      		tmp = x_m * t_0;
      	}
      	return x_s * tmp;
      }
      
      x\_m = abs(x)
      x\_s = copysign(1.0, x)
      function code(x_s, x_m, y)
      	t_0 = Float64(sinh(y) / y)
      	t_1 = Float64(sin(x_m) * t_0)
      	tmp = 0.0
      	if (t_1 <= Float64(-Inf))
      		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0));
      	elseif (t_1 <= 1.0)
      		tmp = Float64(sin(x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0));
      	else
      		tmp = Float64(x_m * t_0);
      	end
      	return Float64(x_s * tmp)
      end
      
      x\_m = N[Abs[x], $MachinePrecision]
      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[x$95$m], $MachinePrecision] * t$95$0), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1.0], N[(N[Sin[x$95$m], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(x$95$m * t$95$0), $MachinePrecision]]]), $MachinePrecision]]]
      
      \begin{array}{l}
      x\_m = \left|x\right|
      \\
      x\_s = \mathsf{copysign}\left(1, x\right)
      
      \\
      \begin{array}{l}
      t_0 := \frac{\sinh y}{y}\\
      t_1 := \sin x\_m \cdot t\_0\\
      x\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_1 \leq -\infty:\\
      \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\
      
      \mathbf{elif}\;t\_1 \leq 1:\\
      \;\;\;\;\sin x\_m \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x\_m \cdot t\_0\\
      
      
      \end{array}
      \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 \sin x \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 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(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
        7. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

            \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \]
        8. Applied rewrites63.5%

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

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

        1. Initial program 99.9%

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

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

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

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

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

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

            \[\leadsto \sin x \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
        5. Applied rewrites99.6%

          \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 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}{x} \cdot \frac{\sinh y}{y} \]
        4. Step-by-step derivation
          1. Applied rewrites78.1%

            \[\leadsto \color{blue}{x} \cdot \frac{\sinh y}{y} \]
        5. Recombined 3 regimes into one program.
        6. Add Preprocessing

        Alternative 4: 98.8% accurate, 0.4× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_0 := \frac{\sinh y}{y}\\ t_1 := \sin x\_m \cdot t\_0\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\ \mathbf{elif}\;t\_1 \leq 1:\\ \;\;\;\;\sin x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot t\_0\\ \end{array} \end{array} \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        (FPCore (x_s x_m y)
         :precision binary64
         (let* ((t_0 (/ (sinh y) y)) (t_1 (* (sin x_m) t_0)))
           (*
            x_s
            (if (<= t_1 (- INFINITY))
              (*
               (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
               (fma
                (fma (* y y) 0.008333333333333333 0.16666666666666666)
                (* y y)
                1.0))
              (if (<= t_1 1.0) (sin x_m) (* x_m t_0))))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m, double y) {
        	double t_0 = sinh(y) / y;
        	double t_1 = sin(x_m) * t_0;
        	double tmp;
        	if (t_1 <= -((double) INFINITY)) {
        		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
        	} else if (t_1 <= 1.0) {
        		tmp = sin(x_m);
        	} else {
        		tmp = x_m * t_0;
        	}
        	return x_s * tmp;
        }
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        function code(x_s, x_m, y)
        	t_0 = Float64(sinh(y) / y)
        	t_1 = Float64(sin(x_m) * t_0)
        	tmp = 0.0
        	if (t_1 <= Float64(-Inf))
        		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0));
        	elseif (t_1 <= 1.0)
        		tmp = sin(x_m);
        	else
        		tmp = Float64(x_m * t_0);
        	end
        	return Float64(x_s * tmp)
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[x$95$m], $MachinePrecision] * t$95$0), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1.0], N[Sin[x$95$m], $MachinePrecision], N[(x$95$m * t$95$0), $MachinePrecision]]]), $MachinePrecision]]]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        \begin{array}{l}
        t_0 := \frac{\sinh y}{y}\\
        t_1 := \sin x\_m \cdot t\_0\\
        x\_s \cdot \begin{array}{l}
        \mathbf{if}\;t\_1 \leq -\infty:\\
        \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\
        
        \mathbf{elif}\;t\_1 \leq 1:\\
        \;\;\;\;\sin x\_m\\
        
        \mathbf{else}:\\
        \;\;\;\;x\_m \cdot t\_0\\
        
        
        \end{array}
        \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 \sin x \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 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(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
          7. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \]
          8. Applied rewrites63.5%

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

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

          1. Initial program 99.9%

            \[\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. lift-sin.f6498.8

              \[\leadsto \sin x \]
          5. Applied rewrites98.8%

            \[\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 x around 0

            \[\leadsto \color{blue}{x} \cdot \frac{\sinh y}{y} \]
          4. Step-by-step derivation
            1. Applied rewrites78.1%

              \[\leadsto \color{blue}{x} \cdot \frac{\sinh y}{y} \]
          5. Recombined 3 regimes into one program.
          6. Add Preprocessing

          Alternative 5: 95.0% accurate, 0.4× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_0 := \sin x\_m \cdot \frac{\sinh y}{y}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\ \mathbf{elif}\;t\_0 \leq 1:\\ \;\;\;\;\sin x\_m\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\ \end{array} \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          (FPCore (x_s x_m y)
           :precision binary64
           (let* ((t_0 (* (sin x_m) (/ (sinh y) y))))
             (*
              x_s
              (if (<= t_0 (- INFINITY))
                (*
                 (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
                 (fma
                  (fma (* y y) 0.008333333333333333 0.16666666666666666)
                  (* y y)
                  1.0))
                (if (<= t_0 1.0)
                  (sin x_m)
                  (*
                   (*
                    (fma
                     (fma (* x_m x_m) 0.008333333333333333 -0.16666666666666666)
                     (* x_m x_m)
                     1.0)
                    x_m)
                   (fma
                    (fma
                     (fma 0.0001984126984126984 (* y y) 0.008333333333333333)
                     (* y y)
                     0.16666666666666666)
                    (* y y)
                    1.0)))))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          double code(double x_s, double x_m, double y) {
          	double t_0 = sin(x_m) * (sinh(y) / y);
          	double tmp;
          	if (t_0 <= -((double) INFINITY)) {
          		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
          	} else if (t_0 <= 1.0) {
          		tmp = sin(x_m);
          	} else {
          		tmp = (fma(fma((x_m * x_m), 0.008333333333333333, -0.16666666666666666), (x_m * x_m), 1.0) * x_m) * fma(fma(fma(0.0001984126984126984, (y * y), 0.008333333333333333), (y * y), 0.16666666666666666), (y * y), 1.0);
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          function code(x_s, x_m, y)
          	t_0 = Float64(sin(x_m) * Float64(sinh(y) / y))
          	tmp = 0.0
          	if (t_0 <= Float64(-Inf))
          		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0));
          	elseif (t_0 <= 1.0)
          		tmp = sin(x_m);
          	else
          		tmp = Float64(Float64(fma(fma(Float64(x_m * x_m), 0.008333333333333333, -0.16666666666666666), Float64(x_m * x_m), 1.0) * x_m) * fma(fma(fma(0.0001984126984126984, Float64(y * y), 0.008333333333333333), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0));
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[Sin[x$95$m], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[Sin[x$95$m], $MachinePrecision], N[(N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          
          \\
          \begin{array}{l}
          t_0 := \sin x\_m \cdot \frac{\sinh y}{y}\\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;t\_0 \leq -\infty:\\
          \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\
          
          \mathbf{elif}\;t\_0 \leq 1:\\
          \;\;\;\;\sin x\_m\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\
          
          
          \end{array}
          \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 \sin x \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 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(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
            7. Step-by-step derivation
              1. *-commutativeN/A

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \]
            8. Applied rewrites63.5%

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

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

            1. Initial program 99.9%

              \[\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. lift-sin.f6498.8

                \[\leadsto \sin x \]
            5. Applied rewrites98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{5040}, y \cdot y, \frac{1}{120}\right), y \cdot y, \frac{1}{6}\right), y \cdot y, 1\right) \]
              7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 72.1% accurate, 0.8× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \cdot \frac{\sinh y}{y} \leq -0.04:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\ \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          (FPCore (x_s x_m y)
           :precision binary64
           (*
            x_s
            (if (<= (* (sin x_m) (/ (sinh y) y)) -0.04)
              (*
               (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
               (fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0))
              (*
               (*
                (fma
                 (fma (* x_m x_m) 0.008333333333333333 -0.16666666666666666)
                 (* x_m x_m)
                 1.0)
                x_m)
               (fma
                (fma
                 (fma 0.0001984126984126984 (* y y) 0.008333333333333333)
                 (* y y)
                 0.16666666666666666)
                (* y y)
                1.0)))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          double code(double x_s, double x_m, double y) {
          	double tmp;
          	if ((sin(x_m) * (sinh(y) / y)) <= -0.04) {
          		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
          	} else {
          		tmp = (fma(fma((x_m * x_m), 0.008333333333333333, -0.16666666666666666), (x_m * x_m), 1.0) * x_m) * fma(fma(fma(0.0001984126984126984, (y * y), 0.008333333333333333), (y * y), 0.16666666666666666), (y * y), 1.0);
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          function code(x_s, x_m, y)
          	tmp = 0.0
          	if (Float64(sin(x_m) * Float64(sinh(y) / y)) <= -0.04)
          		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0));
          	else
          		tmp = Float64(Float64(fma(fma(Float64(x_m * x_m), 0.008333333333333333, -0.16666666666666666), Float64(x_m * x_m), 1.0) * x_m) * fma(fma(fma(0.0001984126984126984, Float64(y * y), 0.008333333333333333), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0));
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[Sin[x$95$m], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -0.04], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          
          \\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;\sin x\_m \cdot \frac{\sinh y}{y} \leq -0.04:\\
          \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), 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.0400000000000000008

            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 \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 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(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
            7. Step-by-step derivation
              1. *-commutativeN/A

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \]
            8. Applied rewrites46.2%

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

            if -0.0400000000000000008 < (*.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 \sin x \cdot \color{blue}{\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)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{1}{5040}, y \cdot y, \frac{1}{120}\right), y \cdot y, \frac{1}{6}\right), y \cdot y, 1\right) \]
              7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 71.4% accurate, 0.8× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \cdot \frac{\sinh y}{y} \leq 0.001:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), y \cdot y, 1\right)\\ \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          (FPCore (x_s x_m y)
           :precision binary64
           (*
            x_s
            (if (<= (* (sin x_m) (/ (sinh y) y)) 0.001)
              (*
               (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
               (fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0))
              (*
               x_m
               (fma
                (fma
                 (* (fma (* y y) 0.0001984126984126984 0.008333333333333333) y)
                 y
                 0.16666666666666666)
                (* y y)
                1.0)))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          double code(double x_s, double x_m, double y) {
          	double tmp;
          	if ((sin(x_m) * (sinh(y) / y)) <= 0.001) {
          		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
          	} else {
          		tmp = x_m * fma(fma((fma((y * y), 0.0001984126984126984, 0.008333333333333333) * y), y, 0.16666666666666666), (y * y), 1.0);
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          function code(x_s, x_m, y)
          	tmp = 0.0
          	if (Float64(sin(x_m) * Float64(sinh(y) / y)) <= 0.001)
          		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0));
          	else
          		tmp = Float64(x_m * fma(fma(Float64(fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333) * y), y, 0.16666666666666666), Float64(y * y), 1.0));
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[Sin[x$95$m], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.001], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] * y), $MachinePrecision] * y + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          
          \\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;\sin x\_m \cdot \frac{\sinh y}{y} \leq 0.001:\\
          \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;x\_m \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), 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)) < 1e-3

            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 \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 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(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
            7. Step-by-step derivation
              1. *-commutativeN/A

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \]
            8. Applied rewrites66.2%

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

            if 1e-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 \sin x \cdot \color{blue}{\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)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right) \cdot y, y, \frac{1}{6}\right), y \cdot y, 1\right) \]
              10. lift-*.f6445.4

                \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), y \cdot y, 1\right) \]
            10. Applied rewrites45.4%

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

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

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

            Alternative 8: 69.8% accurate, 0.8× speedup?

            \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \cdot \frac{\sinh y}{y} \leq 0.001:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x\_m \cdot x\_m, 0.008333333333333333\right), x\_m \cdot x\_m, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), y \cdot y, 1\right)\\ \end{array} \end{array} \]
            x\_m = (fabs.f64 x)
            x\_s = (copysign.f64 #s(literal 1 binary64) x)
            (FPCore (x_s x_m y)
             :precision binary64
             (*
              x_s
              (if (<= (* (sin x_m) (/ (sinh y) y)) 0.001)
                (*
                 (fma
                  (fma
                   (fma -0.0001984126984126984 (* x_m x_m) 0.008333333333333333)
                   (* x_m x_m)
                   -0.16666666666666666)
                  (* x_m x_m)
                  1.0)
                 x_m)
                (*
                 x_m
                 (fma
                  (fma
                   (* (fma (* y y) 0.0001984126984126984 0.008333333333333333) y)
                   y
                   0.16666666666666666)
                  (* y y)
                  1.0)))))
            x\_m = fabs(x);
            x\_s = copysign(1.0, x);
            double code(double x_s, double x_m, double y) {
            	double tmp;
            	if ((sin(x_m) * (sinh(y) / y)) <= 0.001) {
            		tmp = fma(fma(fma(-0.0001984126984126984, (x_m * x_m), 0.008333333333333333), (x_m * x_m), -0.16666666666666666), (x_m * x_m), 1.0) * x_m;
            	} else {
            		tmp = x_m * fma(fma((fma((y * y), 0.0001984126984126984, 0.008333333333333333) * y), y, 0.16666666666666666), (y * y), 1.0);
            	}
            	return x_s * tmp;
            }
            
            x\_m = abs(x)
            x\_s = copysign(1.0, x)
            function code(x_s, x_m, y)
            	tmp = 0.0
            	if (Float64(sin(x_m) * Float64(sinh(y) / y)) <= 0.001)
            		tmp = Float64(fma(fma(fma(-0.0001984126984126984, Float64(x_m * x_m), 0.008333333333333333), Float64(x_m * x_m), -0.16666666666666666), Float64(x_m * x_m), 1.0) * x_m);
            	else
            		tmp = Float64(x_m * fma(fma(Float64(fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333) * y), y, 0.16666666666666666), Float64(y * y), 1.0));
            	end
            	return Float64(x_s * tmp)
            end
            
            x\_m = N[Abs[x], $MachinePrecision]
            x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[Sin[x$95$m], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.001], N[(N[(N[(N[(-0.0001984126984126984 * N[(x$95$m * x$95$m), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision], N[(x$95$m * N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] * y), $MachinePrecision] * y + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            x\_m = \left|x\right|
            \\
            x\_s = \mathsf{copysign}\left(1, x\right)
            
            \\
            x\_s \cdot \begin{array}{l}
            \mathbf{if}\;\sin x\_m \cdot \frac{\sinh y}{y} \leq 0.001:\\
            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x\_m \cdot x\_m, 0.008333333333333333\right), x\_m \cdot x\_m, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\\
            
            \mathbf{else}:\\
            \;\;\;\;x\_m \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), 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)) < 1e-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} \]
              4. Step-by-step derivation
                1. lift-sin.f6456.9

                  \[\leadsto \sin x \]
              5. Applied rewrites56.9%

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

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

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

                  \[\leadsto \left(1 + {x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {x}^{2}\right) - \frac{1}{6}\right)\right) \cdot x \]
              8. Applied rewrites50.2%

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

              if 1e-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 \sin x \cdot \color{blue}{\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)} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right) \cdot y, y, \frac{1}{6}\right), y \cdot y, 1\right) \]
                10. lift-*.f6445.4

                  \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), y \cdot y, 1\right) \]
              10. Applied rewrites45.4%

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

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

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

              Alternative 9: 57.5% accurate, 0.9× speedup?

              \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \leq -0.04:\\ \;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\\ \mathbf{elif}\;\sin x\_m \leq 2 \cdot 10^{-5}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\\ \end{array} \end{array} \]
              x\_m = (fabs.f64 x)
              x\_s = (copysign.f64 #s(literal 1 binary64) x)
              (FPCore (x_s x_m y)
               :precision binary64
               (*
                x_s
                (if (<= (sin x_m) -0.04)
                  (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
                  (if (<= (sin x_m) 2e-5)
                    (* x_m (fma (* y y) 0.16666666666666666 1.0))
                    (*
                     (fma
                      (fma x_m (* x_m 0.008333333333333333) -0.16666666666666666)
                      (* x_m x_m)
                      1.0)
                     x_m)))))
              x\_m = fabs(x);
              x\_s = copysign(1.0, x);
              double code(double x_s, double x_m, double y) {
              	double tmp;
              	if (sin(x_m) <= -0.04) {
              		tmp = fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m;
              	} else if (sin(x_m) <= 2e-5) {
              		tmp = x_m * fma((y * y), 0.16666666666666666, 1.0);
              	} else {
              		tmp = fma(fma(x_m, (x_m * 0.008333333333333333), -0.16666666666666666), (x_m * x_m), 1.0) * x_m;
              	}
              	return x_s * tmp;
              }
              
              x\_m = abs(x)
              x\_s = copysign(1.0, x)
              function code(x_s, x_m, y)
              	tmp = 0.0
              	if (sin(x_m) <= -0.04)
              		tmp = Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m);
              	elseif (sin(x_m) <= 2e-5)
              		tmp = Float64(x_m * fma(Float64(y * y), 0.16666666666666666, 1.0));
              	else
              		tmp = Float64(fma(fma(x_m, Float64(x_m * 0.008333333333333333), -0.16666666666666666), Float64(x_m * x_m), 1.0) * x_m);
              	end
              	return Float64(x_s * tmp)
              end
              
              x\_m = N[Abs[x], $MachinePrecision]
              x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], -0.04], N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[N[Sin[x$95$m], $MachinePrecision], 2e-5], N[(x$95$m * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * N[(x$95$m * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision]]]), $MachinePrecision]
              
              \begin{array}{l}
              x\_m = \left|x\right|
              \\
              x\_s = \mathsf{copysign}\left(1, x\right)
              
              \\
              x\_s \cdot \begin{array}{l}
              \mathbf{if}\;\sin x\_m \leq -0.04:\\
              \;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\\
              
              \mathbf{elif}\;\sin x\_m \leq 2 \cdot 10^{-5}:\\
              \;\;\;\;x\_m \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (sin.f64 x) < -0.0400000000000000008

                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. lift-sin.f6445.4

                    \[\leadsto \sin x \]
                5. Applied rewrites45.4%

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x \]
                8. Applied rewrites27.1%

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

                if -0.0400000000000000008 < (sin.f64 x) < 2.00000000000000016e-5

                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 \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                4. Step-by-step derivation
                  1. +-commutativeN/A

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

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

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

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

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

                  \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 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 \cdot y, \frac{1}{6}, 1\right) \]
                7. Step-by-step derivation
                  1. *-commutativeN/A

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

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

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

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

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

                    \[\leadsto \left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \]
                  7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
                8. Applied rewrites72.9%

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

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

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

                  if 2.00000000000000016e-5 < (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} \]
                  4. Step-by-step derivation
                    1. lift-sin.f6451.5

                      \[\leadsto \sin x \]
                  5. Applied rewrites51.5%

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x \]
                    7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x \]
                  8. Applied rewrites26.2%

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

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \frac{1}{120}, \frac{-1}{6}\right), x \cdot x, 1\right) \cdot x \]
                    2. lift-fma.f64N/A

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

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

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{120}, \frac{-1}{6}\right), x \cdot x, 1\right) \cdot x \]
                    5. lower-*.f6426.2

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x \]
                  10. Applied rewrites26.2%

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x \]
                11. Recombined 3 regimes into one program.
                12. Add Preprocessing

                Alternative 10: 57.5% accurate, 0.9× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \leq -0.04:\\ \;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\\ \mathbf{elif}\;\sin x\_m \leq 0.002:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x\_m \cdot \left(x\_m \cdot 0.008333333333333333\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\\ \end{array} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m y)
                 :precision binary64
                 (*
                  x_s
                  (if (<= (sin x_m) -0.04)
                    (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
                    (if (<= (sin x_m) 0.002)
                      (* x_m (fma (* y y) 0.16666666666666666 1.0))
                      (* (fma (* x_m (* x_m 0.008333333333333333)) (* x_m x_m) 1.0) x_m)))))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m, double y) {
                	double tmp;
                	if (sin(x_m) <= -0.04) {
                		tmp = fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m;
                	} else if (sin(x_m) <= 0.002) {
                		tmp = x_m * fma((y * y), 0.16666666666666666, 1.0);
                	} else {
                		tmp = fma((x_m * (x_m * 0.008333333333333333)), (x_m * x_m), 1.0) * x_m;
                	}
                	return x_s * tmp;
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m, y)
                	tmp = 0.0
                	if (sin(x_m) <= -0.04)
                		tmp = Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m);
                	elseif (sin(x_m) <= 0.002)
                		tmp = Float64(x_m * fma(Float64(y * y), 0.16666666666666666, 1.0));
                	else
                		tmp = Float64(fma(Float64(x_m * Float64(x_m * 0.008333333333333333)), Float64(x_m * x_m), 1.0) * x_m);
                	end
                	return Float64(x_s * tmp)
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], -0.04], N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[N[Sin[x$95$m], $MachinePrecision], 0.002], N[(x$95$m * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * N[(x$95$m * 0.008333333333333333), $MachinePrecision]), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision]]]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \begin{array}{l}
                \mathbf{if}\;\sin x\_m \leq -0.04:\\
                \;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\\
                
                \mathbf{elif}\;\sin x\_m \leq 0.002:\\
                \;\;\;\;x\_m \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(x\_m \cdot \left(x\_m \cdot 0.008333333333333333\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (sin.f64 x) < -0.0400000000000000008

                  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. lift-sin.f6445.4

                      \[\leadsto \sin x \]
                  5. Applied rewrites45.4%

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x \]
                  8. Applied rewrites27.1%

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

                  if -0.0400000000000000008 < (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 \sin x \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                  4. Step-by-step derivation
                    1. +-commutativeN/A

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

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

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

                      \[\leadsto \sin x \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \]
                    5. lower-*.f6473.3

                      \[\leadsto \sin x \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
                  5. Applied rewrites73.3%

                    \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 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 \cdot y, \frac{1}{6}, 1\right) \]
                  7. Step-by-step derivation
                    1. *-commutativeN/A

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

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

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

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

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

                      \[\leadsto \left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \]
                    7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
                  8. Applied rewrites73.3%

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

                    \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \]
                  10. Step-by-step derivation
                    1. Applied rewrites72.0%

                      \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 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 \color{blue}{\sin x} \]
                    4. Step-by-step derivation
                      1. lift-sin.f6450.2

                        \[\leadsto \sin x \]
                    5. Applied rewrites50.2%

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x \]
                      7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x \]
                    8. Applied rewrites24.1%

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

                      \[\leadsto \mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2}, x \cdot x, 1\right) \cdot x \]
                    10. Step-by-step derivation
                      1. pow2N/A

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

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

                        \[\leadsto \mathsf{fma}\left(\left(x \cdot x\right) \cdot \frac{1}{120}, x \cdot x, 1\right) \cdot x \]
                      4. lift-*.f6424.1

                        \[\leadsto \mathsf{fma}\left(\left(x \cdot x\right) \cdot 0.008333333333333333, x \cdot x, 1\right) \cdot x \]
                    11. Applied rewrites24.1%

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

                        \[\leadsto \mathsf{fma}\left(\left(x \cdot x\right) \cdot \frac{1}{120}, x \cdot x, 1\right) \cdot x \]
                      2. lift-*.f64N/A

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

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

                        \[\leadsto \mathsf{fma}\left(x \cdot \left(x \cdot \frac{1}{120}\right), x \cdot x, 1\right) \cdot x \]
                      5. lower-*.f6424.1

                        \[\leadsto \mathsf{fma}\left(x \cdot \left(x \cdot 0.008333333333333333\right), x \cdot x, 1\right) \cdot x \]
                    13. Applied rewrites24.1%

                      \[\leadsto \mathsf{fma}\left(x \cdot \left(x \cdot 0.008333333333333333\right), x \cdot x, 1\right) \cdot x \]
                  11. Recombined 3 regimes into one program.
                  12. Add Preprocessing

                  Alternative 11: 57.2% accurate, 0.9× speedup?

                  \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \cdot \frac{\sinh y}{y} \leq 0.001:\\ \;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\ \end{array} \end{array} \]
                  x\_m = (fabs.f64 x)
                  x\_s = (copysign.f64 #s(literal 1 binary64) x)
                  (FPCore (x_s x_m y)
                   :precision binary64
                   (*
                    x_s
                    (if (<= (* (sin x_m) (/ (sinh y) y)) 0.001)
                      (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
                      (* x_m (fma (* y y) 0.16666666666666666 1.0)))))
                  x\_m = fabs(x);
                  x\_s = copysign(1.0, x);
                  double code(double x_s, double x_m, double y) {
                  	double tmp;
                  	if ((sin(x_m) * (sinh(y) / y)) <= 0.001) {
                  		tmp = fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m;
                  	} else {
                  		tmp = x_m * fma((y * y), 0.16666666666666666, 1.0);
                  	}
                  	return x_s * tmp;
                  }
                  
                  x\_m = abs(x)
                  x\_s = copysign(1.0, x)
                  function code(x_s, x_m, y)
                  	tmp = 0.0
                  	if (Float64(sin(x_m) * Float64(sinh(y) / y)) <= 0.001)
                  		tmp = Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m);
                  	else
                  		tmp = Float64(x_m * fma(Float64(y * y), 0.16666666666666666, 1.0));
                  	end
                  	return Float64(x_s * tmp)
                  end
                  
                  x\_m = N[Abs[x], $MachinePrecision]
                  x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[Sin[x$95$m], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.001], N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision], N[(x$95$m * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                  
                  \begin{array}{l}
                  x\_m = \left|x\right|
                  \\
                  x\_s = \mathsf{copysign}\left(1, x\right)
                  
                  \\
                  x\_s \cdot \begin{array}{l}
                  \mathbf{if}\;\sin x\_m \cdot \frac{\sinh y}{y} \leq 0.001:\\
                  \;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x\_m \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1e-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} \]
                    4. Step-by-step derivation
                      1. lift-sin.f6456.9

                        \[\leadsto \sin x \]
                    5. Applied rewrites56.9%

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x \]
                    8. Applied rewrites48.9%

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

                    if 1e-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 \sin x \cdot \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                    4. Step-by-step derivation
                      1. +-commutativeN/A

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

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

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

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

                        \[\leadsto \sin x \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
                    5. Applied rewrites67.6%

                      \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 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 \cdot y, \frac{1}{6}, 1\right) \]
                    7. Step-by-step derivation
                      1. *-commutativeN/A

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

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

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

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

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

                        \[\leadsto \left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \]
                      7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
                    8. Applied rewrites34.7%

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

                      \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \]
                    10. Step-by-step derivation
                      1. Applied rewrites30.8%

                        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
                    11. Recombined 2 regimes into one program.
                    12. Add Preprocessing

                    Alternative 12: 100.0% accurate, 1.0× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(\sin x\_m \cdot \frac{\sinh y}{y}\right) \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y) :precision binary64 (* x_s (* (sin x_m) (/ (sinh y) y))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m, double y) {
                    	return x_s * (sin(x_m) * (sinh(y) / y));
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x_s, x_m, y)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y
                        code = x_s * (sin(x_m) * (sinh(y) / y))
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    public static double code(double x_s, double x_m, double y) {
                    	return x_s * (Math.sin(x_m) * (Math.sinh(y) / y));
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    def code(x_s, x_m, y):
                    	return x_s * (math.sin(x_m) * (math.sinh(y) / y))
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m, y)
                    	return Float64(x_s * Float64(sin(x_m) * Float64(sinh(y) / y)))
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    function tmp = code(x_s, x_m, y)
                    	tmp = x_s * (sin(x_m) * (sinh(y) / y));
                    end
                    
                    x\_m = N[Abs[x], $MachinePrecision]
                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[x$95$s_, x$95$m_, y_] := N[(x$95$s * N[(N[Sin[x$95$m], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \left(\sin x\_m \cdot \frac{\sinh y}{y}\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 100.0%

                      \[\sin x \cdot \frac{\sinh y}{y} \]
                    2. Add Preprocessing
                    3. Add Preprocessing

                    Alternative 13: 72.1% accurate, 1.3× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \leq 10^{-7}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), y \cdot y, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right)\\ \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y)
                     :precision binary64
                     (*
                      x_s
                      (if (<= (sin x_m) 1e-7)
                        (*
                         (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
                         (fma
                          (fma
                           (* (fma (* y y) 0.0001984126984126984 0.008333333333333333) y)
                           y
                           0.16666666666666666)
                          (* y y)
                          1.0))
                        (*
                         (*
                          (fma
                           (fma (* x_m x_m) 0.008333333333333333 -0.16666666666666666)
                           (* x_m x_m)
                           1.0)
                          x_m)
                         (fma (* (* y y) 0.008333333333333333) (* y y) 1.0)))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m, double y) {
                    	double tmp;
                    	if (sin(x_m) <= 1e-7) {
                    		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma((fma((y * y), 0.0001984126984126984, 0.008333333333333333) * y), y, 0.16666666666666666), (y * y), 1.0);
                    	} else {
                    		tmp = (fma(fma((x_m * x_m), 0.008333333333333333, -0.16666666666666666), (x_m * x_m), 1.0) * x_m) * fma(((y * y) * 0.008333333333333333), (y * y), 1.0);
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m, y)
                    	tmp = 0.0
                    	if (sin(x_m) <= 1e-7)
                    		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(Float64(fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333) * y), y, 0.16666666666666666), Float64(y * y), 1.0));
                    	else
                    		tmp = Float64(Float64(fma(fma(Float64(x_m * x_m), 0.008333333333333333, -0.16666666666666666), Float64(x_m * x_m), 1.0) * x_m) * fma(Float64(Float64(y * y) * 0.008333333333333333), Float64(y * y), 1.0));
                    	end
                    	return Float64(x_s * tmp)
                    end
                    
                    x\_m = N[Abs[x], $MachinePrecision]
                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], 1e-7], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] * y), $MachinePrecision] * y + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;\sin x\_m \leq 10^{-7}:\\
                    \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), y \cdot y, 1\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (sin.f64 x) < 9.9999999999999995e-8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \sin x \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot \color{blue}{y}, 1\right) \]
                      5. Applied rewrites90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{6}, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{5040}, \frac{1}{120}\right) \cdot y, y, \frac{1}{6}\right), y \cdot y, 1\right) \]
                        10. lift-*.f6469.9

                          \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right) \cdot y, y, 0.16666666666666666\right), y \cdot y, 1\right) \]
                      10. Applied rewrites69.9%

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

                      if 9.9999999999999995e-8 < (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 \color{blue}{\left(1 + {y}^{2} \cdot \left(\frac{1}{6} + \frac{1}{120} \cdot {y}^{2}\right)\right)} \]
                      4. Step-by-step derivation
                        1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 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(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
                      7. Step-by-step derivation
                        1. *-commutativeN/A

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

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

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

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

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

                          \[\leadsto \left(\mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \frac{1}{120}, \frac{1}{6}\right), y \cdot y, 1\right) \]
                        7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \]
                      8. Applied rewrites30.8%

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

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

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

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

                          \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \frac{1}{120}, \frac{-1}{6}\right), x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot \frac{1}{120}, y \cdot y, 1\right) \]
                        4. lift-*.f6430.8

                          \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right) \]
                      11. Applied rewrites30.8%

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

                    Alternative 14: 61.0% accurate, 1.6× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\\ \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y)
                     :precision binary64
                     (*
                      x_s
                      (if (<= (sin x_m) 2e-5)
                        (*
                         (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
                         (fma (* y y) 0.16666666666666666 1.0))
                        (*
                         (fma
                          (fma x_m (* x_m 0.008333333333333333) -0.16666666666666666)
                          (* x_m x_m)
                          1.0)
                         x_m))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m, double y) {
                    	double tmp;
                    	if (sin(x_m) <= 2e-5) {
                    		tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma((y * y), 0.16666666666666666, 1.0);
                    	} else {
                    		tmp = fma(fma(x_m, (x_m * 0.008333333333333333), -0.16666666666666666), (x_m * x_m), 1.0) * x_m;
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m, y)
                    	tmp = 0.0
                    	if (sin(x_m) <= 2e-5)
                    		tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0));
                    	else
                    		tmp = Float64(fma(fma(x_m, Float64(x_m * 0.008333333333333333), -0.16666666666666666), Float64(x_m * x_m), 1.0) * x_m);
                    	end
                    	return Float64(x_s * tmp)
                    end
                    
                    x\_m = N[Abs[x], $MachinePrecision]
                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], 2e-5], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * N[(x$95$m * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision]]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;\sin x\_m \leq 2 \cdot 10^{-5}:\\
                    \;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (sin.f64 x) < 2.00000000000000016e-5

                      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 \color{blue}{\left(1 + \frac{1}{6} \cdot {y}^{2}\right)} \]
                      4. Step-by-step derivation
                        1. +-commutativeN/A

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

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

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

                          \[\leadsto \sin x \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{6}, 1\right) \]
                        5. lower-*.f6474.8

                          \[\leadsto \sin x \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
                      5. Applied rewrites74.8%

                        \[\leadsto \sin x \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 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 \cdot y, \frac{1}{6}, 1\right) \]
                      7. Step-by-step derivation
                        1. *-commutativeN/A

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

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

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

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

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

                          \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \]
                      8. Applied rewrites58.2%

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

                      if 2.00000000000000016e-5 < (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} \]
                      4. Step-by-step derivation
                        1. lift-sin.f6451.5

                          \[\leadsto \sin x \]
                      5. Applied rewrites51.5%

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{1}{120} \cdot {x}^{2} - \frac{1}{6} \cdot 1, {x}^{2}, 1\right) \cdot x \]
                        7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x \]
                      8. Applied rewrites26.2%

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

                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \frac{1}{120}, \frac{-1}{6}\right), x \cdot x, 1\right) \cdot x \]
                        2. lift-fma.f64N/A

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

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

                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{120}, \frac{-1}{6}\right), x \cdot x, 1\right) \cdot x \]
                        5. lower-*.f6426.2

                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x \cdot x, 1\right) \cdot x \]
                      10. Applied rewrites26.2%

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

                    Alternative 15: 35.0% accurate, 1.8× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\sin x\_m \leq -0.04:\\ \;\;\;\;\left(\left(-0.16666666666666666 \cdot x\_m\right) \cdot x\_m\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y)
                     :precision binary64
                     (*
                      x_s
                      (if (<= (sin x_m) -0.04) (* (* (* -0.16666666666666666 x_m) x_m) x_m) x_m)))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m, double y) {
                    	double tmp;
                    	if (sin(x_m) <= -0.04) {
                    		tmp = ((-0.16666666666666666 * x_m) * x_m) * x_m;
                    	} else {
                    		tmp = x_m;
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x_s, x_m, y)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y
                        real(8) :: tmp
                        if (sin(x_m) <= (-0.04d0)) then
                            tmp = (((-0.16666666666666666d0) * x_m) * x_m) * x_m
                        else
                            tmp = x_m
                        end if
                        code = x_s * tmp
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    public static double code(double x_s, double x_m, double y) {
                    	double tmp;
                    	if (Math.sin(x_m) <= -0.04) {
                    		tmp = ((-0.16666666666666666 * x_m) * x_m) * x_m;
                    	} else {
                    		tmp = x_m;
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    def code(x_s, x_m, y):
                    	tmp = 0
                    	if math.sin(x_m) <= -0.04:
                    		tmp = ((-0.16666666666666666 * x_m) * x_m) * x_m
                    	else:
                    		tmp = x_m
                    	return x_s * tmp
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m, y)
                    	tmp = 0.0
                    	if (sin(x_m) <= -0.04)
                    		tmp = Float64(Float64(Float64(-0.16666666666666666 * x_m) * x_m) * x_m);
                    	else
                    		tmp = x_m;
                    	end
                    	return Float64(x_s * tmp)
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    function tmp_2 = code(x_s, x_m, y)
                    	tmp = 0.0;
                    	if (sin(x_m) <= -0.04)
                    		tmp = ((-0.16666666666666666 * x_m) * x_m) * x_m;
                    	else
                    		tmp = x_m;
                    	end
                    	tmp_2 = x_s * tmp;
                    end
                    
                    x\_m = N[Abs[x], $MachinePrecision]
                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], -0.04], N[(N[(N[(-0.16666666666666666 * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision], x$95$m]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;\sin x\_m \leq -0.04:\\
                    \;\;\;\;\left(\left(-0.16666666666666666 \cdot x\_m\right) \cdot x\_m\right) \cdot x\_m\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x\_m\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (sin.f64 x) < -0.0400000000000000008

                      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. lift-sin.f6445.4

                          \[\leadsto \sin x \]
                      5. Applied rewrites45.4%

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x \]
                      8. Applied rewrites27.1%

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

                        \[\leadsto \left(\frac{-1}{6} \cdot {x}^{2}\right) \cdot x \]
                      10. Step-by-step derivation
                        1. pow2N/A

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

                          \[\leadsto \left(\left(\frac{-1}{6} \cdot x\right) \cdot x\right) \cdot x \]
                        3. lower-*.f64N/A

                          \[\leadsto \left(\left(\frac{-1}{6} \cdot x\right) \cdot x\right) \cdot x \]
                        4. lower-*.f6427.1

                          \[\leadsto \left(\left(-0.16666666666666666 \cdot x\right) \cdot x\right) \cdot x \]
                      11. Applied rewrites27.1%

                        \[\leadsto \left(\left(-0.16666666666666666 \cdot x\right) \cdot x\right) \cdot x \]

                      if -0.0400000000000000008 < (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} \]
                      4. Step-by-step derivation
                        1. lift-sin.f6447.4

                          \[\leadsto \sin x \]
                      5. Applied rewrites47.4%

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

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

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

                          \[\leadsto \left(1 + {x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {x}^{2}\right) - \frac{1}{6}\right)\right) \cdot x \]
                      8. Applied rewrites37.6%

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

                        \[\leadsto x \]
                      10. Step-by-step derivation
                        1. Applied rewrites30.0%

                          \[\leadsto x \]
                      11. Recombined 2 regimes into one program.
                      12. Add Preprocessing

                      Alternative 16: 34.1% accurate, 12.8× speedup?

                      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \end{array} \]
                      x\_m = (fabs.f64 x)
                      x\_s = (copysign.f64 #s(literal 1 binary64) x)
                      (FPCore (x_s x_m y)
                       :precision binary64
                       (* x_s (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)))
                      x\_m = fabs(x);
                      x\_s = copysign(1.0, x);
                      double code(double x_s, double x_m, double y) {
                      	return x_s * (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m);
                      }
                      
                      x\_m = abs(x)
                      x\_s = copysign(1.0, x)
                      function code(x_s, x_m, y)
                      	return Float64(x_s * Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m))
                      end
                      
                      x\_m = N[Abs[x], $MachinePrecision]
                      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[x$95$s_, x$95$m_, y_] := N[(x$95$s * N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      x\_m = \left|x\right|
                      \\
                      x\_s = \mathsf{copysign}\left(1, x\right)
                      
                      \\
                      x\_s \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\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. lift-sin.f6447.0

                          \[\leadsto \sin x \]
                      5. Applied rewrites47.0%

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot x \]
                      8. Applied rewrites34.1%

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

                      Alternative 17: 26.9% accurate, 217.0× speedup?

                      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot x\_m \end{array} \]
                      x\_m = (fabs.f64 x)
                      x\_s = (copysign.f64 #s(literal 1 binary64) x)
                      (FPCore (x_s x_m y) :precision binary64 (* x_s x_m))
                      x\_m = fabs(x);
                      x\_s = copysign(1.0, x);
                      double code(double x_s, double x_m, double y) {
                      	return x_s * x_m;
                      }
                      
                      x\_m =     private
                      x\_s =     private
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x_s, x_m, y)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x_s
                          real(8), intent (in) :: x_m
                          real(8), intent (in) :: y
                          code = x_s * x_m
                      end function
                      
                      x\_m = Math.abs(x);
                      x\_s = Math.copySign(1.0, x);
                      public static double code(double x_s, double x_m, double y) {
                      	return x_s * x_m;
                      }
                      
                      x\_m = math.fabs(x)
                      x\_s = math.copysign(1.0, x)
                      def code(x_s, x_m, y):
                      	return x_s * x_m
                      
                      x\_m = abs(x)
                      x\_s = copysign(1.0, x)
                      function code(x_s, x_m, y)
                      	return Float64(x_s * x_m)
                      end
                      
                      x\_m = abs(x);
                      x\_s = sign(x) * abs(1.0);
                      function tmp = code(x_s, x_m, y)
                      	tmp = x_s * x_m;
                      end
                      
                      x\_m = N[Abs[x], $MachinePrecision]
                      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[x$95$s_, x$95$m_, y_] := N[(x$95$s * x$95$m), $MachinePrecision]
                      
                      \begin{array}{l}
                      x\_m = \left|x\right|
                      \\
                      x\_s = \mathsf{copysign}\left(1, x\right)
                      
                      \\
                      x\_s \cdot x\_m
                      \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. lift-sin.f6447.0

                          \[\leadsto \sin x \]
                      5. Applied rewrites47.0%

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

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

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

                          \[\leadsto \left(1 + {x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {x}^{2}\right) - \frac{1}{6}\right)\right) \cdot x \]
                      8. Applied rewrites35.9%

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

                        \[\leadsto x \]
                      10. Step-by-step derivation
                        1. Applied rewrites23.6%

                          \[\leadsto x \]
                        2. Add Preprocessing

                        Reproduce

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