Linear.Quaternion:$ctanh from linear-1.19.1.3

Percentage Accurate: 96.1% → 99.8%
Time: 6.7s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 96.1% 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: 99.8% 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 2 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{\frac{y}{\frac{\sin y}{z_m}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z_m}}{\frac{y}{\sin y}}\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= z_m 2e-20) (/ x (/ y (/ (sin y) z_m))) (/ (/ x z_m) (/ y (sin y))))))
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 <= 2e-20) {
		tmp = x / (y / (sin(y) / z_m));
	} else {
		tmp = (x / z_m) / (y / sin(y));
	}
	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 <= 2d-20) then
        tmp = x / (y / (sin(y) / z_m))
    else
        tmp = (x / z_m) / (y / sin(y))
    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 <= 2e-20) {
		tmp = x / (y / (Math.sin(y) / z_m));
	} else {
		tmp = (x / z_m) / (y / Math.sin(y));
	}
	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 <= 2e-20:
		tmp = x / (y / (math.sin(y) / z_m))
	else:
		tmp = (x / z_m) / (y / math.sin(y))
	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 <= 2e-20)
		tmp = Float64(x / Float64(y / Float64(sin(y) / z_m)));
	else
		tmp = Float64(Float64(x / z_m) / Float64(y / sin(y)));
	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 <= 2e-20)
		tmp = x / (y / (sin(y) / z_m));
	else
		tmp = (x / z_m) / (y / sin(y));
	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, 2e-20], N[(x / N[(y / N[(N[Sin[y], $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z$95$m), $MachinePrecision] / N[(y / N[Sin[y], $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 2 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{\sin y}{z_m}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z_m}}{\frac{y}{\sin y}}\\


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

    1. Initial program 95.7%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/97.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\sin y}{z \cdot y}} \]
      3. *-commutative84.0%

        \[\leadsto x \cdot \frac{\sin y}{\color{blue}{y \cdot z}} \]
    3. Simplified84.0%

      \[\leadsto \color{blue}{x \cdot \frac{\sin y}{y \cdot z}} \]
    4. Step-by-step derivation
      1. clear-num83.9%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{\sin y}}} \]
      2. un-div-inv84.0%

        \[\leadsto \color{blue}{\frac{x}{\frac{y \cdot z}{\sin y}}} \]
      3. associate-/l*93.9%

        \[\leadsto \frac{x}{\color{blue}{\frac{y}{\frac{\sin y}{z}}}} \]
    5. Applied egg-rr93.9%

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

    if 1.99999999999999989e-20 < z

    1. Initial program 99.8%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/92.4%

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

        \[\leadsto x \cdot \color{blue}{\frac{\sin y}{z \cdot y}} \]
      3. *-commutative90.6%

        \[\leadsto x \cdot \frac{\sin y}{\color{blue}{y \cdot z}} \]
    3. Simplified90.6%

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

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{y \cdot z}} \]
      2. *-commutative87.9%

        \[\leadsto \frac{x \cdot \sin y}{\color{blue}{z \cdot y}} \]
      3. frac-times99.8%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      4. clear-num99.8%

        \[\leadsto \frac{x}{z} \cdot \color{blue}{\frac{1}{\frac{y}{\sin y}}} \]
      5. un-div-inv99.9%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{\frac{y}{\sin y}}} \]
    5. Applied egg-rr99.9%

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

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

Alternative 2: 77.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}\;y \leq 5 \cdot 10^{-21}:\\ \;\;\;\;\frac{x}{z_m}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\sin y}{z_m \cdot y}\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
 :precision binary64
 (* z_s (if (<= y 5e-21) (/ x z_m) (* x (/ (sin y) (* z_m y))))))
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 (y <= 5e-21) {
		tmp = x / z_m;
	} else {
		tmp = x * (sin(y) / (z_m * y));
	}
	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 (y <= 5d-21) then
        tmp = x / z_m
    else
        tmp = x * (sin(y) / (z_m * y))
    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 (y <= 5e-21) {
		tmp = x / z_m;
	} else {
		tmp = x * (Math.sin(y) / (z_m * y));
	}
	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 y <= 5e-21:
		tmp = x / z_m
	else:
		tmp = x * (math.sin(y) / (z_m * y))
	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 (y <= 5e-21)
		tmp = Float64(x / z_m);
	else
		tmp = Float64(x * Float64(sin(y) / Float64(z_m * y)));
	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 (y <= 5e-21)
		tmp = x / z_m;
	else
		tmp = x * (sin(y) / (z_m * y));
	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[y, 5e-21], N[(x / z$95$m), $MachinePrecision], N[(x * N[(N[Sin[y], $MachinePrecision] / N[(z$95$m * y), $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}\;y \leq 5 \cdot 10^{-21}:\\
\;\;\;\;\frac{x}{z_m}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sin y}{z_m \cdot y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.99999999999999973e-21

    1. Initial program 97.9%

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

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

    if 4.99999999999999973e-21 < y

    1. Initial program 93.4%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/88.4%

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

        \[\leadsto x \cdot \color{blue}{\frac{\sin y}{z \cdot y}} \]
      3. *-commutative86.0%

        \[\leadsto x \cdot \frac{\sin y}{\color{blue}{y \cdot z}} \]
    3. Simplified86.0%

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

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

Alternative 3: 77.6% 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}\;y \leq 2.7 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{z_m}\\ \mathbf{else}:\\ \;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z_m}\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
 :precision binary64
 (* z_s (if (<= y 2.7e-14) (/ x z_m) (* (sin y) (/ (/ x y) 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 (y <= 2.7e-14) {
		tmp = x / z_m;
	} else {
		tmp = sin(y) * ((x / y) / 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 (y <= 2.7d-14) then
        tmp = x / z_m
    else
        tmp = sin(y) * ((x / y) / 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 (y <= 2.7e-14) {
		tmp = x / z_m;
	} else {
		tmp = Math.sin(y) * ((x / y) / 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 y <= 2.7e-14:
		tmp = x / z_m
	else:
		tmp = math.sin(y) * ((x / y) / 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 (y <= 2.7e-14)
		tmp = Float64(x / z_m);
	else
		tmp = Float64(sin(y) * Float64(Float64(x / y) / 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 (y <= 2.7e-14)
		tmp = x / z_m;
	else
		tmp = sin(y) * ((x / y) / 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[y, 2.7e-14], N[(x / z$95$m), $MachinePrecision], N[(N[Sin[y], $MachinePrecision] * N[(N[(x / y), $MachinePrecision] / z$95$m), $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}\;y \leq 2.7 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{z_m}\\

\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.6999999999999999e-14

    1. Initial program 97.9%

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

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

    if 2.6999999999999999e-14 < y

    1. Initial program 93.3%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. *-lft-identity93.3%

        \[\leadsto \color{blue}{1 \cdot \frac{x \cdot \frac{\sin y}{y}}{z}} \]
      2. metadata-eval93.3%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{x \cdot \frac{\sin y}{y}}{z} \]
      3. times-frac93.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \frac{\sin y}{y}\right)}{-1 \cdot z}} \]
      4. neg-mul-193.3%

        \[\leadsto \frac{\color{blue}{-x \cdot \frac{\sin y}{y}}}{-1 \cdot z} \]
      5. distribute-lft-neg-out93.3%

        \[\leadsto \frac{\color{blue}{\left(-x\right) \cdot \frac{\sin y}{y}}}{-1 \cdot z} \]
      6. associate-*r/93.4%

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

        \[\leadsto \frac{\color{blue}{\frac{-x}{y} \cdot \sin y}}{-1 \cdot z} \]
      8. *-commutative93.3%

        \[\leadsto \frac{\frac{-x}{y} \cdot \sin y}{\color{blue}{z \cdot -1}} \]
      9. times-frac93.5%

        \[\leadsto \color{blue}{\frac{\frac{-x}{y}}{z} \cdot \frac{\sin y}{-1}} \]
      10. remove-double-neg93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \color{blue}{\left(-\left(-\frac{\sin y}{-1}\right)\right)} \]
      11. distribute-frac-neg93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\color{blue}{\frac{-\sin y}{-1}}\right) \]
      12. sin-neg93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\frac{\color{blue}{\sin \left(-y\right)}}{-1}\right) \]
      13. sin-neg93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\frac{\color{blue}{-\sin y}}{-1}\right) \]
      14. neg-mul-193.5%

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

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\color{blue}{\frac{-1}{\frac{-1}{\sin y}}}\right) \]
      16. associate-/r/93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\color{blue}{\frac{-1}{-1} \cdot \sin y}\right) \]
      17. distribute-lft-neg-in93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \color{blue}{\left(\left(-\frac{-1}{-1}\right) \cdot \sin y\right)} \]
      18. metadata-eval93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(\left(-\color{blue}{1}\right) \cdot \sin y\right) \]
      19. metadata-eval93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(\color{blue}{-1} \cdot \sin y\right) \]
      20. neg-mul-193.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \color{blue}{\left(-\sin y\right)} \]
      21. sin-neg93.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \color{blue}{\sin \left(-y\right)} \]
      22. *-commutative93.5%

        \[\leadsto \color{blue}{\sin \left(-y\right) \cdot \frac{\frac{-x}{y}}{z}} \]
    3. Simplified93.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.7 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z}\\ \end{array} \]

Alternative 4: 96.1% 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}\;y \leq 1.25 \cdot 10^{+167}:\\ \;\;\;\;\frac{x}{z_m} \cdot \frac{\sin y}{y}\\ \mathbf{else}:\\ \;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z_m}\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= y 1.25e+167)
    (* (/ x z_m) (/ (sin y) y))
    (* (sin y) (/ (/ x y) 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 (y <= 1.25e+167) {
		tmp = (x / z_m) * (sin(y) / y);
	} else {
		tmp = sin(y) * ((x / y) / 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 (y <= 1.25d+167) then
        tmp = (x / z_m) * (sin(y) / y)
    else
        tmp = sin(y) * ((x / y) / 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 (y <= 1.25e+167) {
		tmp = (x / z_m) * (Math.sin(y) / y);
	} else {
		tmp = Math.sin(y) * ((x / y) / 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 y <= 1.25e+167:
		tmp = (x / z_m) * (math.sin(y) / y)
	else:
		tmp = math.sin(y) * ((x / y) / 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 (y <= 1.25e+167)
		tmp = Float64(Float64(x / z_m) * Float64(sin(y) / y));
	else
		tmp = Float64(sin(y) * Float64(Float64(x / y) / 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 (y <= 1.25e+167)
		tmp = (x / z_m) * (sin(y) / y);
	else
		tmp = sin(y) * ((x / y) / 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[y, 1.25e+167], N[(N[(x / z$95$m), $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[Sin[y], $MachinePrecision] * N[(N[(x / y), $MachinePrecision] / z$95$m), $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}\;y \leq 1.25 \cdot 10^{+167}:\\
\;\;\;\;\frac{x}{z_m} \cdot \frac{\sin y}{y}\\

\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z_m}\\


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

    1. Initial program 96.9%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. *-commutative96.9%

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

        \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
    3. Simplified96.5%

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

    if 1.2499999999999999e167 < y

    1. Initial program 95.3%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. *-lft-identity95.3%

        \[\leadsto \color{blue}{1 \cdot \frac{x \cdot \frac{\sin y}{y}}{z}} \]
      2. metadata-eval95.3%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{x \cdot \frac{\sin y}{y}}{z} \]
      3. times-frac95.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \frac{\sin y}{y}\right)}{-1 \cdot z}} \]
      4. neg-mul-195.3%

        \[\leadsto \frac{\color{blue}{-x \cdot \frac{\sin y}{y}}}{-1 \cdot z} \]
      5. distribute-lft-neg-out95.3%

        \[\leadsto \frac{\color{blue}{\left(-x\right) \cdot \frac{\sin y}{y}}}{-1 \cdot z} \]
      6. associate-*r/95.3%

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

        \[\leadsto \frac{\color{blue}{\frac{-x}{y} \cdot \sin y}}{-1 \cdot z} \]
      8. *-commutative95.4%

        \[\leadsto \frac{\frac{-x}{y} \cdot \sin y}{\color{blue}{z \cdot -1}} \]
      9. times-frac95.5%

        \[\leadsto \color{blue}{\frac{\frac{-x}{y}}{z} \cdot \frac{\sin y}{-1}} \]
      10. remove-double-neg95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \color{blue}{\left(-\left(-\frac{\sin y}{-1}\right)\right)} \]
      11. distribute-frac-neg95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\color{blue}{\frac{-\sin y}{-1}}\right) \]
      12. sin-neg95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\frac{\color{blue}{\sin \left(-y\right)}}{-1}\right) \]
      13. sin-neg95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\frac{\color{blue}{-\sin y}}{-1}\right) \]
      14. neg-mul-195.5%

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

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\color{blue}{\frac{-1}{\frac{-1}{\sin y}}}\right) \]
      16. associate-/r/95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(-\color{blue}{\frac{-1}{-1} \cdot \sin y}\right) \]
      17. distribute-lft-neg-in95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \color{blue}{\left(\left(-\frac{-1}{-1}\right) \cdot \sin y\right)} \]
      18. metadata-eval95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(\left(-\color{blue}{1}\right) \cdot \sin y\right) \]
      19. metadata-eval95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \left(\color{blue}{-1} \cdot \sin y\right) \]
      20. neg-mul-195.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \color{blue}{\left(-\sin y\right)} \]
      21. sin-neg95.5%

        \[\leadsto \frac{\frac{-x}{y}}{z} \cdot \color{blue}{\sin \left(-y\right)} \]
      22. *-commutative95.5%

        \[\leadsto \color{blue}{\sin \left(-y\right) \cdot \frac{\frac{-x}{y}}{z}} \]
    3. Simplified95.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.25 \cdot 10^{+167}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{\sin y}{y}\\ \mathbf{else}:\\ \;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z}\\ \end{array} \]

Alternative 5: 99.8% 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 2.45 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{\frac{y}{\frac{\sin y}{z_m}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z_m} \cdot \frac{\sin y}{y}\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= z_m 2.45e-20)
    (/ x (/ y (/ (sin y) z_m)))
    (* (/ x z_m) (/ (sin y) y)))))
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 <= 2.45e-20) {
		tmp = x / (y / (sin(y) / z_m));
	} else {
		tmp = (x / z_m) * (sin(y) / y);
	}
	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 <= 2.45d-20) then
        tmp = x / (y / (sin(y) / z_m))
    else
        tmp = (x / z_m) * (sin(y) / y)
    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 <= 2.45e-20) {
		tmp = x / (y / (Math.sin(y) / z_m));
	} else {
		tmp = (x / z_m) * (Math.sin(y) / y);
	}
	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 <= 2.45e-20:
		tmp = x / (y / (math.sin(y) / z_m))
	else:
		tmp = (x / z_m) * (math.sin(y) / y)
	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 <= 2.45e-20)
		tmp = Float64(x / Float64(y / Float64(sin(y) / z_m)));
	else
		tmp = Float64(Float64(x / z_m) * Float64(sin(y) / y));
	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 <= 2.45e-20)
		tmp = x / (y / (sin(y) / z_m));
	else
		tmp = (x / z_m) * (sin(y) / y);
	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, 2.45e-20], N[(x / N[(y / N[(N[Sin[y], $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z$95$m), $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $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 2.45 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{\sin y}{z_m}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{z_m} \cdot \frac{\sin y}{y}\\


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

    1. Initial program 95.7%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/97.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\sin y}{z \cdot y}} \]
      3. *-commutative84.0%

        \[\leadsto x \cdot \frac{\sin y}{\color{blue}{y \cdot z}} \]
    3. Simplified84.0%

      \[\leadsto \color{blue}{x \cdot \frac{\sin y}{y \cdot z}} \]
    4. Step-by-step derivation
      1. clear-num83.9%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{\sin y}}} \]
      2. un-div-inv84.0%

        \[\leadsto \color{blue}{\frac{x}{\frac{y \cdot z}{\sin y}}} \]
      3. associate-/l*93.9%

        \[\leadsto \frac{x}{\color{blue}{\frac{y}{\frac{\sin y}{z}}}} \]
    5. Applied egg-rr93.9%

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

    if 2.4500000000000001e-20 < z

    1. Initial program 99.8%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

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

        \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
    3. Simplified99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.45 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{\frac{y}{\frac{\sin y}{z}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{\sin y}{y}\\ \end{array} \]

Alternative 6: 99.8% 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 10^{+16}:\\ \;\;\;\;\frac{x}{\frac{z_m}{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z_m} \cdot t_0\\ \end{array} \end{array} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
 :precision binary64
 (let* ((t_0 (/ (sin y) y)))
   (* z_s (if (<= z_m 1e+16) (/ x (/ z_m t_0)) (* (/ x z_m) t_0)))))
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 <= 1e+16) {
		tmp = x / (z_m / t_0);
	} else {
		tmp = (x / z_m) * t_0;
	}
	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 <= 1d+16) then
        tmp = x / (z_m / t_0)
    else
        tmp = (x / z_m) * t_0
    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 <= 1e+16) {
		tmp = x / (z_m / t_0);
	} else {
		tmp = (x / z_m) * t_0;
	}
	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 <= 1e+16:
		tmp = x / (z_m / t_0)
	else:
		tmp = (x / z_m) * t_0
	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 <= 1e+16)
		tmp = Float64(x / Float64(z_m / t_0));
	else
		tmp = Float64(Float64(x / z_m) * t_0);
	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 <= 1e+16)
		tmp = x / (z_m / t_0);
	else
		tmp = (x / z_m) * t_0;
	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, 1e+16], N[(x / N[(z$95$m / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / z$95$m), $MachinePrecision] * t$95$0), $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 10^{+16}:\\
\;\;\;\;\frac{x}{\frac{z_m}{t_0}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{z_m} \cdot t_0\\


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

    1. Initial program 95.8%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. associate-/l*97.0%

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

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

    if 1e16 < z

    1. Initial program 99.7%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

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

        \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
    3. Simplified99.8%

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

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

Alternative 7: 60.9% accurate, 10.6× 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}\;y \leq 4.6 \cdot 10^{+74}:\\ \;\;\;\;\frac{1}{\frac{z_m}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z_m \cdot \left(-y\right)}{y}}\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
 :precision binary64
 (* z_s (if (<= y 4.6e+74) (/ 1.0 (/ z_m x)) (/ x (/ (* z_m (- y)) y)))))
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 (y <= 4.6e+74) {
		tmp = 1.0 / (z_m / x);
	} else {
		tmp = x / ((z_m * -y) / y);
	}
	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 (y <= 4.6d+74) then
        tmp = 1.0d0 / (z_m / x)
    else
        tmp = x / ((z_m * -y) / y)
    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 (y <= 4.6e+74) {
		tmp = 1.0 / (z_m / x);
	} else {
		tmp = x / ((z_m * -y) / y);
	}
	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 y <= 4.6e+74:
		tmp = 1.0 / (z_m / x)
	else:
		tmp = x / ((z_m * -y) / y)
	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 (y <= 4.6e+74)
		tmp = Float64(1.0 / Float64(z_m / x));
	else
		tmp = Float64(x / Float64(Float64(z_m * Float64(-y)) / y));
	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 (y <= 4.6e+74)
		tmp = 1.0 / (z_m / x);
	else
		tmp = x / ((z_m * -y) / y);
	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[y, 4.6e+74], N[(1.0 / N[(z$95$m / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(z$95$m * (-y)), $MachinePrecision] / y), $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}\;y \leq 4.6 \cdot 10^{+74}:\\
\;\;\;\;\frac{1}{\frac{z_m}{x}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z_m \cdot \left(-y\right)}{y}}\\


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

    1. Initial program 98.1%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/98.8%

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

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

        \[\leadsto x \cdot \frac{\sin y}{\color{blue}{y \cdot z}} \]
    3. Simplified86.8%

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

      \[\leadsto x \cdot \color{blue}{\frac{1}{z}} \]
    5. Step-by-step derivation
      1. div-inv70.7%

        \[\leadsto \color{blue}{\frac{x}{z}} \]
      2. clear-num71.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{x}}} \]
    6. Applied egg-rr71.0%

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x}}} \]

    if 4.5999999999999997e74 < y

    1. Initial program 90.9%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/83.9%

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

        \[\leadsto x \cdot \color{blue}{\frac{\sin y}{z \cdot y}} \]
      3. *-commutative80.5%

        \[\leadsto x \cdot \frac{\sin y}{\color{blue}{y \cdot z}} \]
    3. Simplified80.5%

      \[\leadsto \color{blue}{x \cdot \frac{\sin y}{y \cdot z}} \]
    4. Step-by-step derivation
      1. clear-num80.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{\sin y}}} \]
      2. un-div-inv80.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{y \cdot z}{\sin y}}} \]
      3. associate-/l*80.5%

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

      \[\leadsto \color{blue}{\frac{x}{\frac{y}{\frac{\sin y}{z}}}} \]
    6. Taylor expanded in y around 0 21.3%

      \[\leadsto \frac{x}{\frac{y}{\color{blue}{\frac{y}{z}}}} \]
    7. Step-by-step derivation
      1. frac-2neg21.3%

        \[\leadsto \frac{x}{\color{blue}{\frac{-y}{-\frac{y}{z}}}} \]
      2. div-inv21.3%

        \[\leadsto \frac{x}{\color{blue}{\left(-y\right) \cdot \frac{1}{-\frac{y}{z}}}} \]
      3. distribute-neg-frac21.3%

        \[\leadsto \frac{x}{\left(-y\right) \cdot \frac{1}{\color{blue}{\frac{-y}{z}}}} \]
    8. Applied egg-rr21.3%

      \[\leadsto \frac{x}{\color{blue}{\left(-y\right) \cdot \frac{1}{\frac{-y}{z}}}} \]
    9. Step-by-step derivation
      1. un-div-inv21.3%

        \[\leadsto \frac{x}{\color{blue}{\frac{-y}{\frac{-y}{z}}}} \]
      2. neg-mul-121.3%

        \[\leadsto \frac{x}{\frac{\color{blue}{-1 \cdot y}}{\frac{-y}{z}}} \]
      3. *-commutative21.3%

        \[\leadsto \frac{x}{\frac{\color{blue}{y \cdot -1}}{\frac{-y}{z}}} \]
      4. clear-num21.3%

        \[\leadsto \frac{x}{\frac{y \cdot -1}{\color{blue}{\frac{1}{\frac{z}{-y}}}}} \]
      5. associate-/r/21.3%

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

        \[\leadsto \frac{x}{\color{blue}{\frac{y}{\frac{1}{z}} \cdot \frac{-1}{-y}}} \]
      7. associate-*r/33.6%

        \[\leadsto \frac{x}{\color{blue}{\frac{\frac{y}{\frac{1}{z}} \cdot -1}{-y}}} \]
      8. associate-/r/33.6%

        \[\leadsto \frac{x}{\frac{\color{blue}{\left(\frac{y}{1} \cdot z\right)} \cdot -1}{-y}} \]
      9. /-rgt-identity33.6%

        \[\leadsto \frac{x}{\frac{\left(\color{blue}{y} \cdot z\right) \cdot -1}{-y}} \]
      10. *-commutative33.6%

        \[\leadsto \frac{x}{\frac{\color{blue}{\left(z \cdot y\right)} \cdot -1}{-y}} \]
      11. add-sqr-sqrt0.0%

        \[\leadsto \frac{x}{\frac{\left(z \cdot y\right) \cdot -1}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}} \]
      12. sqrt-unprod3.7%

        \[\leadsto \frac{x}{\frac{\left(z \cdot y\right) \cdot -1}{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}} \]
      13. sqr-neg3.7%

        \[\leadsto \frac{x}{\frac{\left(z \cdot y\right) \cdot -1}{\sqrt{\color{blue}{y \cdot y}}}} \]
      14. sqrt-unprod31.2%

        \[\leadsto \frac{x}{\frac{\left(z \cdot y\right) \cdot -1}{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}} \]
      15. add-sqr-sqrt31.2%

        \[\leadsto \frac{x}{\frac{\left(z \cdot y\right) \cdot -1}{\color{blue}{y}}} \]
    10. Applied egg-rr31.2%

      \[\leadsto \frac{x}{\color{blue}{\frac{\left(z \cdot y\right) \cdot -1}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.6 \cdot 10^{+74}:\\ \;\;\;\;\frac{1}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z \cdot \left(-y\right)}{y}}\\ \end{array} \]

Alternative 8: 61.1% accurate, 11.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}\;y \leq 10^{-6}:\\ \;\;\;\;\frac{x}{z_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z_m \cdot y}{y}}\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
 :precision binary64
 (* z_s (if (<= y 1e-6) (/ x z_m) (/ x (/ (* z_m y) y)))))
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 (y <= 1e-6) {
		tmp = x / z_m;
	} else {
		tmp = x / ((z_m * y) / y);
	}
	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 (y <= 1d-6) then
        tmp = x / z_m
    else
        tmp = x / ((z_m * y) / y)
    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 (y <= 1e-6) {
		tmp = x / z_m;
	} else {
		tmp = x / ((z_m * y) / y);
	}
	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 y <= 1e-6:
		tmp = x / z_m
	else:
		tmp = x / ((z_m * y) / y)
	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 (y <= 1e-6)
		tmp = Float64(x / z_m);
	else
		tmp = Float64(x / Float64(Float64(z_m * y) / y));
	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 (y <= 1e-6)
		tmp = x / z_m;
	else
		tmp = x / ((z_m * y) / y);
	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[y, 1e-6], N[(x / z$95$m), $MachinePrecision], N[(x / N[(N[(z$95$m * y), $MachinePrecision] / y), $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}\;y \leq 10^{-6}:\\
\;\;\;\;\frac{x}{z_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 9.99999999999999955e-7

    1. Initial program 98.0%

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

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

    if 9.99999999999999955e-7 < y

    1. Initial program 93.0%

      \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/87.7%

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

        \[\leadsto x \cdot \color{blue}{\frac{\sin y}{z \cdot y}} \]
      3. *-commutative85.2%

        \[\leadsto x \cdot \frac{\sin y}{\color{blue}{y \cdot z}} \]
    3. Simplified85.2%

      \[\leadsto \color{blue}{x \cdot \frac{\sin y}{y \cdot z}} \]
    4. Step-by-step derivation
      1. clear-num85.1%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{\sin y}}} \]
      2. un-div-inv85.2%

        \[\leadsto \color{blue}{\frac{x}{\frac{y \cdot z}{\sin y}}} \]
      3. associate-/l*85.3%

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

      \[\leadsto \color{blue}{\frac{x}{\frac{y}{\frac{\sin y}{z}}}} \]
    6. Taylor expanded in y around 0 25.4%

      \[\leadsto \frac{x}{\frac{y}{\color{blue}{\frac{y}{z}}}} \]
    7. Step-by-step derivation
      1. frac-2neg25.4%

        \[\leadsto \frac{x}{\color{blue}{\frac{-y}{-\frac{y}{z}}}} \]
      2. div-inv25.4%

        \[\leadsto \frac{x}{\color{blue}{\left(-y\right) \cdot \frac{1}{-\frac{y}{z}}}} \]
      3. distribute-neg-frac25.4%

        \[\leadsto \frac{x}{\left(-y\right) \cdot \frac{1}{\color{blue}{\frac{-y}{z}}}} \]
    8. Applied egg-rr25.4%

      \[\leadsto \frac{x}{\color{blue}{\left(-y\right) \cdot \frac{1}{\frac{-y}{z}}}} \]
    9. Step-by-step derivation
      1. distribute-lft-neg-out25.4%

        \[\leadsto \frac{x}{\color{blue}{-y \cdot \frac{1}{\frac{-y}{z}}}} \]
      2. distribute-rgt-neg-in25.4%

        \[\leadsto \frac{x}{\color{blue}{y \cdot \left(-\frac{1}{\frac{-y}{z}}\right)}} \]
      3. clear-num25.5%

        \[\leadsto \frac{x}{y \cdot \left(-\color{blue}{\frac{z}{-y}}\right)} \]
      4. distribute-frac-neg25.5%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\frac{-z}{-y}}} \]
      5. frac-2neg25.5%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\frac{z}{y}}} \]
      6. associate-*r/35.2%

        \[\leadsto \frac{x}{\color{blue}{\frac{y \cdot z}{y}}} \]
      7. *-commutative35.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 10^{-6}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z \cdot y}{y}}\\ \end{array} \]

Alternative 9: 58.8% accurate, 21.4× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ z_s \cdot \frac{1}{\frac{z_m}{x}} \end{array} \]
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m) :precision binary64 (* z_s (/ 1.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) {
	return z_s * (1.0 / (z_m / x));
}
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 * (1.0d0 / (z_m / x))
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 * (1.0 / (z_m / x));
}
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	return z_s * (1.0 / (z_m / x))
z_m = abs(z)
z_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	return Float64(z_s * Float64(1.0 / Float64(z_m / x)))
end
z_m = abs(z);
z_s = sign(z) * abs(1.0);
function tmp = code(z_s, x, y, z_m)
	tmp = z_s * (1.0 / (z_m / x));
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[(1.0 / N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)

\\
z_s \cdot \frac{1}{\frac{z_m}{x}}
\end{array}
Derivation
  1. Initial program 96.7%

    \[\frac{x \cdot \frac{\sin y}{y}}{z} \]
  2. Step-by-step derivation
    1. associate-*r/95.9%

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

      \[\leadsto x \cdot \color{blue}{\frac{\sin y}{z \cdot y}} \]
    3. *-commutative85.6%

      \[\leadsto x \cdot \frac{\sin y}{\color{blue}{y \cdot z}} \]
  3. Simplified85.6%

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

    \[\leadsto x \cdot \color{blue}{\frac{1}{z}} \]
  5. Step-by-step derivation
    1. div-inv61.3%

      \[\leadsto \color{blue}{\frac{x}{z}} \]
    2. clear-num61.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x}}} \]
  6. Applied egg-rr61.5%

    \[\leadsto \color{blue}{\frac{1}{\frac{z}{x}}} \]
  7. Final simplification61.5%

    \[\leadsto \frac{1}{\frac{z}{x}} \]

Alternative 10: 59.0% accurate, 35.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 1 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 96.7%

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

    \[\leadsto \color{blue}{\frac{x}{z}} \]
  3. Final simplification61.3%

    \[\leadsto \frac{x}{z} \]

Developer target: 99.5% accurate, 0.9× 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 2023334 
(FPCore (x y z)
  :name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (if (< z -4.2173720203427147e-29) (/ (* x (/ 1.0 (/ y (sin y)))) z) (if (< z 4.446702369113811e+64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1.0 (/ y (sin y)))) z)))

  (/ (* x (/ (sin y) y)) z))