?

Average Error: 5.55% → 1.21%
Time: 17.2s
Precision: binary64
Cost: 1224

?

\[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
\[\begin{array}{l} t_1 := x - \frac{y}{z \cdot 3}\\ \mathbf{if}\;t \leq -9 \cdot 10^{+137}:\\ \;\;\;\;\frac{t}{z \cdot \left(y \cdot 3\right)} + t_1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\ \;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{t}{y \cdot \left(z \cdot 3\right)}\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (/ y (* z 3.0)))))
   (if (<= t -9e+137)
     (+ (/ t (* z (* y 3.0))) t_1)
     (if (<= t 5e-8)
       (+ x (/ (- y (/ t y)) (* z -3.0)))
       (+ t_1 (/ t (* y (* z 3.0))))))))
double code(double x, double y, double z, double t) {
	return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
double code(double x, double y, double z, double t) {
	double t_1 = x - (y / (z * 3.0));
	double tmp;
	if (t <= -9e+137) {
		tmp = (t / (z * (y * 3.0))) + t_1;
	} else if (t <= 5e-8) {
		tmp = x + ((y - (t / y)) / (z * -3.0));
	} else {
		tmp = t_1 + (t / (y * (z * 3.0)));
	}
	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 / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
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 * 3.0d0))
    if (t <= (-9d+137)) then
        tmp = (t / (z * (y * 3.0d0))) + t_1
    else if (t <= 5d-8) then
        tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
    else
        tmp = t_1 + (t / (y * (z * 3.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
public static double code(double x, double y, double z, double t) {
	double t_1 = x - (y / (z * 3.0));
	double tmp;
	if (t <= -9e+137) {
		tmp = (t / (z * (y * 3.0))) + t_1;
	} else if (t <= 5e-8) {
		tmp = x + ((y - (t / y)) / (z * -3.0));
	} else {
		tmp = t_1 + (t / (y * (z * 3.0)));
	}
	return tmp;
}
def code(x, y, z, t):
	return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
def code(x, y, z, t):
	t_1 = x - (y / (z * 3.0))
	tmp = 0
	if t <= -9e+137:
		tmp = (t / (z * (y * 3.0))) + t_1
	elif t <= 5e-8:
		tmp = x + ((y - (t / y)) / (z * -3.0))
	else:
		tmp = t_1 + (t / (y * (z * 3.0)))
	return tmp
function code(x, y, z, t)
	return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y)))
end
function code(x, y, z, t)
	t_1 = Float64(x - Float64(y / Float64(z * 3.0)))
	tmp = 0.0
	if (t <= -9e+137)
		tmp = Float64(Float64(t / Float64(z * Float64(y * 3.0))) + t_1);
	elseif (t <= 5e-8)
		tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0)));
	else
		tmp = Float64(t_1 + Float64(t / Float64(y * Float64(z * 3.0))));
	end
	return tmp
end
function tmp = code(x, y, z, t)
	tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
end
function tmp_2 = code(x, y, z, t)
	t_1 = x - (y / (z * 3.0));
	tmp = 0.0;
	if (t <= -9e+137)
		tmp = (t / (z * (y * 3.0))) + t_1;
	elseif (t <= 5e-8)
		tmp = x + ((y - (t / y)) / (z * -3.0));
	else
		tmp = t_1 + (t / (y * (z * 3.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+137], N[(N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 5e-8], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;t \leq -9 \cdot 10^{+137}:\\
\;\;\;\;\frac{t}{z \cdot \left(y \cdot 3\right)} + t_1\\

\mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\

\mathbf{else}:\\
\;\;\;\;t_1 + \frac{t}{y \cdot \left(z \cdot 3\right)}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.55%
Target2.5%
Herbie1.21%
\[\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y} \]

Derivation?

  1. Split input into 3 regimes
  2. if t < -9.0000000000000003e137

    1. Initial program 1.47

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

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

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

      [Start]1.46

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

      associate-*r* [=>]1.47

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

      *-commutative [<=]1.47

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

      *-commutative [=>]1.47

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

    if -9.0000000000000003e137 < t < 4.9999999999999998e-8

    1. Initial program 7.63

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

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

      [Start]7.63

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

      associate-+l- [=>]7.63

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

      sub-neg [=>]7.63

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

      neg-mul-1 [=>]7.63

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

      distribute-lft-out-- [<=]7.63

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

      associate-*r/ [=>]7.63

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

      associate-*l/ [<=]7.68

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

      associate-*r/ [=>]7.68

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

      times-frac [=>]1.32

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

      distribute-lft-out-- [=>]1.32

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

      *-commutative [=>]1.32

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

      associate-/r* [=>]1.3

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

      metadata-eval [=>]1.3

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

      \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{z \cdot -3}} \]

    if 4.9999999999999998e-8 < t

    1. Initial program 0.95

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.21

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+137}:\\ \;\;\;\;\frac{t}{z \cdot \left(y \cdot 3\right)} + \left(x - \frac{y}{z \cdot 3}\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\ \;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error49.72%
Cost2036
\[\begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ t_2 := \frac{y}{z \cdot -3}\\ \mathbf{if}\;y \leq -3 \cdot 10^{+117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-47}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-166}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{-159}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1020000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 10^{+25}:\\ \;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{y}}{z}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+157}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error50.21%
Cost2036
\[\begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ t_2 := \frac{y}{z \cdot -3}\\ t_3 := 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{if}\;y \leq -1 \cdot 10^{+116}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-47}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-156}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{-252}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-166}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-159}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-35}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+39}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+156}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error52.07%
Cost1772
\[\begin{array}{l} t_1 := t \cdot \frac{\frac{0.3333333333333333}{y}}{z}\\ t_2 := \frac{y}{z \cdot -3}\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{+116}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-46}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -6.1 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.3 \cdot 10^{-152}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-276}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 20500000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+156}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error49.97%
Cost1772
\[\begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ t_2 := \frac{y}{z \cdot -3}\\ \mathbf{if}\;y \leq -1.05 \cdot 10^{+116}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-47}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-156}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 360000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 10^{+25}:\\ \;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{y}}{z}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+156}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error26.9%
Cost1505
\[\begin{array}{l} t_1 := t \cdot \frac{0.3333333333333333}{y \cdot z}\\ t_2 := x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3.55 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-252}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-165}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-159}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-76} \lor \neg \left(y \leq 2.1 \cdot 10^{-57}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error26.79%
Cost1504
\[\begin{array}{l} t_1 := t \cdot \frac{0.3333333333333333}{y \cdot z}\\ t_2 := x + \frac{\frac{y}{z}}{-3}\\ t_3 := x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.52 \cdot 10^{-92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-156}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{-251}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-167}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-159}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{-77}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error26.85%
Cost1504
\[\begin{array}{l} t_1 := \frac{t \cdot 0.3333333333333333}{y \cdot z}\\ t_2 := x + \frac{\frac{y}{z}}{-3}\\ t_3 := x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-155}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-251}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-166}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-158}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-76}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error26.74%
Cost1504
\[\begin{array}{l} t_1 := x + \frac{\frac{y}{z}}{-3}\\ t_2 := x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.52 \cdot 10^{-92}:\\ \;\;\;\;\frac{\frac{t}{z}}{y \cdot 3}\\ \mathbf{elif}\;y \leq -1.32 \cdot 10^{-155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-253}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-167}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-159}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-57}:\\ \;\;\;\;\frac{t \cdot 0.3333333333333333}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error26.7%
Cost1504
\[\begin{array}{l} t_1 := x - \frac{y}{z \cdot 3}\\ t_2 := x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -5.3 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{t}{z}}{y \cdot 3}\\ \mathbf{elif}\;y \leq -8.3 \cdot 10^{-157}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-252}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-159}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-57}:\\ \;\;\;\;\frac{t \cdot 0.3333333333333333}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error0.85%
Cost1481
\[\begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+46} \lor \neg \left(z \cdot 3 \leq 2 \cdot 10^{-76}\right):\\ \;\;\;\;\frac{t}{z \cdot \left(y \cdot 3\right)} + \left(x - \frac{y}{z \cdot 3}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \end{array} \]
Alternative 11
Error17.72%
Cost841
\[\begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-58} \lor \neg \left(x \leq 3.2 \cdot 10^{-78}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\ \end{array} \]
Alternative 12
Error12.86%
Cost841
\[\begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{-17} \lor \neg \left(y \leq 8.6 \cdot 10^{+40}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\ \end{array} \]
Alternative 13
Error12.9%
Cost841
\[\begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{-17} \lor \neg \left(y \leq 2.05 \cdot 10^{+40}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \end{array} \]
Alternative 14
Error5.8%
Cost704
\[x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z} \]
Alternative 15
Error5.76%
Cost704
\[x + \frac{y - \frac{t}{y}}{z \cdot -3} \]
Alternative 16
Error43.4%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 17
Error43.38%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{+17}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 18
Error58.17%
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023102 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :herbie-target
  (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))

  (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))