?

Average Error: 11.4 → 3.0
Time: 9.4s
Precision: binary64
Cost: 1616

?

\[x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]
\[\begin{array}{l} t_1 := x - \frac{y}{z}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-118}:\\ \;\;\;\;x - \frac{\frac{y}{y \cdot t - z \cdot \left(z + z\right)}}{\frac{-0.5}{z}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-254}:\\ \;\;\;\;x - -2 \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+71}:\\ \;\;\;\;x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- x (/ (* (* y 2.0) z) (- (* (* z 2.0) z) (* y t)))))
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (/ y z))))
   (if (<= z -3.1e+118)
     t_1
     (if (<= z -2e-118)
       (- x (/ (/ y (- (* y t) (* z (+ z z)))) (/ -0.5 z)))
       (if (<= z 4.4e-254)
         (- x (* -2.0 (/ z t)))
         (if (<= z 2e+71)
           (- x (* y (/ (* z -2.0) (- (* y t) (* 2.0 (* z z))))))
           t_1))))))
double code(double x, double y, double z, double t) {
	return x - (((y * 2.0) * z) / (((z * 2.0) * z) - (y * t)));
}
double code(double x, double y, double z, double t) {
	double t_1 = x - (y / z);
	double tmp;
	if (z <= -3.1e+118) {
		tmp = t_1;
	} else if (z <= -2e-118) {
		tmp = x - ((y / ((y * t) - (z * (z + z)))) / (-0.5 / z));
	} else if (z <= 4.4e-254) {
		tmp = x - (-2.0 * (z / t));
	} else if (z <= 2e+71) {
		tmp = x - (y * ((z * -2.0) / ((y * t) - (2.0 * (z * z)))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x - (((y * 2.0d0) * z) / (((z * 2.0d0) * z) - (y * t)))
end function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (y / z)
    if (z <= (-3.1d+118)) then
        tmp = t_1
    else if (z <= (-2d-118)) then
        tmp = x - ((y / ((y * t) - (z * (z + z)))) / ((-0.5d0) / z))
    else if (z <= 4.4d-254) then
        tmp = x - ((-2.0d0) * (z / t))
    else if (z <= 2d+71) then
        tmp = x - (y * ((z * (-2.0d0)) / ((y * t) - (2.0d0 * (z * z)))))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	return x - (((y * 2.0) * z) / (((z * 2.0) * z) - (y * t)));
}
public static double code(double x, double y, double z, double t) {
	double t_1 = x - (y / z);
	double tmp;
	if (z <= -3.1e+118) {
		tmp = t_1;
	} else if (z <= -2e-118) {
		tmp = x - ((y / ((y * t) - (z * (z + z)))) / (-0.5 / z));
	} else if (z <= 4.4e-254) {
		tmp = x - (-2.0 * (z / t));
	} else if (z <= 2e+71) {
		tmp = x - (y * ((z * -2.0) / ((y * t) - (2.0 * (z * z)))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	return x - (((y * 2.0) * z) / (((z * 2.0) * z) - (y * t)))
def code(x, y, z, t):
	t_1 = x - (y / z)
	tmp = 0
	if z <= -3.1e+118:
		tmp = t_1
	elif z <= -2e-118:
		tmp = x - ((y / ((y * t) - (z * (z + z)))) / (-0.5 / z))
	elif z <= 4.4e-254:
		tmp = x - (-2.0 * (z / t))
	elif z <= 2e+71:
		tmp = x - (y * ((z * -2.0) / ((y * t) - (2.0 * (z * z)))))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	return Float64(x - Float64(Float64(Float64(y * 2.0) * z) / Float64(Float64(Float64(z * 2.0) * z) - Float64(y * t))))
end
function code(x, y, z, t)
	t_1 = Float64(x - Float64(y / z))
	tmp = 0.0
	if (z <= -3.1e+118)
		tmp = t_1;
	elseif (z <= -2e-118)
		tmp = Float64(x - Float64(Float64(y / Float64(Float64(y * t) - Float64(z * Float64(z + z)))) / Float64(-0.5 / z)));
	elseif (z <= 4.4e-254)
		tmp = Float64(x - Float64(-2.0 * Float64(z / t)));
	elseif (z <= 2e+71)
		tmp = Float64(x - Float64(y * Float64(Float64(z * -2.0) / Float64(Float64(y * t) - Float64(2.0 * Float64(z * z))))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp = code(x, y, z, t)
	tmp = x - (((y * 2.0) * z) / (((z * 2.0) * z) - (y * t)));
end
function tmp_2 = code(x, y, z, t)
	t_1 = x - (y / z);
	tmp = 0.0;
	if (z <= -3.1e+118)
		tmp = t_1;
	elseif (z <= -2e-118)
		tmp = x - ((y / ((y * t) - (z * (z + z)))) / (-0.5 / z));
	elseif (z <= 4.4e-254)
		tmp = x - (-2.0 * (z / t));
	elseif (z <= 2e+71)
		tmp = x - (y * ((z * -2.0) / ((y * t) - (2.0 * (z * z)))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := N[(x - N[(N[(N[(y * 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(N[(N[(z * 2.0), $MachinePrecision] * z), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+118], t$95$1, If[LessEqual[z, -2e-118], N[(x - N[(N[(y / N[(N[(y * t), $MachinePrecision] - N[(z * N[(z + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-0.5 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-254], N[(x - N[(-2.0 * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+71], N[(x - N[(y * N[(N[(z * -2.0), $MachinePrecision] / N[(N[(y * t), $MachinePrecision] - N[(2.0 * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t}
\begin{array}{l}
t_1 := x - \frac{y}{z}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+118}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2 \cdot 10^{-118}:\\
\;\;\;\;x - \frac{\frac{y}{y \cdot t - z \cdot \left(z + z\right)}}{\frac{-0.5}{z}}\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-254}:\\
\;\;\;\;x - -2 \cdot \frac{z}{t}\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+71}:\\
\;\;\;\;x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original11.4
Target0.1
Herbie3.0
\[x - \frac{1}{\frac{z}{y} - \frac{\frac{t}{2}}{z}} \]

Derivation?

  1. Split input into 4 regimes
  2. if z < -3.09999999999999986e118 or 2.0000000000000001e71 < z

    1. Initial program 22.5

      \[x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]
    2. Simplified11.4

      \[\leadsto \color{blue}{x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}} \]
      Proof

      [Start]22.5

      \[ x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]

      rational.json-simplify-50 [=>]22.5

      \[ x - \color{blue}{\frac{-\left(y \cdot 2\right) \cdot z}{y \cdot t - \left(z \cdot 2\right) \cdot z}} \]

      rational.json-simplify-10 [=>]22.5

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

      rational.json-simplify-47 [=>]22.5

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

      rational.json-simplify-2 [=>]22.5

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

      rational.json-simplify-43 [=>]22.6

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

      rational.json-simplify-2 [<=]22.6

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

      rational.json-simplify-2 [=>]22.6

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

      rational.json-simplify-49 [=>]11.4

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

      rational.json-simplify-46 [=>]11.4

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

      rational.json-simplify-2 [=>]11.4

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

      rational.json-simplify-49 [=>]11.4

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

      metadata-eval [=>]11.4

      \[ x - y \cdot \frac{z \cdot \color{blue}{-2}}{y \cdot t - \left(z \cdot 2\right) \cdot z} \]

      rational.json-simplify-2 [=>]11.4

      \[ x - y \cdot \frac{z \cdot -2}{y \cdot t - \color{blue}{z \cdot \left(z \cdot 2\right)}} \]

      rational.json-simplify-43 [<=]11.4

      \[ x - y \cdot \frac{z \cdot -2}{y \cdot t - \color{blue}{2 \cdot \left(z \cdot z\right)}} \]
    3. Taylor expanded in y around 0 3.4

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

    if -3.09999999999999986e118 < z < -1.99999999999999997e-118

    1. Initial program 4.2

      \[x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]
    2. Simplified1.8

      \[\leadsto \color{blue}{x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}} \]
      Proof

      [Start]4.2

      \[ x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]

      rational.json-simplify-50 [=>]4.2

      \[ x - \color{blue}{\frac{-\left(y \cdot 2\right) \cdot z}{y \cdot t - \left(z \cdot 2\right) \cdot z}} \]

      rational.json-simplify-10 [=>]4.2

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

      rational.json-simplify-47 [=>]4.2

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

      rational.json-simplify-2 [=>]4.2

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

      rational.json-simplify-43 [=>]4.2

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

      rational.json-simplify-2 [<=]4.2

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

      rational.json-simplify-2 [=>]4.2

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

      rational.json-simplify-49 [=>]1.8

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

      rational.json-simplify-46 [=>]1.8

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

      rational.json-simplify-2 [=>]1.8

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

      rational.json-simplify-49 [=>]1.8

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

      metadata-eval [=>]1.8

      \[ x - y \cdot \frac{z \cdot \color{blue}{-2}}{y \cdot t - \left(z \cdot 2\right) \cdot z} \]

      rational.json-simplify-2 [=>]1.8

      \[ x - y \cdot \frac{z \cdot -2}{y \cdot t - \color{blue}{z \cdot \left(z \cdot 2\right)}} \]

      rational.json-simplify-43 [<=]1.8

      \[ x - y \cdot \frac{z \cdot -2}{y \cdot t - \color{blue}{2 \cdot \left(z \cdot z\right)}} \]
    3. Applied egg-rr1.7

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

    if -1.99999999999999997e-118 < z < 4.4000000000000002e-254

    1. Initial program 7.8

      \[x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]
    2. Simplified7.5

      \[\leadsto \color{blue}{x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}} \]
      Proof

      [Start]7.8

      \[ x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]

      rational.json-simplify-50 [=>]7.8

      \[ x - \color{blue}{\frac{-\left(y \cdot 2\right) \cdot z}{y \cdot t - \left(z \cdot 2\right) \cdot z}} \]

      rational.json-simplify-10 [=>]7.8

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

      rational.json-simplify-47 [=>]7.8

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

      rational.json-simplify-2 [=>]7.8

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

      rational.json-simplify-43 [=>]7.8

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

      rational.json-simplify-2 [<=]7.8

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

      rational.json-simplify-2 [=>]7.8

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

      rational.json-simplify-49 [=>]7.5

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

      rational.json-simplify-46 [=>]7.5

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

      rational.json-simplify-2 [=>]7.5

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

      rational.json-simplify-49 [=>]7.5

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

      metadata-eval [=>]7.5

      \[ x - y \cdot \frac{z \cdot \color{blue}{-2}}{y \cdot t - \left(z \cdot 2\right) \cdot z} \]

      rational.json-simplify-2 [=>]7.5

      \[ x - y \cdot \frac{z \cdot -2}{y \cdot t - \color{blue}{z \cdot \left(z \cdot 2\right)}} \]

      rational.json-simplify-43 [<=]7.5

      \[ x - y \cdot \frac{z \cdot -2}{y \cdot t - \color{blue}{2 \cdot \left(z \cdot z\right)}} \]
    3. Taylor expanded in y around inf 1.9

      \[\leadsto x - \color{blue}{-2 \cdot \frac{z}{t}} \]

    if 4.4000000000000002e-254 < z < 2.0000000000000001e71

    1. Initial program 5.0

      \[x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]
    2. Simplified4.1

      \[\leadsto \color{blue}{x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}} \]
      Proof

      [Start]5.0

      \[ x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t} \]

      rational.json-simplify-50 [=>]5.0

      \[ x - \color{blue}{\frac{-\left(y \cdot 2\right) \cdot z}{y \cdot t - \left(z \cdot 2\right) \cdot z}} \]

      rational.json-simplify-10 [=>]5.0

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

      rational.json-simplify-47 [=>]5.0

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

      rational.json-simplify-2 [=>]5.0

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

      rational.json-simplify-43 [=>]5.0

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

      rational.json-simplify-2 [<=]5.0

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

      rational.json-simplify-2 [=>]5.0

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

      rational.json-simplify-49 [=>]4.1

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

      rational.json-simplify-46 [=>]4.1

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

      rational.json-simplify-2 [=>]4.1

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

      rational.json-simplify-49 [=>]4.1

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

      metadata-eval [=>]4.1

      \[ x - y \cdot \frac{z \cdot \color{blue}{-2}}{y \cdot t - \left(z \cdot 2\right) \cdot z} \]

      rational.json-simplify-2 [=>]4.1

      \[ x - y \cdot \frac{z \cdot -2}{y \cdot t - \color{blue}{z \cdot \left(z \cdot 2\right)}} \]

      rational.json-simplify-43 [<=]4.1

      \[ x - y \cdot \frac{z \cdot -2}{y \cdot t - \color{blue}{2 \cdot \left(z \cdot z\right)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification3.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+118}:\\ \;\;\;\;x - \frac{y}{z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-118}:\\ \;\;\;\;x - \frac{\frac{y}{y \cdot t - z \cdot \left(z + z\right)}}{\frac{-0.5}{z}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-254}:\\ \;\;\;\;x - -2 \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+71}:\\ \;\;\;\;x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z}\\ \end{array} \]

Alternatives

Alternative 1
Error3.0
Cost1616
\[\begin{array}{l} t_1 := x - \frac{y}{z}\\ t_2 := x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{+118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-254}:\\ \;\;\;\;x - -2 \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error2.9
Cost1616
\[\begin{array}{l} t_1 := x - \frac{y}{z}\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{+118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-125}:\\ \;\;\;\;x - z \cdot \frac{y \cdot 2}{z \cdot \left(2 \cdot z\right) - y \cdot t}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-254}:\\ \;\;\;\;x - -2 \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+71}:\\ \;\;\;\;x - y \cdot \frac{z \cdot -2}{y \cdot t - 2 \cdot \left(z \cdot z\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error7.3
Cost712
\[\begin{array}{l} t_1 := x - \frac{y}{z}\\ \mathbf{if}\;z \leq -1.12 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+67}:\\ \;\;\;\;x - -2 \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error11.3
Cost584
\[\begin{array}{l} t_1 := x - \frac{y}{z}\\ \mathbf{if}\;z \leq -1.52 \cdot 10^{-52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-10}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error15.4
Cost520
\[\begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{-247}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-228}:\\ \;\;\;\;\frac{y}{-z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 6
Error15.5
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023064 
(FPCore (x y z t)
  :name "Numeric.AD.Rank1.Halley:findZero from ad-4.2.4"
  :precision binary64

  :herbie-target
  (- x (/ 1.0 (- (/ z y) (/ (/ t 2.0) z))))

  (- x (/ (* (* y 2.0) z) (- (* (* z 2.0) z) (* y t)))))