Linear.Quaternion:$ctanh from linear-1.19.1.3

Percentage Accurate: 96.0% → 95.9%
Time: 8.1s
Alternatives: 9
Speedup: N/A×

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 9 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.0% 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: 95.9% accurate, 1.0× speedup?

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

\\
\frac{\sin y}{y} \cdot \frac{x}{z}
\end{array}
Derivation
  1. Initial program 95.7%

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

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

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

    \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
  4. Final simplification97.2%

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

Alternative 2: 95.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-8} \lor \neg \left(y \leq 10^{-31}\right):\\
\;\;\;\;\sin y \cdot \frac{x}{y \cdot z}\\

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


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

    1. Initial program 92.0%

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

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

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

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

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

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

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

    if -2.70000000000000002e-8 < y < 1e-31

    1. Initial program 100.0%

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

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

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

Alternative 3: 65.8% accurate, 7.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+67}:\\
\;\;\;\;6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}\\

\mathbf{elif}\;y \leq 2.3:\\
\;\;\;\;\frac{x}{z} \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.4e67

    1. Initial program 91.7%

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

      \[\leadsto \frac{x \cdot \color{blue}{\left(1 + -0.16666666666666666 \cdot {y}^{2}\right)}}{z} \]
    3. Step-by-step derivation
      1. unpow22.1%

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

      \[\leadsto \frac{x \cdot \color{blue}{\left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}{z} \]
    5. Step-by-step derivation
      1. distribute-rgt-in2.1%

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

        \[\leadsto \frac{\color{blue}{x} + \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x}{z} \]
      3. flip-+0.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{z \cdot \left(y \cdot y\right)}} \]
    12. Simplified36.8%

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

    if -4.4e67 < y < 2.2999999999999998

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(1 + -0.16666666666666666 \cdot {y}^{2}\right)} \cdot \frac{x}{z} \]
    5. Step-by-step derivation
      1. unpow294.9%

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

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

    if 2.2999999999999998 < y

    1. Initial program 89.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. times-frac89.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+67}:\\ \;\;\;\;6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}\\ \mathbf{elif}\;y \leq 2.3:\\ \;\;\;\;\frac{x}{z} \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot \frac{y}{x}}\\ \end{array} \]

Alternative 4: 65.9% accurate, 9.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+22} \lor \neg \left(y \leq 3.5 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{y}{z \cdot \frac{y}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6e22 or 3.49999999999999993e-23 < y

    1. Initial program 91.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. times-frac91.6%

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

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

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

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

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

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

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

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

    if -6e22 < y < 3.49999999999999993e-23

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+22} \lor \neg \left(y \leq 3.5 \cdot 10^{-23}\right):\\ \;\;\;\;\frac{y}{z \cdot \frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z}\\ \end{array} \]

Alternative 5: 61.4% accurate, 9.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+90}:\\
\;\;\;\;\frac{x}{\frac{y \cdot z}{y}}\\

\mathbf{elif}\;y \leq 400000:\\
\;\;\;\;\frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.19999999999999961e90

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

    if -4.19999999999999961e90 < y < 4e5

    1. Initial program 99.9%

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

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

    if 4e5 < y

    1. Initial program 89.1%

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

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

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

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. times-frac89.2%

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

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

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

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

Alternative 6: 65.9% accurate, 9.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4:\\
\;\;\;\;6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{z}\\

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


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

    1. Initial program 92.7%

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

      \[\leadsto \frac{x \cdot \color{blue}{\left(1 + -0.16666666666666666 \cdot {y}^{2}\right)}}{z} \]
    3. Step-by-step derivation
      1. unpow23.8%

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

      \[\leadsto \frac{x \cdot \color{blue}{\left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}{z} \]
    5. Step-by-step derivation
      1. distribute-rgt-in3.8%

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

        \[\leadsto \frac{\color{blue}{x} + \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x}{z} \]
      3. flip-+0.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{z \cdot \left(y \cdot y\right)}} \]
    12. Simplified33.4%

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

    if -2.39999999999999991 < y < 3.49999999999999993e-23

    1. Initial program 100.0%

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

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

    if 3.49999999999999993e-23 < y

    1. Initial program 90.8%

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

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

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

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. times-frac90.9%

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

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

      \[\leadsto \color{blue}{\frac{y}{z}} \cdot \frac{x}{y} \]
    5. Step-by-step derivation
      1. *-commutative37.8%

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot y}{\frac{y}{x} \cdot z}} \]
      4. *-un-lft-identity42.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4:\\ \;\;\;\;6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot \frac{y}{x}}\\ \end{array} \]

Alternative 7: 66.1% accurate, 9.7× speedup?

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

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

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

    \[\leadsto \frac{x \cdot \color{blue}{\left(1 + -0.16666666666666666 \cdot {y}^{2}\right)}}{z} \]
  3. Step-by-step derivation
    1. unpow253.1%

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

    \[\leadsto \frac{x \cdot \color{blue}{\left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}{z} \]
  5. Step-by-step derivation
    1. distribute-rgt-in53.1%

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

      \[\leadsto \frac{\color{blue}{x} + \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x}{z} \]
    3. flip-+34.7%

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

      \[\leadsto \frac{\frac{x \cdot x - \color{blue}{\left(x \cdot \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)} \cdot \left(\left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x\right)}{x - \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x}}{z} \]
    5. *-commutative34.7%

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

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

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

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

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

      \[\leadsto \frac{\frac{x \cdot x - \left(\left(x \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \color{blue}{\left(\left(x \cdot \left(-0.16666666666666666 \cdot y\right)\right) \cdot y\right)}}{x - \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x}}{z} \]
    11. *-commutative36.0%

      \[\leadsto \frac{\frac{x \cdot x - \left(\left(x \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \color{blue}{\left(y \cdot -0.16666666666666666\right)}\right) \cdot y\right)}{x - \left(-0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot x}}{z} \]
    12. *-commutative36.0%

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

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

      \[\leadsto \frac{\frac{x \cdot x - \left(\left(x \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot y\right) \cdot \left(\left(x \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot y\right)}{x - \color{blue}{\left(x \cdot \left(-0.16666666666666666 \cdot y\right)\right) \cdot y}}}{z} \]
    15. *-commutative34.9%

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{\left(1 - -0.16666666666666666 \cdot {y}^{2}\right) \cdot z}} \]
  11. Step-by-step derivation
    1. *-commutative68.0%

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

      \[\leadsto \frac{x}{z \cdot \left(1 - -0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right)} \]
    3. cancel-sign-sub-inv68.0%

      \[\leadsto \frac{x}{z \cdot \color{blue}{\left(1 + \left(--0.16666666666666666\right) \cdot \left(y \cdot y\right)\right)}} \]
    4. metadata-eval68.0%

      \[\leadsto \frac{x}{z \cdot \left(1 + \color{blue}{0.16666666666666666} \cdot \left(y \cdot y\right)\right)} \]
    5. unpow268.0%

      \[\leadsto \frac{x}{z \cdot \left(1 + 0.16666666666666666 \cdot \color{blue}{{y}^{2}}\right)} \]
    6. distribute-lft-in68.0%

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

      \[\leadsto \frac{x}{\color{blue}{z} + z \cdot \left(0.16666666666666666 \cdot {y}^{2}\right)} \]
    8. unpow268.0%

      \[\leadsto \frac{x}{z + z \cdot \left(0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right)} \]
  12. Simplified68.0%

    \[\leadsto \color{blue}{\frac{x}{z + z \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)}} \]
  13. Final simplification68.0%

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

Alternative 8: 59.4% accurate, 11.8× speedup?

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

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

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


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

    1. Initial program 97.6%

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

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

    if 7.99999999999999964e-6 < y

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

Alternative 9: 58.3% 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 95.7%

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

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

    \[\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 2023194 
(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))