Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H

?

Percentage Accurate: 95.2% → 95.9%
Time: 10.4s
Precision: binary64
Cost: 969

?

\[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{-188} \lor \neg \left(y \leq 3.6 \cdot 10^{-251}\right):\\ \;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{z \cdot \left(3 \cdot y\right)}\\ \end{array} \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
 (if (or (<= y -6.4e-188) (not (<= y 3.6e-251)))
   (+ x (/ (- y (/ t y)) (* z -3.0)))
   (+ x (/ t (* z (* 3.0 y))))))
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 tmp;
	if ((y <= -6.4e-188) || !(y <= 3.6e-251)) {
		tmp = x + ((y - (t / y)) / (z * -3.0));
	} else {
		tmp = x + (t / (z * (3.0 * y)));
	}
	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) :: tmp
    if ((y <= (-6.4d-188)) .or. (.not. (y <= 3.6d-251))) then
        tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
    else
        tmp = x + (t / (z * (3.0d0 * y)))
    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 tmp;
	if ((y <= -6.4e-188) || !(y <= 3.6e-251)) {
		tmp = x + ((y - (t / y)) / (z * -3.0));
	} else {
		tmp = x + (t / (z * (3.0 * y)));
	}
	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):
	tmp = 0
	if (y <= -6.4e-188) or not (y <= 3.6e-251):
		tmp = x + ((y - (t / y)) / (z * -3.0))
	else:
		tmp = x + (t / (z * (3.0 * y)))
	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)
	tmp = 0.0
	if ((y <= -6.4e-188) || !(y <= 3.6e-251))
		tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0)));
	else
		tmp = Float64(x + Float64(t / Float64(z * Float64(3.0 * y))));
	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)
	tmp = 0.0;
	if ((y <= -6.4e-188) || ~((y <= 3.6e-251)))
		tmp = x + ((y - (t / y)) / (z * -3.0));
	else
		tmp = x + (t / (z * (3.0 * y)));
	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_] := If[Or[LessEqual[y, -6.4e-188], N[Not[LessEqual[y, 3.6e-251]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{-188} \lor \neg \left(y \leq 3.6 \cdot 10^{-251}\right):\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\

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


\end{array}
\end{array}

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.

Herbie found 17 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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.

Bogosity?

Bogosity

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original95.2%
Target95.5%
Herbie95.9%
\[\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y} \]

Derivation?

  1. Split input into 2 regimes
  2. if y < -6.40000000000000044e-188 or 3.6000000000000001e-251 < y

    1. Initial program 94.1%

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

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

      [Start]94.1%

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

      associate-+l- [=>]94.1%

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

      sub-neg [=>]94.1%

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

      sub-neg [=>]94.1%

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

      distribute-neg-in [=>]94.1%

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

      unsub-neg [=>]94.1%

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

      neg-mul-1 [=>]94.1%

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

      associate-*r/ [=>]94.1%

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

      associate-*l/ [<=]94.0%

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

      distribute-neg-frac [=>]94.0%

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

      neg-mul-1 [=>]94.0%

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

      times-frac [=>]97.4%

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

      distribute-lft-out-- [=>]98.8%

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

      *-commutative [=>]98.8%

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

      associate-/r* [=>]98.8%

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

      metadata-eval [=>]98.8%

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

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

      [Start]98.8%

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

      *-commutative [=>]98.8%

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

      clear-num [=>]98.8%

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

      un-div-inv [=>]98.9%

      \[ x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]

      div-inv [=>]98.9%

      \[ x + \frac{y - \frac{t}{y}}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]

      metadata-eval [=>]98.9%

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

    if -6.40000000000000044e-188 < y < 3.6000000000000001e-251

    1. Initial program 99.8%

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

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

      [Start]99.8%

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

      associate-+l- [=>]99.8%

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

      sub-neg [=>]99.8%

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

      sub-neg [=>]99.8%

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

      distribute-neg-in [=>]99.8%

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

      unsub-neg [=>]99.8%

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

      neg-mul-1 [=>]99.8%

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

      associate-*r/ [=>]99.8%

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

      associate-*l/ [<=]99.8%

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

      distribute-neg-frac [=>]99.8%

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

      neg-mul-1 [=>]99.8%

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

      times-frac [=>]75.6%

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

      distribute-lft-out-- [=>]75.6%

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

      *-commutative [=>]75.6%

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

      associate-/r* [=>]75.6%

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

      metadata-eval [=>]75.6%

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

      \[\leadsto x + \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    4. Simplified75.6%

      \[\leadsto x + \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} \]
      Step-by-step derivation

      [Start]99.7%

      \[ x + 0.3333333333333333 \cdot \frac{t}{y \cdot z} \]

      *-commutative [=>]99.7%

      \[ x + \color{blue}{\frac{t}{y \cdot z} \cdot 0.3333333333333333} \]

      associate-*l/ [=>]99.8%

      \[ x + \color{blue}{\frac{t \cdot 0.3333333333333333}{y \cdot z}} \]

      times-frac [=>]75.6%

      \[ x + \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} \]
    5. Applied egg-rr99.8%

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

      [Start]75.6%

      \[ x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z} \]

      *-commutative [=>]75.6%

      \[ x + \color{blue}{\frac{0.3333333333333333}{z} \cdot \frac{t}{y}} \]

      clear-num [=>]75.6%

      \[ x + \color{blue}{\frac{1}{\frac{z}{0.3333333333333333}}} \cdot \frac{t}{y} \]

      frac-times [=>]99.7%

      \[ x + \color{blue}{\frac{1 \cdot t}{\frac{z}{0.3333333333333333} \cdot y}} \]

      *-un-lft-identity [<=]99.7%

      \[ x + \frac{\color{blue}{t}}{\frac{z}{0.3333333333333333} \cdot y} \]

      div-inv [=>]99.8%

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

      metadata-eval [=>]99.8%

      \[ x + \frac{t}{\left(z \cdot \color{blue}{3}\right) \cdot y} \]
    6. Taylor expanded in z around 0 99.8%

      \[\leadsto x + \frac{t}{\color{blue}{3 \cdot \left(y \cdot z\right)}} \]
    7. Simplified99.9%

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

      [Start]99.8%

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

      associate-*r* [=>]99.9%

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

      *-commutative [<=]99.9%

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

      *-commutative [=>]99.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{-188} \lor \neg \left(y \leq 3.6 \cdot 10^{-251}\right):\\ \;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{z \cdot \left(3 \cdot y\right)}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy95.9%
Cost969
\[\begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{-188} \lor \neg \left(y \leq 3.6 \cdot 10^{-251}\right):\\ \;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{z \cdot \left(3 \cdot y\right)}\\ \end{array} \]
Alternative 2
Accuracy97.3%
Cost1220
\[\begin{array}{l} \mathbf{if}\;z \cdot 3 \leq 5 \cdot 10^{-119}:\\ \;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{t}{z \cdot \left(3 \cdot y\right)} - \frac{y}{z} \cdot 0.3333333333333333\right)\\ \end{array} \]
Alternative 3
Accuracy97.2%
Cost1220
\[\begin{array}{l} \mathbf{if}\;z \cdot 3 \leq 5 \cdot 10^{-128}:\\ \;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\ \end{array} \]
Alternative 4
Accuracy60.4%
Cost980
\[\begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+109}:\\ \;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-33}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{-17}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+41}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+91}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]
Alternative 5
Accuracy60.2%
Cost980
\[\begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+112}:\\ \;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-34}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-12}:\\ \;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+41}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+91}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]
Alternative 6
Accuracy87.4%
Cost972
\[\begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-265}:\\ \;\;\;\;x + \frac{t}{z \cdot \left(3 \cdot y\right)}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-46}:\\ \;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]
Alternative 7
Accuracy95.9%
Cost969
\[\begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{-185} \lor \neg \left(y \leq 7.8 \cdot 10^{-265}\right):\\ \;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{z \cdot \left(3 \cdot y\right)}\\ \end{array} \]
Alternative 8
Accuracy76.1%
Cost844
\[\begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{-92}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-265}:\\ \;\;\;\;\frac{t}{z \cdot \left(3 \cdot y\right)}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{\frac{0.3333333333333333}{z}}{\frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]
Alternative 9
Accuracy80.5%
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-79}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+86}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \end{array} \]
Alternative 10
Accuracy87.8%
Cost840
\[\begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+59}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-29}:\\ \;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]
Alternative 11
Accuracy88.2%
Cost840
\[\begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{+58}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]
Alternative 12
Accuracy75.9%
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{-92} \lor \neg \left(y \leq 5.6 \cdot 10^{-39}\right):\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\ \end{array} \]
Alternative 13
Accuracy75.8%
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{-92}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-34}:\\ \;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]
Alternative 14
Accuracy75.9%
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{-92}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-32}:\\ \;\;\;\;\frac{t}{z \cdot \left(3 \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]
Alternative 15
Accuracy46.9%
Cost584
\[\begin{array}{l} \mathbf{if}\;z \leq -14600000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+157}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 16
Accuracy46.8%
Cost584
\[\begin{array}{l} \mathbf{if}\;z \leq -550:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+157}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 17
Accuracy29.7%
Cost64
\[x \]

Reproduce?

herbie shell --seed 2023167 
(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))))