Linear.Quaternion:$ctanh from linear-1.19.1.3

Percentage Accurate: 95.9% → 98.9%
Time: 11.7s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 95.9% accurate, 1.0× speedup?

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

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

Alternative 1: 98.9% accurate, 1.0× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ \begin{array}{l} t_0 := \frac{\sin y}{y}\\ z\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2 \cdot 10^{-116}:\\ \;\;\;\;\frac{t\_0}{z\_m} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0 \cdot x}{z\_m}\\ \end{array} \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (let* ((t_0 (/ (sin y) y)))
   (* z_s (if (<= z_m 2e-116) (* (/ t_0 z_m) x) (/ (* t_0 x) z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double t_0 = sin(y) / y;
	double tmp;
	if (z_m <= 2e-116) {
		tmp = (t_0 / z_m) * x;
	} else {
		tmp = (t_0 * x) / z_m;
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sin(y) / y
    if (z_m <= 2d-116) then
        tmp = (t_0 / z_m) * x
    else
        tmp = (t_0 * x) / z_m
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
	double t_0 = Math.sin(y) / y;
	double tmp;
	if (z_m <= 2e-116) {
		tmp = (t_0 / z_m) * x;
	} else {
		tmp = (t_0 * x) / z_m;
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	t_0 = math.sin(y) / y
	tmp = 0
	if z_m <= 2e-116:
		tmp = (t_0 / z_m) * x
	else:
		tmp = (t_0 * x) / z_m
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	t_0 = Float64(sin(y) / y)
	tmp = 0.0
	if (z_m <= 2e-116)
		tmp = Float64(Float64(t_0 / z_m) * x);
	else
		tmp = Float64(Float64(t_0 * x) / z_m);
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m)
	t_0 = sin(y) / y;
	tmp = 0.0;
	if (z_m <= 2e-116)
		tmp = (t_0 / z_m) * x;
	else
		tmp = (t_0 * x) / z_m;
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, N[(z$95$s * If[LessEqual[z$95$m, 2e-116], N[(N[(t$95$0 / z$95$m), $MachinePrecision] * x), $MachinePrecision], N[(N[(t$95$0 * x), $MachinePrecision] / z$95$m), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2 \cdot 10^{-116}:\\
\;\;\;\;\frac{t\_0}{z\_m} \cdot x\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2e-116

    1. Initial program 93.0%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
      5. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
      6. sin-lowering-sin.f64N/A

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

        \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
      8. *-lowering-*.f6488.4

        \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
    4. Applied egg-rr88.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\sin y}{y}}}{z} \cdot x \]
      4. sin-lowering-sin.f6496.5

        \[\leadsto \frac{\frac{\color{blue}{\sin y}}{y}}{z} \cdot x \]
    6. Applied egg-rr96.5%

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

    if 2e-116 < z

    1. Initial program 99.8%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification97.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2 \cdot 10^{-116}:\\ \;\;\;\;\frac{\frac{\sin y}{y}}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sin y}{y} \cdot x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 91.6% accurate, 0.5× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ \begin{array}{l} t_0 := \frac{\sin y}{y}\\ z\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \cdot x \leq -2 \cdot 10^{-188}:\\ \;\;\;\;\frac{\sin y}{z\_m} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0}{z\_m} \cdot x\\ \end{array} \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (let* ((t_0 (/ (sin y) y)))
   (*
    z_s
    (if (<= (* t_0 x) -2e-188)
      (* (/ (sin y) z_m) (/ x y))
      (* (/ t_0 z_m) x)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double t_0 = sin(y) / y;
	double tmp;
	if ((t_0 * x) <= -2e-188) {
		tmp = (sin(y) / z_m) * (x / y);
	} else {
		tmp = (t_0 / z_m) * x;
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sin(y) / y
    if ((t_0 * x) <= (-2d-188)) then
        tmp = (sin(y) / z_m) * (x / y)
    else
        tmp = (t_0 / z_m) * x
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
	double t_0 = Math.sin(y) / y;
	double tmp;
	if ((t_0 * x) <= -2e-188) {
		tmp = (Math.sin(y) / z_m) * (x / y);
	} else {
		tmp = (t_0 / z_m) * x;
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	t_0 = math.sin(y) / y
	tmp = 0
	if (t_0 * x) <= -2e-188:
		tmp = (math.sin(y) / z_m) * (x / y)
	else:
		tmp = (t_0 / z_m) * x
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	t_0 = Float64(sin(y) / y)
	tmp = 0.0
	if (Float64(t_0 * x) <= -2e-188)
		tmp = Float64(Float64(sin(y) / z_m) * Float64(x / y));
	else
		tmp = Float64(Float64(t_0 / z_m) * x);
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m)
	t_0 = sin(y) / y;
	tmp = 0.0;
	if ((t_0 * x) <= -2e-188)
		tmp = (sin(y) / z_m) * (x / y);
	else
		tmp = (t_0 / z_m) * x;
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, N[(z$95$s * If[LessEqual[N[(t$95$0 * x), $MachinePrecision], -2e-188], N[(N[(N[Sin[y], $MachinePrecision] / z$95$m), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 / z$95$m), $MachinePrecision] * x), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \cdot x \leq -2 \cdot 10^{-188}:\\
\;\;\;\;\frac{\sin y}{z\_m} \cdot \frac{x}{y}\\

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


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

    1. Initial program 99.7%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{\sin y}{y} \cdot x}}{z} \]
      2. div-invN/A

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

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

        \[\leadsto \color{blue}{\frac{\sin y}{z} \cdot \left(\frac{1}{y} \cdot x\right)} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\frac{\sin y}{z} \cdot \left(\frac{1}{y} \cdot x\right)} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sin y}{z}} \cdot \left(\frac{1}{y} \cdot x\right) \]
      7. sin-lowering-sin.f64N/A

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

        \[\leadsto \frac{\sin y}{z} \cdot \color{blue}{\frac{1 \cdot x}{y}} \]
      9. *-lft-identityN/A

        \[\leadsto \frac{\sin y}{z} \cdot \frac{\color{blue}{x}}{y} \]
      10. /-lowering-/.f6487.5

        \[\leadsto \frac{\sin y}{z} \cdot \color{blue}{\frac{x}{y}} \]
    4. Applied egg-rr87.5%

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

    if -1.9999999999999999e-188 < (*.f64 x (/.f64 (sin.f64 y) y))

    1. Initial program 92.4%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
      5. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
      6. sin-lowering-sin.f64N/A

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

        \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
      8. *-lowering-*.f6491.6

        \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
    4. Applied egg-rr91.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\sin y}{y}}}{z} \cdot x \]
      4. sin-lowering-sin.f6496.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sin y}{y} \cdot x \leq -2 \cdot 10^{-188}:\\ \;\;\;\;\frac{\sin y}{z} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sin y}{y}}{z} \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 95.9% accurate, 0.5× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin y}{y} \leq 0.9999999995:\\ \;\;\;\;\frac{\sin y}{z\_m} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= (/ (sin y) y) 0.9999999995) (* (/ (sin y) z_m) (/ x y)) (/ x z_m))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((sin(y) / y) <= 0.9999999995) {
		tmp = (sin(y) / z_m) * (x / y);
	} else {
		tmp = x / z_m;
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if ((sin(y) / y) <= 0.9999999995d0) then
        tmp = (sin(y) / z_m) * (x / y)
    else
        tmp = x / z_m
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((Math.sin(y) / y) <= 0.9999999995) {
		tmp = (Math.sin(y) / z_m) * (x / y);
	} else {
		tmp = x / z_m;
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	tmp = 0
	if (math.sin(y) / y) <= 0.9999999995:
		tmp = (math.sin(y) / z_m) * (x / y)
	else:
		tmp = x / z_m
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (Float64(sin(y) / y) <= 0.9999999995)
		tmp = Float64(Float64(sin(y) / z_m) * Float64(x / y));
	else
		tmp = Float64(x / z_m);
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m)
	tmp = 0.0;
	if ((sin(y) / y) <= 0.9999999995)
		tmp = (sin(y) / z_m) * (x / y);
	else
		tmp = x / z_m;
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], 0.9999999995], N[(N[(N[Sin[y], $MachinePrecision] / z$95$m), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / z$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sin y}{y} \leq 0.9999999995:\\
\;\;\;\;\frac{\sin y}{z\_m} \cdot \frac{x}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{z\_m}\\


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

    1. Initial program 90.0%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{\sin y}{y} \cdot x}}{z} \]
      2. div-invN/A

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

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

        \[\leadsto \color{blue}{\frac{\sin y}{z} \cdot \left(\frac{1}{y} \cdot x\right)} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\frac{\sin y}{z} \cdot \left(\frac{1}{y} \cdot x\right)} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sin y}{z}} \cdot \left(\frac{1}{y} \cdot x\right) \]
      7. sin-lowering-sin.f64N/A

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

        \[\leadsto \frac{\sin y}{z} \cdot \color{blue}{\frac{1 \cdot x}{y}} \]
      9. *-lft-identityN/A

        \[\leadsto \frac{\sin y}{z} \cdot \frac{\color{blue}{x}}{y} \]
      10. /-lowering-/.f6490.1

        \[\leadsto \frac{\sin y}{z} \cdot \color{blue}{\frac{x}{y}} \]
    4. Applied egg-rr90.1%

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

    if 0.99999999949999996 < (/.f64 (sin.f64 y) y)

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\frac{x}{z}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64100.0

        \[\leadsto \color{blue}{\frac{x}{z}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 95.4% accurate, 0.5× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin y}{y} \leq 0.9999999995:\\ \;\;\;\;\frac{\sin y \cdot x}{z\_m \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= (/ (sin y) y) 0.9999999995) (/ (* (sin y) x) (* z_m y)) (/ x z_m))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((sin(y) / y) <= 0.9999999995) {
		tmp = (sin(y) * x) / (z_m * y);
	} else {
		tmp = x / z_m;
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if ((sin(y) / y) <= 0.9999999995d0) then
        tmp = (sin(y) * x) / (z_m * y)
    else
        tmp = x / z_m
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((Math.sin(y) / y) <= 0.9999999995) {
		tmp = (Math.sin(y) * x) / (z_m * y);
	} else {
		tmp = x / z_m;
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	tmp = 0
	if (math.sin(y) / y) <= 0.9999999995:
		tmp = (math.sin(y) * x) / (z_m * y)
	else:
		tmp = x / z_m
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (Float64(sin(y) / y) <= 0.9999999995)
		tmp = Float64(Float64(sin(y) * x) / Float64(z_m * y));
	else
		tmp = Float64(x / z_m);
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m)
	tmp = 0.0;
	if ((sin(y) / y) <= 0.9999999995)
		tmp = (sin(y) * x) / (z_m * y);
	else
		tmp = x / z_m;
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], 0.9999999995], N[(N[(N[Sin[y], $MachinePrecision] * x), $MachinePrecision] / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision], N[(x / z$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sin y}{y} \leq 0.9999999995:\\
\;\;\;\;\frac{\sin y \cdot x}{z\_m \cdot y}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{z\_m}\\


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

    1. Initial program 90.0%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/N/A

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

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

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \sin y}}{z \cdot y} \]
      5. sin-lowering-sin.f64N/A

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

        \[\leadsto \frac{x \cdot \sin y}{\color{blue}{y \cdot z}} \]
      7. *-lowering-*.f6488.5

        \[\leadsto \frac{x \cdot \sin y}{\color{blue}{y \cdot z}} \]
    4. Applied egg-rr88.5%

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

    if 0.99999999949999996 < (/.f64 (sin.f64 y) y)

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\frac{x}{z}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64100.0

        \[\leadsto \color{blue}{\frac{x}{z}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sin y}{y} \leq 0.9999999995:\\ \;\;\;\;\frac{\sin y \cdot x}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 95.4% accurate, 0.5× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sin y}{y} \leq 0.9999999995:\\ \;\;\;\;\sin y \cdot \frac{x}{z\_m \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= (/ (sin y) y) 0.9999999995) (* (sin y) (/ x (* z_m y))) (/ x z_m))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((sin(y) / y) <= 0.9999999995) {
		tmp = sin(y) * (x / (z_m * y));
	} else {
		tmp = x / z_m;
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if ((sin(y) / y) <= 0.9999999995d0) then
        tmp = sin(y) * (x / (z_m * y))
    else
        tmp = x / z_m
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((Math.sin(y) / y) <= 0.9999999995) {
		tmp = Math.sin(y) * (x / (z_m * y));
	} else {
		tmp = x / z_m;
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	tmp = 0
	if (math.sin(y) / y) <= 0.9999999995:
		tmp = math.sin(y) * (x / (z_m * y))
	else:
		tmp = x / z_m
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (Float64(sin(y) / y) <= 0.9999999995)
		tmp = Float64(sin(y) * Float64(x / Float64(z_m * y)));
	else
		tmp = Float64(x / z_m);
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m)
	tmp = 0.0;
	if ((sin(y) / y) <= 0.9999999995)
		tmp = sin(y) * (x / (z_m * y));
	else
		tmp = x / z_m;
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], 0.9999999995], N[(N[Sin[y], $MachinePrecision] * N[(x / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / z$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sin y}{y} \leq 0.9999999995:\\
\;\;\;\;\sin y \cdot \frac{x}{z\_m \cdot y}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{z\_m}\\


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

    1. Initial program 90.0%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{\sin y}{y} \cdot x}}{z} \]
      2. div-invN/A

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

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

        \[\leadsto \color{blue}{\sin y \cdot \frac{\frac{1}{y} \cdot x}{z}} \]
      5. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{\frac{1}{y} \cdot x}{z} \cdot \sin y} \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{y}}}{z} \cdot \sin y \]
      8. *-lft-identityN/A

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

        \[\leadsto \color{blue}{\frac{x}{z \cdot y}} \cdot \sin y \]
      10. /-lowering-/.f64N/A

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

        \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \cdot \sin y \]
      12. *-lowering-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \cdot \sin y \]
      13. sin-lowering-sin.f6488.4

        \[\leadsto \frac{x}{y \cdot z} \cdot \color{blue}{\sin y} \]
    4. Applied egg-rr88.4%

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

    if 0.99999999949999996 < (/.f64 (sin.f64 y) y)

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\frac{x}{z}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64100.0

        \[\leadsto \color{blue}{\frac{x}{z}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sin y}{y} \leq 0.9999999995:\\ \;\;\;\;\sin y \cdot \frac{x}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 58.9% accurate, 0.7× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\frac{\sin y}{y} \cdot x}{z\_m} \leq 10^{-312}:\\ \;\;\;\;\frac{\left(x \cdot x\right) \cdot \frac{1}{x - y \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= (/ (* (/ (sin y) y) x) z_m) 1e-312)
    (/ (* (* x x) (/ 1.0 (- x (* y (* x (* y -0.16666666666666666)))))) z_m)
    (/ x z_m))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((((sin(y) / y) * x) / z_m) <= 1e-312) {
		tmp = ((x * x) * (1.0 / (x - (y * (x * (y * -0.16666666666666666)))))) / z_m;
	} else {
		tmp = x / z_m;
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if ((((sin(y) / y) * x) / z_m) <= 1d-312) then
        tmp = ((x * x) * (1.0d0 / (x - (y * (x * (y * (-0.16666666666666666d0))))))) / z_m
    else
        tmp = x / z_m
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((((Math.sin(y) / y) * x) / z_m) <= 1e-312) {
		tmp = ((x * x) * (1.0 / (x - (y * (x * (y * -0.16666666666666666)))))) / z_m;
	} else {
		tmp = x / z_m;
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	tmp = 0
	if (((math.sin(y) / y) * x) / z_m) <= 1e-312:
		tmp = ((x * x) * (1.0 / (x - (y * (x * (y * -0.16666666666666666)))))) / z_m
	else:
		tmp = x / z_m
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (Float64(Float64(Float64(sin(y) / y) * x) / z_m) <= 1e-312)
		tmp = Float64(Float64(Float64(x * x) * Float64(1.0 / Float64(x - Float64(y * Float64(x * Float64(y * -0.16666666666666666)))))) / z_m);
	else
		tmp = Float64(x / z_m);
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m)
	tmp = 0.0;
	if ((((sin(y) / y) * x) / z_m) <= 1e-312)
		tmp = ((x * x) * (1.0 / (x - (y * (x * (y * -0.16666666666666666)))))) / z_m;
	else
		tmp = x / z_m;
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision] / z$95$m), $MachinePrecision], 1e-312], N[(N[(N[(x * x), $MachinePrecision] * N[(1.0 / N[(x - N[(y * N[(x * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision], N[(x / z$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\frac{\sin y}{y} \cdot x}{z\_m} \leq 10^{-312}:\\
\;\;\;\;\frac{\left(x \cdot x\right) \cdot \frac{1}{x - y \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)}}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{z\_m}\\


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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(y \cdot y\right), x\right)}{z}} \]
    6. Step-by-step derivation
      1. flip-+N/A

        \[\leadsto \frac{\color{blue}{\frac{\left(x \cdot \left(\frac{-1}{6} \cdot \left(y \cdot y\right)\right)\right) \cdot \left(x \cdot \left(\frac{-1}{6} \cdot \left(y \cdot y\right)\right)\right) - x \cdot x}{x \cdot \left(\frac{-1}{6} \cdot \left(y \cdot y\right)\right) - x}}}{z} \]
      2. div-invN/A

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

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

      \[\leadsto \frac{\color{blue}{\left(\left(\left(y \cdot y\right) \cdot \left(\left(y \cdot y\right) \cdot 0.027777777777777776\right)\right) \cdot \left(x \cdot x\right) - x \cdot x\right) \cdot \frac{1}{y \cdot \left(\left(y \cdot -0.16666666666666666\right) \cdot x\right) - x}}}{z} \]
    8. Taylor expanded in y around 0

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{x \cdot x}\right)\right) \cdot \frac{1}{y \cdot \left(\left(y \cdot \frac{-1}{6}\right) \cdot x\right) - x}}{z} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot \frac{1}{y \cdot \left(\left(y \cdot \frac{-1}{6}\right) \cdot x\right) - x}}{z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot \frac{1}{y \cdot \left(\left(y \cdot \frac{-1}{6}\right) \cdot x\right) - x}}{z} \]
      5. neg-lowering-neg.f6454.0

        \[\leadsto \frac{\left(x \cdot \color{blue}{\left(-x\right)}\right) \cdot \frac{1}{y \cdot \left(\left(y \cdot -0.16666666666666666\right) \cdot x\right) - x}}{z} \]
    10. Simplified54.0%

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

    if 9.9999999999847e-313 < (/.f64 (*.f64 x (/.f64 (sin.f64 y) y)) z)

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{\frac{x}{z}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6459.4

        \[\leadsto \color{blue}{\frac{x}{z}} \]
    5. Simplified59.4%

      \[\leadsto \color{blue}{\frac{x}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{\sin y}{y} \cdot x}{z} \leq 10^{-312}:\\ \;\;\;\;\frac{\left(x \cdot x\right) \cdot \frac{1}{x - y \cdot \left(x \cdot \left(y \cdot -0.16666666666666666\right)\right)}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.0% accurate, 0.8× speedup?

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

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sin y}{y} \leq 10^{-5}:\\
\;\;\;\;\frac{y}{\frac{z\_m \cdot y}{x}}\\

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


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

    1. Initial program 89.9%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

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

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

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

        \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
      5. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
      6. sin-lowering-sin.f64N/A

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

        \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
      8. *-lowering-*.f6488.2

        \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
    4. Applied egg-rr88.2%

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

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

        \[\leadsto \frac{\color{blue}{y}}{y \cdot z} \cdot x \]
      2. Step-by-step derivation
        1. div-invN/A

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

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

          \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{x}}} \]
        4. *-commutativeN/A

          \[\leadsto y \cdot \frac{1}{\frac{\color{blue}{z \cdot y}}{x}} \]
        5. associate-*l/N/A

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

          \[\leadsto \color{blue}{\frac{y}{\frac{z}{x} \cdot y}} \]
        7. /-lowering-/.f64N/A

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

          \[\leadsto \frac{y}{\color{blue}{\frac{z \cdot y}{x}}} \]
        9. *-commutativeN/A

          \[\leadsto \frac{y}{\frac{\color{blue}{y \cdot z}}{x}} \]
        10. /-lowering-/.f64N/A

          \[\leadsto \frac{y}{\color{blue}{\frac{y \cdot z}{x}}} \]
        11. *-lowering-*.f6422.5

          \[\leadsto \frac{y}{\frac{\color{blue}{y \cdot z}}{x}} \]
      3. Applied egg-rr22.5%

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

      if 1.00000000000000008e-5 < (/.f64 (sin.f64 y) y)

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(\color{blue}{y \cdot y}, 0.008333333333333333, -0.16666666666666666\right), 1\right)}{z} \]
      5. Simplified99.3%

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

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

    Alternative 8: 60.2% accurate, 0.8× speedup?

    \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\frac{\sin y}{y} \cdot x}{z\_m} \leq 2 \cdot 10^{-273}:\\ \;\;\;\;y \cdot \frac{x}{z\_m \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z\_m}\\ \end{array} \end{array} \]
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    (FPCore (z_s x y z_m)
     :precision binary64
     (*
      z_s
      (if (<= (/ (* (/ (sin y) y) x) z_m) 2e-273)
        (* y (/ x (* z_m y)))
        (/ x z_m))))
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    double code(double z_s, double x, double y, double z_m) {
    	double tmp;
    	if ((((sin(y) / y) * x) / z_m) <= 2e-273) {
    		tmp = y * (x / (z_m * y));
    	} else {
    		tmp = x / z_m;
    	}
    	return z_s * tmp;
    }
    
    z\_m = abs(z)
    z\_s = copysign(1.0d0, z)
    real(8) function code(z_s, x, y, z_m)
        real(8), intent (in) :: z_s
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z_m
        real(8) :: tmp
        if ((((sin(y) / y) * x) / z_m) <= 2d-273) then
            tmp = y * (x / (z_m * y))
        else
            tmp = x / z_m
        end if
        code = z_s * tmp
    end function
    
    z\_m = Math.abs(z);
    z\_s = Math.copySign(1.0, z);
    public static double code(double z_s, double x, double y, double z_m) {
    	double tmp;
    	if ((((Math.sin(y) / y) * x) / z_m) <= 2e-273) {
    		tmp = y * (x / (z_m * y));
    	} else {
    		tmp = x / z_m;
    	}
    	return z_s * tmp;
    }
    
    z\_m = math.fabs(z)
    z\_s = math.copysign(1.0, z)
    def code(z_s, x, y, z_m):
    	tmp = 0
    	if (((math.sin(y) / y) * x) / z_m) <= 2e-273:
    		tmp = y * (x / (z_m * y))
    	else:
    		tmp = x / z_m
    	return z_s * tmp
    
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    function code(z_s, x, y, z_m)
    	tmp = 0.0
    	if (Float64(Float64(Float64(sin(y) / y) * x) / z_m) <= 2e-273)
    		tmp = Float64(y * Float64(x / Float64(z_m * y)));
    	else
    		tmp = Float64(x / z_m);
    	end
    	return Float64(z_s * tmp)
    end
    
    z\_m = abs(z);
    z\_s = sign(z) * abs(1.0);
    function tmp_2 = code(z_s, x, y, z_m)
    	tmp = 0.0;
    	if ((((sin(y) / y) * x) / z_m) <= 2e-273)
    		tmp = y * (x / (z_m * y));
    	else
    		tmp = x / z_m;
    	end
    	tmp_2 = z_s * tmp;
    end
    
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision] / z$95$m), $MachinePrecision], 2e-273], N[(y * N[(x / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / z$95$m), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    
    \\
    z\_s \cdot \begin{array}{l}
    \mathbf{if}\;\frac{\frac{\sin y}{y} \cdot x}{z\_m} \leq 2 \cdot 10^{-273}:\\
    \;\;\;\;y \cdot \frac{x}{z\_m \cdot y}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x}{z\_m}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (*.f64 x (/.f64 (sin.f64 y) y)) z) < 2e-273

      1. Initial program 92.2%

        \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-/l*N/A

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

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

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

          \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
        5. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
        6. sin-lowering-sin.f64N/A

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

          \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
        8. *-lowering-*.f6488.5

          \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
      4. Applied egg-rr88.5%

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

        \[\leadsto \frac{\color{blue}{y}}{y \cdot z} \cdot x \]
      6. Step-by-step derivation
        1. Simplified52.0%

          \[\leadsto \frac{\color{blue}{y}}{y \cdot z} \cdot x \]
        2. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{x \cdot \frac{y}{y \cdot z}} \]
          2. associate-*r/N/A

            \[\leadsto \color{blue}{\frac{x \cdot y}{y \cdot z}} \]
          3. *-rgt-identityN/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y \cdot z\right) \cdot 1}} \]
          4. times-fracN/A

            \[\leadsto \color{blue}{\frac{x}{y \cdot z} \cdot \frac{y}{1}} \]
          5. /-rgt-identityN/A

            \[\leadsto \frac{x}{y \cdot z} \cdot \color{blue}{y} \]
          6. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{x}{y \cdot z} \cdot y} \]
          7. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \cdot y \]
          8. *-lowering-*.f6453.1

            \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \cdot y \]
        3. Applied egg-rr53.1%

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

        if 2e-273 < (/.f64 (*.f64 x (/.f64 (sin.f64 y) y)) z)

        1. Initial program 99.7%

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

          \[\leadsto \color{blue}{\frac{x}{z}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f6460.7

            \[\leadsto \color{blue}{\frac{x}{z}} \]
        5. Simplified60.7%

          \[\leadsto \color{blue}{\frac{x}{z}} \]
      7. Recombined 2 regimes into one program.
      8. Final simplification56.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{\sin y}{y} \cdot x}{z} \leq 2 \cdot 10^{-273}:\\ \;\;\;\;y \cdot \frac{x}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 9: 66.9% accurate, 0.9× speedup?

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

        1. Initial program 90.0%

          \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. associate-/l*N/A

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

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

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

            \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
          5. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
          6. sin-lowering-sin.f64N/A

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

            \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
          8. *-lowering-*.f6488.3

            \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
        4. Applied egg-rr88.3%

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

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

            \[\leadsto \frac{\color{blue}{y}}{y \cdot z} \cdot x \]
          2. Step-by-step derivation
            1. div-invN/A

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

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

              \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{x}}} \]
            4. *-commutativeN/A

              \[\leadsto y \cdot \frac{1}{\frac{\color{blue}{z \cdot y}}{x}} \]
            5. associate-*l/N/A

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

              \[\leadsto \color{blue}{\frac{y}{\frac{z}{x} \cdot y}} \]
            7. /-lowering-/.f64N/A

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

              \[\leadsto \frac{y}{\color{blue}{\frac{z \cdot y}{x}}} \]
            9. *-commutativeN/A

              \[\leadsto \frac{y}{\frac{\color{blue}{y \cdot z}}{x}} \]
            10. /-lowering-/.f64N/A

              \[\leadsto \frac{y}{\color{blue}{\frac{y \cdot z}{x}}} \]
            11. *-lowering-*.f6422.5

              \[\leadsto \frac{y}{\frac{\color{blue}{y \cdot z}}{x}} \]
          3. Applied egg-rr22.5%

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

          if 0.0200000000000000004 < (/.f64 (sin.f64 y) y)

          1. Initial program 100.0%

            \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. associate-/l*N/A

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

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

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

              \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
            5. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
            6. sin-lowering-sin.f64N/A

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

              \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
            8. *-lowering-*.f6486.7

              \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
          4. Applied egg-rr86.7%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{6}, \color{blue}{y \cdot y}, 1\right) \cdot \frac{1}{z}\right) \cdot x \]
            11. /-lowering-/.f6499.7

              \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right) \cdot \color{blue}{\frac{1}{z}}\right) \cdot x \]
          7. Simplified99.7%

            \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right) \cdot \frac{1}{z}\right)} \cdot x \]
          8. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

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

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

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

              \[\leadsto \left(\color{blue}{y \cdot \left(y \cdot \frac{-1}{6}\right)} + 1\right) \cdot \frac{x}{z} \]
            9. accelerator-lowering-fma.f64N/A

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

              \[\leadsto \mathsf{fma}\left(y, \color{blue}{y \cdot \frac{-1}{6}}, 1\right) \cdot \frac{x}{z} \]
            11. /-lowering-/.f64100.0

              \[\leadsto \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\frac{x}{z}} \]
          9. Applied egg-rr100.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right) \cdot \frac{x}{z}} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification61.8%

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

        Alternative 10: 66.8% accurate, 0.9× speedup?

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

          1. Initial program 90.0%

            \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{z}{x \cdot \frac{\sin y}{y}}}} \]
            2. associate-/r*N/A

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

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

              \[\leadsto \color{blue}{\frac{\sin y}{\frac{z}{x} \cdot y}} \]
            5. remove-double-divN/A

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

              \[\leadsto \frac{\sin y}{\color{blue}{\frac{\frac{z}{x}}{\frac{1}{y}}}} \]
            7. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\sin y}{\frac{\frac{z}{x}}{\frac{1}{y}}}} \]
            8. sin-lowering-sin.f64N/A

              \[\leadsto \frac{\color{blue}{\sin y}}{\frac{\frac{z}{x}}{\frac{1}{y}}} \]
            9. div-invN/A

              \[\leadsto \frac{\sin y}{\color{blue}{\frac{z}{x} \cdot \frac{1}{\frac{1}{y}}}} \]
            10. remove-double-divN/A

              \[\leadsto \frac{\sin y}{\frac{z}{x} \cdot \color{blue}{y}} \]
            11. *-lowering-*.f64N/A

              \[\leadsto \frac{\sin y}{\color{blue}{\frac{z}{x} \cdot y}} \]
            12. /-lowering-/.f6494.4

              \[\leadsto \frac{\sin y}{\color{blue}{\frac{z}{x}} \cdot y} \]
          4. Applied egg-rr94.4%

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

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

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

            if 0.0200000000000000004 < (/.f64 (sin.f64 y) y)

            1. Initial program 100.0%

              \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. associate-/l*N/A

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

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

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

                \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
              5. /-lowering-/.f64N/A

                \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
              6. sin-lowering-sin.f64N/A

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

                \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
              8. *-lowering-*.f6486.7

                \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
            4. Applied egg-rr86.7%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{6}, \color{blue}{y \cdot y}, 1\right) \cdot \frac{1}{z}\right) \cdot x \]
              11. /-lowering-/.f6499.7

                \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right) \cdot \color{blue}{\frac{1}{z}}\right) \cdot x \]
            7. Simplified99.7%

              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right) \cdot \frac{1}{z}\right)} \cdot x \]
            8. Step-by-step derivation
              1. *-commutativeN/A

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

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

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

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

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

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

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

                \[\leadsto \left(\color{blue}{y \cdot \left(y \cdot \frac{-1}{6}\right)} + 1\right) \cdot \frac{x}{z} \]
              9. accelerator-lowering-fma.f64N/A

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

                \[\leadsto \mathsf{fma}\left(y, \color{blue}{y \cdot \frac{-1}{6}}, 1\right) \cdot \frac{x}{z} \]
              11. /-lowering-/.f64100.0

                \[\leadsto \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\frac{x}{z}} \]
            9. Applied egg-rr100.0%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right) \cdot \frac{x}{z}} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification61.7%

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

          Alternative 11: 66.6% accurate, 0.9× speedup?

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

            1. Initial program 90.0%

              \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. associate-/l*N/A

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

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

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

                \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
              5. /-lowering-/.f64N/A

                \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
              6. sin-lowering-sin.f64N/A

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

                \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
              8. *-lowering-*.f6488.3

                \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
            4. Applied egg-rr88.3%

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

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

                \[\leadsto \frac{\color{blue}{y}}{y \cdot z} \cdot x \]
              2. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{x \cdot \frac{y}{y \cdot z}} \]
                2. associate-*r/N/A

                  \[\leadsto \color{blue}{\frac{x \cdot y}{y \cdot z}} \]
                3. *-rgt-identityN/A

                  \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y \cdot z\right) \cdot 1}} \]
                4. times-fracN/A

                  \[\leadsto \color{blue}{\frac{x}{y \cdot z} \cdot \frac{y}{1}} \]
                5. /-rgt-identityN/A

                  \[\leadsto \frac{x}{y \cdot z} \cdot \color{blue}{y} \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \color{blue}{\frac{x}{y \cdot z} \cdot y} \]
                7. /-lowering-/.f64N/A

                  \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \cdot y \]
                8. *-lowering-*.f6422.2

                  \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \cdot y \]
              3. Applied egg-rr22.2%

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

              if 0.0200000000000000004 < (/.f64 (sin.f64 y) y)

              1. Initial program 100.0%

                \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. associate-/l*N/A

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

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

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

                  \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
                6. sin-lowering-sin.f64N/A

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

                  \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
                8. *-lowering-*.f6486.7

                  \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
              4. Applied egg-rr86.7%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{6}, \color{blue}{y \cdot y}, 1\right) \cdot \frac{1}{z}\right) \cdot x \]
                11. /-lowering-/.f6499.7

                  \[\leadsto \left(\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right) \cdot \color{blue}{\frac{1}{z}}\right) \cdot x \]
              7. Simplified99.7%

                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right) \cdot \frac{1}{z}\right)} \cdot x \]
              8. Step-by-step derivation
                1. *-commutativeN/A

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

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

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

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

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

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

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

                  \[\leadsto \left(\color{blue}{y \cdot \left(y \cdot \frac{-1}{6}\right)} + 1\right) \cdot \frac{x}{z} \]
                9. accelerator-lowering-fma.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(y, \color{blue}{y \cdot \frac{-1}{6}}, 1\right) \cdot \frac{x}{z} \]
                11. /-lowering-/.f64100.0

                  \[\leadsto \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\frac{x}{z}} \]
              9. Applied egg-rr100.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right) \cdot \frac{x}{z}} \]
            7. Recombined 2 regimes into one program.
            8. Final simplification61.7%

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

            Alternative 12: 98.2% accurate, 1.0× speedup?

            \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 5 \cdot 10^{+84}:\\ \;\;\;\;\frac{\frac{\sin y}{y}}{z\_m} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin y}{y \cdot \frac{z\_m}{x}}\\ \end{array} \end{array} \]
            z\_m = (fabs.f64 z)
            z\_s = (copysign.f64 #s(literal 1 binary64) z)
            (FPCore (z_s x y z_m)
             :precision binary64
             (*
              z_s
              (if (<= z_m 5e+84) (* (/ (/ (sin y) y) z_m) x) (/ (sin y) (* y (/ z_m x))))))
            z\_m = fabs(z);
            z\_s = copysign(1.0, z);
            double code(double z_s, double x, double y, double z_m) {
            	double tmp;
            	if (z_m <= 5e+84) {
            		tmp = ((sin(y) / y) / z_m) * x;
            	} else {
            		tmp = sin(y) / (y * (z_m / x));
            	}
            	return z_s * tmp;
            }
            
            z\_m = abs(z)
            z\_s = copysign(1.0d0, z)
            real(8) function code(z_s, x, y, z_m)
                real(8), intent (in) :: z_s
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z_m
                real(8) :: tmp
                if (z_m <= 5d+84) then
                    tmp = ((sin(y) / y) / z_m) * x
                else
                    tmp = sin(y) / (y * (z_m / x))
                end if
                code = z_s * tmp
            end function
            
            z\_m = Math.abs(z);
            z\_s = Math.copySign(1.0, z);
            public static double code(double z_s, double x, double y, double z_m) {
            	double tmp;
            	if (z_m <= 5e+84) {
            		tmp = ((Math.sin(y) / y) / z_m) * x;
            	} else {
            		tmp = Math.sin(y) / (y * (z_m / x));
            	}
            	return z_s * tmp;
            }
            
            z\_m = math.fabs(z)
            z\_s = math.copysign(1.0, z)
            def code(z_s, x, y, z_m):
            	tmp = 0
            	if z_m <= 5e+84:
            		tmp = ((math.sin(y) / y) / z_m) * x
            	else:
            		tmp = math.sin(y) / (y * (z_m / x))
            	return z_s * tmp
            
            z\_m = abs(z)
            z\_s = copysign(1.0, z)
            function code(z_s, x, y, z_m)
            	tmp = 0.0
            	if (z_m <= 5e+84)
            		tmp = Float64(Float64(Float64(sin(y) / y) / z_m) * x);
            	else
            		tmp = Float64(sin(y) / Float64(y * Float64(z_m / x)));
            	end
            	return Float64(z_s * tmp)
            end
            
            z\_m = abs(z);
            z\_s = sign(z) * abs(1.0);
            function tmp_2 = code(z_s, x, y, z_m)
            	tmp = 0.0;
            	if (z_m <= 5e+84)
            		tmp = ((sin(y) / y) / z_m) * x;
            	else
            		tmp = sin(y) / (y * (z_m / x));
            	end
            	tmp_2 = z_s * tmp;
            end
            
            z\_m = N[Abs[z], $MachinePrecision]
            z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[z$95$m, 5e+84], N[(N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] / z$95$m), $MachinePrecision] * x), $MachinePrecision], N[(N[Sin[y], $MachinePrecision] / N[(y * N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            z\_m = \left|z\right|
            \\
            z\_s = \mathsf{copysign}\left(1, z\right)
            
            \\
            z\_s \cdot \begin{array}{l}
            \mathbf{if}\;z\_m \leq 5 \cdot 10^{+84}:\\
            \;\;\;\;\frac{\frac{\sin y}{y}}{z\_m} \cdot x\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\sin y}{y \cdot \frac{z\_m}{x}}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < 5.0000000000000001e84

              1. Initial program 94.4%

                \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. associate-/l*N/A

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

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

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

                  \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sin y}{z \cdot y}} \cdot x \]
                6. sin-lowering-sin.f64N/A

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

                  \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
                8. *-lowering-*.f6489.2

                  \[\leadsto \frac{\sin y}{\color{blue}{y \cdot z}} \cdot x \]
              4. Applied egg-rr89.2%

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

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

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

                  \[\leadsto \frac{\color{blue}{\frac{\sin y}{y}}}{z} \cdot x \]
                4. sin-lowering-sin.f6496.7

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

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

              if 5.0000000000000001e84 < z

              1. Initial program 99.8%

                \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. clear-numN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z}{x \cdot \frac{\sin y}{y}}}} \]
                2. associate-/r*N/A

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

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

                  \[\leadsto \color{blue}{\frac{\sin y}{\frac{z}{x} \cdot y}} \]
                5. remove-double-divN/A

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

                  \[\leadsto \frac{\sin y}{\color{blue}{\frac{\frac{z}{x}}{\frac{1}{y}}}} \]
                7. /-lowering-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sin y}{\frac{\frac{z}{x}}{\frac{1}{y}}}} \]
                8. sin-lowering-sin.f64N/A

                  \[\leadsto \frac{\color{blue}{\sin y}}{\frac{\frac{z}{x}}{\frac{1}{y}}} \]
                9. div-invN/A

                  \[\leadsto \frac{\sin y}{\color{blue}{\frac{z}{x} \cdot \frac{1}{\frac{1}{y}}}} \]
                10. remove-double-divN/A

                  \[\leadsto \frac{\sin y}{\frac{z}{x} \cdot \color{blue}{y}} \]
                11. *-lowering-*.f64N/A

                  \[\leadsto \frac{\sin y}{\color{blue}{\frac{z}{x} \cdot y}} \]
                12. /-lowering-/.f6496.5

                  \[\leadsto \frac{\sin y}{\color{blue}{\frac{z}{x}} \cdot y} \]
              4. Applied egg-rr96.5%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 5 \cdot 10^{+84}:\\ \;\;\;\;\frac{\frac{\sin y}{y}}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin y}{y \cdot \frac{z}{x}}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 13: 59.0% accurate, 10.7× speedup?

            \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \frac{x}{z\_m} \end{array} \]
            z\_m = (fabs.f64 z)
            z\_s = (copysign.f64 #s(literal 1 binary64) z)
            (FPCore (z_s x y z_m) :precision binary64 (* z_s (/ x z_m)))
            z\_m = fabs(z);
            z\_s = copysign(1.0, z);
            double code(double z_s, double x, double y, double z_m) {
            	return z_s * (x / z_m);
            }
            
            z\_m = abs(z)
            z\_s = copysign(1.0d0, z)
            real(8) function code(z_s, x, y, z_m)
                real(8), intent (in) :: z_s
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z_m
                code = z_s * (x / z_m)
            end function
            
            z\_m = Math.abs(z);
            z\_s = Math.copySign(1.0, z);
            public static double code(double z_s, double x, double y, double z_m) {
            	return z_s * (x / z_m);
            }
            
            z\_m = math.fabs(z)
            z\_s = math.copysign(1.0, z)
            def code(z_s, x, y, z_m):
            	return z_s * (x / z_m)
            
            z\_m = abs(z)
            z\_s = copysign(1.0, z)
            function code(z_s, x, y, z_m)
            	return Float64(z_s * Float64(x / z_m))
            end
            
            z\_m = abs(z);
            z\_s = sign(z) * abs(1.0);
            function tmp = code(z_s, x, y, z_m)
            	tmp = z_s * (x / z_m);
            end
            
            z\_m = N[Abs[z], $MachinePrecision]
            z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * N[(x / z$95$m), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            z\_m = \left|z\right|
            \\
            z\_s = \mathsf{copysign}\left(1, z\right)
            
            \\
            z\_s \cdot \frac{x}{z\_m}
            \end{array}
            
            Derivation
            1. Initial program 95.0%

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

              \[\leadsto \color{blue}{\frac{x}{z}} \]
            4. Step-by-step derivation
              1. /-lowering-/.f6456.7

                \[\leadsto \color{blue}{\frac{x}{z}} \]
            5. Simplified56.7%

              \[\leadsto \color{blue}{\frac{x}{z}} \]
            6. Add Preprocessing

            Developer Target 1: 99.5% accurate, 0.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{\sin y}\\ t_1 := \frac{x \cdot \frac{1}{t\_0}}{z}\\ \mathbf{if}\;z < -4.2173720203427147 \cdot 10^{-29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;\frac{x}{z \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (let* ((t_0 (/ y (sin y))) (t_1 (/ (* x (/ 1.0 t_0)) z)))
               (if (< z -4.2173720203427147e-29)
                 t_1
                 (if (< z 4.446702369113811e+64) (/ x (* z t_0)) t_1))))
            double code(double x, double y, double z) {
            	double t_0 = y / sin(y);
            	double t_1 = (x * (1.0 / t_0)) / z;
            	double tmp;
            	if (z < -4.2173720203427147e-29) {
            		tmp = t_1;
            	} else if (z < 4.446702369113811e+64) {
            		tmp = x / (z * t_0);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: t_0
                real(8) :: t_1
                real(8) :: tmp
                t_0 = y / sin(y)
                t_1 = (x * (1.0d0 / t_0)) / z
                if (z < (-4.2173720203427147d-29)) then
                    tmp = t_1
                else if (z < 4.446702369113811d+64) then
                    tmp = x / (z * t_0)
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double t_0 = y / Math.sin(y);
            	double t_1 = (x * (1.0 / t_0)) / z;
            	double tmp;
            	if (z < -4.2173720203427147e-29) {
            		tmp = t_1;
            	} else if (z < 4.446702369113811e+64) {
            		tmp = x / (z * t_0);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	t_0 = y / math.sin(y)
            	t_1 = (x * (1.0 / t_0)) / z
            	tmp = 0
            	if z < -4.2173720203427147e-29:
            		tmp = t_1
            	elif z < 4.446702369113811e+64:
            		tmp = x / (z * t_0)
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z)
            	t_0 = Float64(y / sin(y))
            	t_1 = Float64(Float64(x * Float64(1.0 / t_0)) / z)
            	tmp = 0.0
            	if (z < -4.2173720203427147e-29)
            		tmp = t_1;
            	elseif (z < 4.446702369113811e+64)
            		tmp = Float64(x / Float64(z * t_0));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	t_0 = y / sin(y);
            	t_1 = (x * (1.0 / t_0)) / z;
            	tmp = 0.0;
            	if (z < -4.2173720203427147e-29)
            		tmp = t_1;
            	elseif (z < 4.446702369113811e+64)
            		tmp = x / (z * t_0);
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[Sin[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[Less[z, -4.2173720203427147e-29], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x / N[(z * t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \frac{y}{\sin y}\\
            t_1 := \frac{x \cdot \frac{1}{t\_0}}{z}\\
            \mathbf{if}\;z < -4.2173720203427147 \cdot 10^{-29}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
            \;\;\;\;\frac{x}{z \cdot t\_0}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            

            Reproduce

            ?
            herbie shell --seed 2024198 
            (FPCore (x y z)
              :name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
              :precision binary64
            
              :alt
              (! :herbie-platform default (if (< z -42173720203427147/1000000000000000000000000000000000000000000000) (/ (* x (/ 1 (/ y (sin y)))) z) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1 (/ y (sin y)))) z))))
            
              (/ (* x (/ (sin y) y)) z))