Linear.Quaternion:$ctanh from linear-1.19.1.3

Percentage Accurate: 96.5% → 99.5%
Time: 9.8s
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: 96.5% 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.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-53} \lor \neg \left(z \leq 3.4 \cdot 10^{-73}\right):\\ \;\;\;\;\frac{\sin y}{y} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \frac{y}{\sin y}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -2e-53) (not (<= z 3.4e-73)))
   (* (/ (sin y) y) (/ x z))
   (/ x (* z (/ y (sin y))))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2e-53) || !(z <= 3.4e-73)) {
		tmp = (sin(y) / y) * (x / z);
	} else {
		tmp = x / (z * (y / sin(y)));
	}
	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) :: tmp
    if ((z <= (-2d-53)) .or. (.not. (z <= 3.4d-73))) then
        tmp = (sin(y) / y) * (x / z)
    else
        tmp = x / (z * (y / sin(y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2e-53) || !(z <= 3.4e-73)) {
		tmp = (Math.sin(y) / y) * (x / z);
	} else {
		tmp = x / (z * (y / Math.sin(y)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -2e-53) or not (z <= 3.4e-73):
		tmp = (math.sin(y) / y) * (x / z)
	else:
		tmp = x / (z * (y / math.sin(y)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -2e-53) || !(z <= 3.4e-73))
		tmp = Float64(Float64(sin(y) / y) * Float64(x / z));
	else
		tmp = Float64(x / Float64(z * Float64(y / sin(y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -2e-53) || ~((z <= 3.4e-73)))
		tmp = (sin(y) / y) * (x / z);
	else
		tmp = x / (z * (y / sin(y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -2e-53], N[Not[LessEqual[z, 3.4e-73]], $MachinePrecision]], N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z * N[(y / N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-53} \lor \neg \left(z \leq 3.4 \cdot 10^{-73}\right):\\
\;\;\;\;\frac{\sin y}{y} \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.00000000000000006e-53 or 3.40000000000000021e-73 < z

    1. Initial program 99.0%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      2. *-commutative99.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}} \]

    if -2.00000000000000006e-53 < z < 3.40000000000000021e-73

    1. Initial program 87.0%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{\frac{\sin y}{y}}}} \]
    4. Step-by-step derivation
      1. div-inv99.6%

        \[\leadsto \frac{x}{\color{blue}{z \cdot \frac{1}{\frac{\sin y}{y}}}} \]
      2. clear-num99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-53} \lor \neg \left(z \leq 3.4 \cdot 10^{-73}\right):\\ \;\;\;\;\frac{\sin y}{y} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \frac{y}{\sin y}}\\ \end{array} \]

Alternative 2: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-37} \lor \neg \left(z \leq 6.5 \cdot 10^{-66}\right):\\ \;\;\;\;\frac{\sin y}{y} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{\sin y}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -1e-37) (not (<= z 6.5e-66)))
   (* (/ (sin y) y) (/ x z))
   (* x (/ (/ (sin y) z) y))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -1e-37) || !(z <= 6.5e-66)) {
		tmp = (sin(y) / y) * (x / z);
	} else {
		tmp = x * ((sin(y) / z) / y);
	}
	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) :: tmp
    if ((z <= (-1d-37)) .or. (.not. (z <= 6.5d-66))) then
        tmp = (sin(y) / y) * (x / z)
    else
        tmp = x * ((sin(y) / z) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -1e-37) || !(z <= 6.5e-66)) {
		tmp = (Math.sin(y) / y) * (x / z);
	} else {
		tmp = x * ((Math.sin(y) / z) / y);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -1e-37) or not (z <= 6.5e-66):
		tmp = (math.sin(y) / y) * (x / z)
	else:
		tmp = x * ((math.sin(y) / z) / y)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -1e-37) || !(z <= 6.5e-66))
		tmp = Float64(Float64(sin(y) / y) * Float64(x / z));
	else
		tmp = Float64(x * Float64(Float64(sin(y) / z) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -1e-37) || ~((z <= 6.5e-66)))
		tmp = (sin(y) / y) * (x / z);
	else
		tmp = x * ((sin(y) / z) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -1e-37], N[Not[LessEqual[z, 6.5e-66]], $MachinePrecision]], N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Sin[y], $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-37} \lor \neg \left(z \leq 6.5 \cdot 10^{-66}\right):\\
\;\;\;\;\frac{\sin y}{y} \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.00000000000000007e-37 or 6.50000000000000024e-66 < z

    1. Initial program 99.0%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      2. *-commutative99.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}} \]

    if -1.00000000000000007e-37 < z < 6.50000000000000024e-66

    1. Initial program 87.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-37} \lor \neg \left(z \leq 6.5 \cdot 10^{-66}\right):\\ \;\;\;\;\frac{\sin y}{y} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{\sin y}{z}}{y}\\ \end{array} \]

Alternative 3: 77.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 3.2 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{\sin y}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 3.2e-8) (/ x z) (* x (/ (/ (sin y) z) y))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 3.2e-8) {
		tmp = x / z;
	} else {
		tmp = x * ((sin(y) / z) / y);
	}
	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) :: tmp
    if (y <= 3.2d-8) then
        tmp = x / z
    else
        tmp = x * ((sin(y) / z) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 3.2e-8) {
		tmp = x / z;
	} else {
		tmp = x * ((Math.sin(y) / z) / y);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 3.2e-8:
		tmp = x / z
	else:
		tmp = x * ((math.sin(y) / z) / y)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 3.2e-8)
		tmp = Float64(x / z);
	else
		tmp = Float64(x * Float64(Float64(sin(y) / z) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 3.2e-8)
		tmp = x / z;
	else
		tmp = x * ((sin(y) / z) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 3.2e-8], N[(x / z), $MachinePrecision], N[(x * N[(N[(N[Sin[y], $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{z}\\

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


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

    1. Initial program 95.5%

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

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

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

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

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

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

    if 3.2000000000000002e-8 < y

    1. Initial program 90.1%

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

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

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

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

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

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

Alternative 4: 98.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin y}{y}\\ \mathbf{if}\;x \leq 10^{-8}:\\ \;\;\;\;t_0 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot t_0}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (sin y) y))) (if (<= x 1e-8) (* t_0 (/ x z)) (/ (* x t_0) z))))
double code(double x, double y, double z) {
	double t_0 = sin(y) / y;
	double tmp;
	if (x <= 1e-8) {
		tmp = t_0 * (x / z);
	} else {
		tmp = (x * t_0) / z;
	}
	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) :: tmp
    t_0 = sin(y) / y
    if (x <= 1d-8) then
        tmp = t_0 * (x / z)
    else
        tmp = (x * t_0) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = Math.sin(y) / y;
	double tmp;
	if (x <= 1e-8) {
		tmp = t_0 * (x / z);
	} else {
		tmp = (x * t_0) / z;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = math.sin(y) / y
	tmp = 0
	if x <= 1e-8:
		tmp = t_0 * (x / z)
	else:
		tmp = (x * t_0) / z
	return tmp
function code(x, y, z)
	t_0 = Float64(sin(y) / y)
	tmp = 0.0
	if (x <= 1e-8)
		tmp = Float64(t_0 * Float64(x / z));
	else
		tmp = Float64(Float64(x * t_0) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = sin(y) / y;
	tmp = 0.0;
	if (x <= 1e-8)
		tmp = t_0 * (x / z);
	else
		tmp = (x * t_0) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[x, 1e-8], N[(t$95$0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * t$95$0), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
\mathbf{if}\;x \leq 10^{-8}:\\
\;\;\;\;t_0 \cdot \frac{x}{z}\\

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


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

    1. Initial program 92.1%

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

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

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

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

    if 1e-8 < x

    1. Initial program 99.8%

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

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

Alternative 5: 63.2% accurate, 8.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.4:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(y \cdot 0.16666666666666666\right)} \cdot \frac{1}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 2.4) (/ x z) (* (/ x (* z (* y 0.16666666666666666))) (/ 1.0 y))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 2.4) {
		tmp = x / z;
	} else {
		tmp = (x / (z * (y * 0.16666666666666666))) * (1.0 / y);
	}
	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) :: tmp
    if (y <= 2.4d0) then
        tmp = x / z
    else
        tmp = (x / (z * (y * 0.16666666666666666d0))) * (1.0d0 / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 2.4) {
		tmp = x / z;
	} else {
		tmp = (x / (z * (y * 0.16666666666666666))) * (1.0 / y);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 2.4:
		tmp = x / z
	else:
		tmp = (x / (z * (y * 0.16666666666666666))) * (1.0 / y)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 2.4)
		tmp = Float64(x / z);
	else
		tmp = Float64(Float64(x / Float64(z * Float64(y * 0.16666666666666666))) * Float64(1.0 / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 2.4)
		tmp = x / z;
	else
		tmp = (x / (z * (y * 0.16666666666666666))) * (1.0 / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 2.4], N[(x / z), $MachinePrecision], N[(N[(x / N[(z * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.4:\\
\;\;\;\;\frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot \left(y \cdot 0.16666666666666666\right)} \cdot \frac{1}{y}\\


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

    1. Initial program 95.5%

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

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

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

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

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

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

    if 2.39999999999999991 < y

    1. Initial program 90.1%

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)} \cdot y} \]
    7. Taylor expanded in y around inf 28.8%

      \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right)\right)} \cdot y} \]
    8. Step-by-step derivation
      1. *-commutative28.8%

        \[\leadsto \frac{x}{\left(0.16666666666666666 \cdot \color{blue}{\left(z \cdot y\right)}\right) \cdot y} \]
      2. *-commutative28.8%

        \[\leadsto \frac{x}{\color{blue}{\left(\left(z \cdot y\right) \cdot 0.16666666666666666\right)} \cdot y} \]
      3. *-commutative28.8%

        \[\leadsto \frac{x}{\left(\color{blue}{\left(y \cdot z\right)} \cdot 0.16666666666666666\right) \cdot y} \]
      4. associate-*r*28.8%

        \[\leadsto \frac{x}{\color{blue}{\left(y \cdot \left(z \cdot 0.16666666666666666\right)\right)} \cdot y} \]
    9. Simplified28.8%

      \[\leadsto \frac{x}{\color{blue}{\left(y \cdot \left(z \cdot 0.16666666666666666\right)\right)} \cdot y} \]
    10. Step-by-step derivation
      1. associate-/r*30.1%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(z \cdot 0.16666666666666666\right)} \cdot \frac{1}{y}} \]
      3. associate-*r*30.1%

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

        \[\leadsto \frac{x}{\color{blue}{\left(z \cdot y\right)} \cdot 0.16666666666666666} \cdot \frac{1}{y} \]
      5. associate-*l*30.1%

        \[\leadsto \frac{x}{\color{blue}{z \cdot \left(y \cdot 0.16666666666666666\right)}} \cdot \frac{1}{y} \]
    11. Applied egg-rr30.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.4:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(y \cdot 0.16666666666666666\right)} \cdot \frac{1}{y}\\ \end{array} \]

Alternative 6: 62.9% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 5000000:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{\frac{1}{y}}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 5000000.0) (/ x z) (* y (* x (/ (/ 1.0 y) z)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 5000000.0) {
		tmp = x / z;
	} else {
		tmp = y * (x * ((1.0 / y) / z));
	}
	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) :: tmp
    if (y <= 5000000.0d0) then
        tmp = x / z
    else
        tmp = y * (x * ((1.0d0 / y) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 5000000.0) {
		tmp = x / z;
	} else {
		tmp = y * (x * ((1.0 / y) / z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 5000000.0:
		tmp = x / z
	else:
		tmp = y * (x * ((1.0 / y) / z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 5000000.0)
		tmp = Float64(x / z);
	else
		tmp = Float64(y * Float64(x * Float64(Float64(1.0 / y) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 5000000.0)
		tmp = x / z;
	else
		tmp = y * (x * ((1.0 / y) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 5000000.0], N[(x / z), $MachinePrecision], N[(y * N[(x * N[(N[(1.0 / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 5000000:\\
\;\;\;\;\frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{\frac{1}{y}}{z}\right)\\


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

    1. Initial program 95.5%

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

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

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

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

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

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

    if 5e6 < y

    1. Initial program 90.0%

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

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

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

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

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

      \[\leadsto x \cdot \frac{\color{blue}{\frac{y}{z}}}{y} \]
    5. Step-by-step derivation
      1. *-un-lft-identity17.3%

        \[\leadsto x \cdot \color{blue}{\left(1 \cdot \frac{\frac{y}{z}}{y}\right)} \]
      2. *-commutative17.3%

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{y}{y \cdot z} \cdot 1\right)} \]
    7. Step-by-step derivation
      1. *-commutative21.1%

        \[\leadsto \color{blue}{\left(\frac{y}{y \cdot z} \cdot 1\right) \cdot x} \]
      2. *-rgt-identity21.1%

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z \cdot y}} \]
    9. Step-by-step derivation
      1. div-inv19.1%

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

        \[\leadsto \color{blue}{y \cdot \left(x \cdot \frac{1}{z \cdot y}\right)} \]
      3. *-commutative27.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5000000:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{\frac{1}{y}}{z}\right)\\ \end{array} \]

Alternative 7: 62.9% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 200:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{1}{y \cdot z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 200.0) (/ x z) (* y (* x (/ 1.0 (* y z))))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 200.0) {
		tmp = x / z;
	} else {
		tmp = y * (x * (1.0 / (y * z)));
	}
	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) :: tmp
    if (y <= 200.0d0) then
        tmp = x / z
    else
        tmp = y * (x * (1.0d0 / (y * z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 200.0) {
		tmp = x / z;
	} else {
		tmp = y * (x * (1.0 / (y * z)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 200.0:
		tmp = x / z
	else:
		tmp = y * (x * (1.0 / (y * z)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 200.0)
		tmp = Float64(x / z);
	else
		tmp = Float64(y * Float64(x * Float64(1.0 / Float64(y * z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 200.0)
		tmp = x / z;
	else
		tmp = y * (x * (1.0 / (y * z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 200.0], N[(x / z), $MachinePrecision], N[(y * N[(x * N[(1.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 200:\\
\;\;\;\;\frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{1}{y \cdot z}\right)\\


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

    1. Initial program 95.5%

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

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

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

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

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

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

    if 200 < y

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/17.5%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot x} \]
      2. *-inverses17.5%

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

        \[\leadsto \color{blue}{\frac{y}{y \cdot z}} \cdot x \]
      4. div-inv21.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 200:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{1}{y \cdot z}\right)\\ \end{array} \]

Alternative 8: 63.1% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.95 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{1}{z \cdot \frac{y}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 1.95e-5) (/ x z) (* y (/ 1.0 (* z (/ y x))))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 1.95e-5) {
		tmp = x / z;
	} else {
		tmp = y * (1.0 / (z * (y / x)));
	}
	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) :: tmp
    if (y <= 1.95d-5) then
        tmp = x / z
    else
        tmp = y * (1.0d0 / (z * (y / x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 1.95e-5) {
		tmp = x / z;
	} else {
		tmp = y * (1.0 / (z * (y / x)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 1.95e-5:
		tmp = x / z
	else:
		tmp = y * (1.0 / (z * (y / x)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 1.95e-5)
		tmp = Float64(x / z);
	else
		tmp = Float64(y * Float64(1.0 / Float64(z * Float64(y / x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 1.95e-5)
		tmp = x / z;
	else
		tmp = y * (1.0 / (z * (y / x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 1.95e-5], N[(x / z), $MachinePrecision], N[(y * N[(1.0 / N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{1}{z \cdot \frac{y}{x}}\\


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

    1. Initial program 95.5%

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

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

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

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

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

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

    if 1.95e-5 < y

    1. Initial program 90.1%

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

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

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

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

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

      \[\leadsto x \cdot \frac{\color{blue}{\frac{y}{z}}}{y} \]
    5. Step-by-step derivation
      1. *-un-lft-identity17.3%

        \[\leadsto x \cdot \color{blue}{\left(1 \cdot \frac{\frac{y}{z}}{y}\right)} \]
      2. *-commutative17.3%

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{y}{y \cdot z} \cdot 1\right)} \]
    7. Step-by-step derivation
      1. *-commutative21.0%

        \[\leadsto \color{blue}{\left(\frac{y}{y \cdot z} \cdot 1\right) \cdot x} \]
      2. *-rgt-identity21.0%

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{y \cdot z}} \]
      4. *-commutative19.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{z \cdot y}} \]
    8. Applied egg-rr19.0%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z \cdot y}} \]
    9. Step-by-step derivation
      1. associate-/l*29.7%

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

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{z \cdot y}{x}}} \]
      3. *-un-lft-identity29.7%

        \[\leadsto y \cdot \frac{1}{\frac{z \cdot y}{\color{blue}{1 \cdot x}}} \]
      4. times-frac29.5%

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

        \[\leadsto y \cdot \frac{1}{\color{blue}{z} \cdot \frac{y}{x}} \]
    10. Applied egg-rr29.5%

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

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

Alternative 9: 66.9% accurate, 9.7× speedup?

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

\\
\frac{x}{z + y \cdot \left(y \cdot \left(z \cdot 0.16666666666666666\right)\right)}
\end{array}
Derivation
  1. Initial program 94.0%

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

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

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

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

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

    \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)} \cdot y} \]
  7. Step-by-step derivation
    1. *-commutative52.6%

      \[\leadsto \frac{x}{\color{blue}{y \cdot \left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)}} \]
    2. +-commutative52.6%

      \[\leadsto \frac{x}{y \cdot \color{blue}{\left(\frac{z}{y} + 0.16666666666666666 \cdot \left(y \cdot z\right)\right)}} \]
    3. distribute-rgt-in52.6%

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y} \cdot y + \left(0.16666666666666666 \cdot \left(y \cdot z\right)\right) \cdot y}} \]
    4. *-commutative52.6%

      \[\leadsto \frac{x}{\color{blue}{y \cdot \frac{z}{y}} + \left(0.16666666666666666 \cdot \left(y \cdot z\right)\right) \cdot y} \]
    5. associate-*r/52.2%

      \[\leadsto \frac{x}{\color{blue}{\frac{y \cdot z}{y}} + \left(0.16666666666666666 \cdot \left(y \cdot z\right)\right) \cdot y} \]
    6. *-commutative52.2%

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{\frac{y}{y}}} + \left(0.16666666666666666 \cdot \left(y \cdot z\right)\right) \cdot y} \]
    8. *-inverses58.6%

      \[\leadsto \frac{x}{\frac{z}{\color{blue}{1}} + \left(0.16666666666666666 \cdot \left(y \cdot z\right)\right) \cdot y} \]
    9. *-commutative58.6%

      \[\leadsto \frac{x}{\frac{z}{1} + \color{blue}{\left(\left(y \cdot z\right) \cdot 0.16666666666666666\right)} \cdot y} \]
    10. associate-*l*58.6%

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

    \[\leadsto \frac{x}{\color{blue}{\frac{z}{1} + \left(y \cdot \left(z \cdot 0.16666666666666666\right)\right) \cdot y}} \]
  9. Final simplification58.6%

    \[\leadsto \frac{x}{z + y \cdot \left(y \cdot \left(z \cdot 0.16666666666666666\right)\right)} \]

Alternative 10: 60.5% accurate, 11.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 3 \cdot 10^{+105}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 3e+105) (/ x z) (* (/ x y) (/ y z))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 3e+105) {
		tmp = x / z;
	} else {
		tmp = (x / y) * (y / z);
	}
	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) :: tmp
    if (y <= 3d+105) then
        tmp = x / z
    else
        tmp = (x / y) * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 3e+105) {
		tmp = x / z;
	} else {
		tmp = (x / y) * (y / z);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 3e+105:
		tmp = x / z
	else:
		tmp = (x / y) * (y / z)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 3e+105)
		tmp = Float64(x / z);
	else
		tmp = Float64(Float64(x / y) * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 3e+105)
		tmp = x / z;
	else
		tmp = (x / y) * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 3e+105], N[(x / z), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3 \cdot 10^{+105}:\\
\;\;\;\;\frac{x}{z}\\

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


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

    1. Initial program 94.8%

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

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

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

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

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

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

    if 3.0000000000000001e105 < y

    1. Initial program 89.4%

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

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

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

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

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

      \[\leadsto x \cdot \frac{\color{blue}{\frac{y}{z}}}{y} \]
    5. Step-by-step derivation
      1. *-un-lft-identity23.4%

        \[\leadsto x \cdot \color{blue}{\left(1 \cdot \frac{\frac{y}{z}}{y}\right)} \]
      2. *-commutative23.4%

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{y}{y \cdot z} \cdot 1\right)} \]
    7. Step-by-step derivation
      1. *-commutative29.9%

        \[\leadsto \color{blue}{\left(\frac{y}{y \cdot z} \cdot 1\right) \cdot x} \]
      2. *-rgt-identity29.9%

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

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

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

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

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

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

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

Alternative 11: 60.5% accurate, 11.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 3.75 \cdot 10^{+105}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 3.75e+105) (/ x z) (/ (/ x y) (/ z y))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 3.75e+105) {
		tmp = x / z;
	} else {
		tmp = (x / y) / (z / y);
	}
	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) :: tmp
    if (y <= 3.75d+105) then
        tmp = x / z
    else
        tmp = (x / y) / (z / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 3.75e+105) {
		tmp = x / z;
	} else {
		tmp = (x / y) / (z / y);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 3.75e+105:
		tmp = x / z
	else:
		tmp = (x / y) / (z / y)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 3.75e+105)
		tmp = Float64(x / z);
	else
		tmp = Float64(Float64(x / y) / Float64(z / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 3.75e+105)
		tmp = x / z;
	else
		tmp = (x / y) / (z / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 3.75e+105], N[(x / z), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.75 \cdot 10^{+105}:\\
\;\;\;\;\frac{x}{z}\\

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


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

    1. Initial program 94.8%

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

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

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

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

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

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

    if 3.7500000000000001e105 < y

    1. Initial program 89.4%

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

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

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

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

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

      \[\leadsto x \cdot \frac{\color{blue}{\frac{y}{z}}}{y} \]
    5. Step-by-step derivation
      1. *-un-lft-identity23.4%

        \[\leadsto x \cdot \color{blue}{\left(1 \cdot \frac{\frac{y}{z}}{y}\right)} \]
      2. *-commutative23.4%

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{y}{y \cdot z} \cdot 1\right)} \]
    7. Step-by-step derivation
      1. *-rgt-identity29.9%

        \[\leadsto x \cdot \color{blue}{\frac{y}{y \cdot z}} \]
      2. clear-num29.9%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{\frac{z}{y}}} \]
    8. Applied egg-rr30.0%

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

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

Alternative 12: 59.0% accurate, 21.4× speedup?

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

\\
\frac{1}{\frac{z}{x}}
\end{array}
Derivation
  1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 59.2% accurate, 35.7× speedup?

\[\begin{array}{l} \\ \frac{x}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ x z))
double code(double x, double y, double z) {
	return x / 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 / z
end function
public static double code(double x, double y, double z) {
	return x / z;
}
def code(x, y, z):
	return x / z
function code(x, y, z)
	return Float64(x / z)
end
function tmp = code(x, y, z)
	tmp = x / z;
end
code[x_, y_, z_] := N[(x / z), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{z}
\end{array}
Derivation
  1. Initial program 94.0%

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

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

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

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

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

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

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

Developer target: 99.6% 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 2023311 
(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))