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

?

Percentage Accurate: 79.3% → 87.8%
Time: 35.4s
Precision: binary64
Cost: 5068

?

\[ \begin{array}{c}[t, a] = \mathsf{sort}([t, a])\\ \end{array} \]
\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
\[\begin{array}{l} t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ t_2 := x \cdot \left(9 \cdot y\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+134}:\\ \;\;\;\;\frac{b + \left(t_2 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{elif}\;t_1 \leq 0.0002:\\ \;\;\;\;\frac{1}{c} \cdot \frac{b + \left(t_2 - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{z}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c)))
        (t_2 (* x (* 9.0 y))))
   (if (<= t_1 -1e+134)
     (/ (+ b (- t_2 (* (* z 4.0) (* t a)))) (* z c))
     (if (<= t_1 0.0002)
       (* (/ 1.0 c) (/ (+ b (- t_2 (* z (* 4.0 (* t a))))) z))
       (if (<= t_1 INFINITY) t_1 (* -4.0 (/ a (/ c t))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
	double t_2 = x * (9.0 * y);
	double tmp;
	if (t_1 <= -1e+134) {
		tmp = (b + (t_2 - ((z * 4.0) * (t * a)))) / (z * c);
	} else if (t_1 <= 0.0002) {
		tmp = (1.0 / c) * ((b + (t_2 - (z * (4.0 * (t * a))))) / z);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = -4.0 * (a / (c / t));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
	double t_2 = x * (9.0 * y);
	double tmp;
	if (t_1 <= -1e+134) {
		tmp = (b + (t_2 - ((z * 4.0) * (t * a)))) / (z * c);
	} else if (t_1 <= 0.0002) {
		tmp = (1.0 / c) * ((b + (t_2 - (z * (4.0 * (t * a))))) / z);
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = -4.0 * (a / (c / t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
def code(x, y, z, t, a, b, c):
	t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c)
	t_2 = x * (9.0 * y)
	tmp = 0
	if t_1 <= -1e+134:
		tmp = (b + (t_2 - ((z * 4.0) * (t * a)))) / (z * c)
	elif t_1 <= 0.0002:
		tmp = (1.0 / c) * ((b + (t_2 - (z * (4.0 * (t * a))))) / z)
	elif t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = -4.0 * (a / (c / t))
	return tmp
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c))
	t_2 = Float64(x * Float64(9.0 * y))
	tmp = 0.0
	if (t_1 <= -1e+134)
		tmp = Float64(Float64(b + Float64(t_2 - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c));
	elseif (t_1 <= 0.0002)
		tmp = Float64(Float64(1.0 / c) * Float64(Float64(b + Float64(t_2 - Float64(z * Float64(4.0 * Float64(t * a))))) / z));
	elseif (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(-4.0 * Float64(a / Float64(c / t)));
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
	t_2 = x * (9.0 * y);
	tmp = 0.0;
	if (t_1 <= -1e+134)
		tmp = (b + (t_2 - ((z * 4.0) * (t * a)))) / (z * c);
	elseif (t_1 <= 0.0002)
		tmp = (1.0 / c) * ((b + (t_2 - (z * (4.0 * (t * a))))) / z);
	elseif (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = -4.0 * (a / (c / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+134], N[(N[(b + N[(t$95$2 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0002], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(b + N[(t$95$2 - N[(z * N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
t_2 := x \cdot \left(9 \cdot y\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+134}:\\
\;\;\;\;\frac{b + \left(t_2 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\

\mathbf{elif}\;t_1 \leq 0.0002:\\
\;\;\;\;\frac{1}{c} \cdot \frac{b + \left(t_2 - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{z}\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\


\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 19 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

Original79.3%
Target80.8%
Herbie87.8%
\[\begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < -1.100156740804105 \cdot 10^{-171}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < 0:\\ \;\;\;\;\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z}}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < 1.1708877911747488 \cdot 10^{-53}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < 2.876823679546137 \cdot 10^{+130}:\\ \;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < 1.3838515042456319 \cdot 10^{+158}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}\\ \end{array} \]

Derivation?

  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.99999999999999921e133

    1. Initial program 86.8%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified88.3%

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

      [Start]86.8%

      \[ \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      associate-*l* [=>]86.8%

      \[ \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      associate-*l* [=>]88.3%

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]

    if -9.99999999999999921e133 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 2.0000000000000001e-4

    1. Initial program 87.0%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified87.1%

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

      [Start]87.0%

      \[ \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      associate-*l* [=>]87.1%

      \[ \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      associate-*l* [=>]87.1%

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\frac{1}{c} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right) + b}{z}} \]
      Step-by-step derivation

      [Start]87.1%

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c} \]

      *-un-lft-identity [=>]87.1%

      \[ \frac{\color{blue}{1 \cdot \left(\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b\right)}}{z \cdot c} \]

      *-commutative [=>]87.1%

      \[ \frac{1 \cdot \left(\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b\right)}{\color{blue}{c \cdot z}} \]

      times-frac [=>]99.6%

      \[ \color{blue}{\frac{1}{c} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z}} \]

      associate-*r* [=>]99.5%

      \[ \frac{1}{c} \cdot \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z} \]

      associate-*r* [=>]99.5%

      \[ \frac{1}{c} \cdot \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z} \]

      associate-*r* [<=]99.6%

      \[ \frac{1}{c} \cdot \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z} \]

      associate-*r* [<=]99.6%

      \[ \frac{1}{c} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z} \]

      associate-*l* [=>]99.6%

      \[ \frac{1}{c} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{z \cdot \left(4 \cdot \left(t \cdot a\right)\right)}\right) + b}{z} \]

    if 2.0000000000000001e-4 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 92.2%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 0.0%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified0.9%

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

      [Start]0.0%

      \[ \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      associate-*l* [=>]0.0%

      \[ \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      associate-*l* [=>]0.9%

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Taylor expanded in z around inf 66.8%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    4. Simplified88.7%

      \[\leadsto \color{blue}{\frac{a}{\frac{c}{t}} \cdot -4} \]
      Step-by-step derivation

      [Start]66.8%

      \[ -4 \cdot \frac{a \cdot t}{c} \]

      *-commutative [=>]66.8%

      \[ \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]

      associate-/l* [=>]88.7%

      \[ \color{blue}{\frac{a}{\frac{c}{t}}} \cdot -4 \]
  3. Recombined 4 regimes into one program.
  4. Final simplification92.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c} \leq -1 \cdot 10^{+134}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{elif}\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c} \leq 0.0002:\\ \;\;\;\;\frac{1}{c} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{z}\\ \mathbf{elif}\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c} \leq \infty:\\ \;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy87.8%
Cost5068
\[\begin{array}{l} t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ t_2 := x \cdot \left(9 \cdot y\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+134}:\\ \;\;\;\;\frac{b + \left(t_2 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{elif}\;t_1 \leq 0.0002:\\ \;\;\;\;\frac{1}{c} \cdot \frac{b + \left(t_2 - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{z}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 2
Accuracy91.4%
Cost7625
\[\begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-39} \lor \neg \left(z \leq 9 \cdot 10^{-54}\right):\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \end{array} \]
Alternative 3
Accuracy87.1%
Cost5068
\[\begin{array}{l} t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{-285}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 4
Accuracy83.8%
Cost1480
\[\begin{array}{l} \mathbf{if}\;z \leq -5.1 \cdot 10^{+128}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+196}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\ \end{array} \]
Alternative 5
Accuracy50.3%
Cost1372
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\ t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{+95}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.55 \cdot 10^{-303}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-189}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-120}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Accuracy49.9%
Cost1372
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\ t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;t \leq -1.24 \cdot 10^{+95}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-159}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-304}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-119}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Accuracy49.8%
Cost1372
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\ t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{+95}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-160}:\\ \;\;\;\;\frac{9}{z} \cdot \frac{x \cdot y}{c}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-303}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-119}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Accuracy49.8%
Cost1372
\[\begin{array}{l} t_1 := \frac{x}{z} \cdot \frac{9 \cdot y}{c}\\ t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;t \leq -1.32 \cdot 10^{+95}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{+27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.62 \cdot 10^{-161}:\\ \;\;\;\;\frac{9}{z} \cdot \frac{x \cdot y}{c}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-303}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-120}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Accuracy50.0%
Cost1372
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;t \leq -1.24 \cdot 10^{+95}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{+74}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{9 \cdot y}{c}\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-157}:\\ \;\;\;\;\frac{9}{z} \cdot \frac{x \cdot y}{c}\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-304}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-182}:\\ \;\;\;\;\frac{9 \cdot y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-119}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Accuracy50.0%
Cost1372
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;t \leq -1.24 \cdot 10^{+95}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{+74}:\\ \;\;\;\;\frac{9 \cdot y}{\frac{z \cdot c}{x}}\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-160}:\\ \;\;\;\;\frac{9}{z} \cdot \frac{x \cdot y}{c}\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-304}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-186}:\\ \;\;\;\;\frac{9 \cdot y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-122}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Accuracy75.4%
Cost1356
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ t_2 := \frac{t_1 + \frac{b}{z}}{c}\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+51}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-75}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;z \leq 10^{+129}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \end{array} \]
Alternative 12
Accuracy64.5%
Cost969
\[\begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-177} \lor \neg \left(a \leq 4.3 \cdot 10^{+210}\right):\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 13
Accuracy75.7%
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+51} \lor \neg \left(z \leq 1.25 \cdot 10^{-74}\right):\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 14
Accuracy49.8%
Cost713
\[\begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+17} \lor \neg \left(t \leq 2.7 \cdot 10^{-119}\right):\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 15
Accuracy50.6%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -1.18 \cdot 10^{+20}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-119}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 16
Accuracy50.8%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{+19}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-122}:\\ \;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 17
Accuracy50.7%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -5.9 \cdot 10^{+18}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-119}:\\ \;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 18
Accuracy35.6%
Cost320
\[\frac{b}{z \cdot c} \]
Alternative 19
Accuracy35.2%
Cost320
\[\frac{\frac{b}{c}}{z} \]

Reproduce?

herbie shell --seed 2023258 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
  :precision binary64

  :herbie-target
  (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))

  (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))