?

Average Error: 20.3 → 9.3
Time: 15.0s
Precision: binary64
Cost: 5068

?

\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ [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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ t_2 := \frac{\frac{b}{z} + a \cdot \left(-4 \cdot t\right)}{c}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-257}:\\ \;\;\;\;\left(\frac{b}{c \cdot z} + 9 \cdot \frac{y \cdot x}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 10^{+304}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \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 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
        (t_2 (/ (+ (/ b z) (* a (* -4.0 t))) c)))
   (if (<= t_1 -5e-257)
     (- (+ (/ b (* c z)) (* 9.0 (/ (* y x) (* c z)))) (* 4.0 (/ (* a t) c)))
     (if (<= t_1 0.0) t_2 (if (<= t_1 1e+304) t_1 t_2)))))
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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_2 = ((b / z) + (a * (-4.0 * t))) / c;
	double tmp;
	if (t_1 <= -5e-257) {
		tmp = ((b / (c * z)) + (9.0 * ((y * x) / (c * z)))) - (4.0 * ((a * t) / c));
	} else if (t_1 <= 0.0) {
		tmp = t_2;
	} else if (t_1 <= 1e+304) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
    t_2 = ((b / z) + (a * ((-4.0d0) * t))) / c
    if (t_1 <= (-5d-257)) then
        tmp = ((b / (c * z)) + (9.0d0 * ((y * x) / (c * z)))) - (4.0d0 * ((a * t) / c))
    else if (t_1 <= 0.0d0) then
        tmp = t_2
    else if (t_1 <= 1d+304) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_2 = ((b / z) + (a * (-4.0 * t))) / c;
	double tmp;
	if (t_1 <= -5e-257) {
		tmp = ((b / (c * z)) + (9.0 * ((y * x) / (c * z)))) - (4.0 * ((a * t) / c));
	} else if (t_1 <= 0.0) {
		tmp = t_2;
	} else if (t_1 <= 1e+304) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
	t_2 = ((b / z) + (a * (-4.0 * t))) / c
	tmp = 0
	if t_1 <= -5e-257:
		tmp = ((b / (c * z)) + (9.0 * ((y * x) / (c * z)))) - (4.0 * ((a * t) / c))
	elif t_1 <= 0.0:
		tmp = t_2
	elif t_1 <= 1e+304:
		tmp = t_1
	else:
		tmp = t_2
	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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	t_2 = Float64(Float64(Float64(b / z) + Float64(a * Float64(-4.0 * t))) / c)
	tmp = 0.0
	if (t_1 <= -5e-257)
		tmp = Float64(Float64(Float64(b / Float64(c * z)) + Float64(9.0 * Float64(Float64(y * x) / Float64(c * z)))) - Float64(4.0 * Float64(Float64(a * t) / c)));
	elseif (t_1 <= 0.0)
		tmp = t_2;
	elseif (t_1 <= 1e+304)
		tmp = t_1;
	else
		tmp = t_2;
	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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	t_2 = ((b / z) + (a * (-4.0 * t))) / c;
	tmp = 0.0;
	if (t_1 <= -5e-257)
		tmp = ((b / (c * z)) + (9.0 * ((y * x) / (c * z)))) - (4.0 * ((a * t) / c));
	elseif (t_1 <= 0.0)
		tmp = t_2;
	elseif (t_1 <= 1e+304)
		tmp = t_1;
	else
		tmp = t_2;
	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[(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]}, Block[{t$95$2 = N[(N[(N[(b / z), $MachinePrecision] + N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-257], N[(N[(N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], t$95$2, If[LessEqual[t$95$1, 1e+304], t$95$1, t$95$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}
\begin{array}{l}
t_1 := \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}\\
t_2 := \frac{\frac{b}{z} + a \cdot \left(-4 \cdot t\right)}{c}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-257}:\\
\;\;\;\;\left(\frac{b}{c \cdot z} + 9 \cdot \frac{y \cdot x}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 10^{+304}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original20.3
Target14.7
Herbie9.3
\[\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 3 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -4.99999999999999989e-257

    1. Initial program 12.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. Simplified10.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}} \]
      Proof

      [Start]12.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} \]

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]12.0

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]11.9

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]11.9

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]11.9

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]10.9

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]10.9

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

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

    if -4.99999999999999989e-257 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0 or 9.9999999999999994e303 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 52.6

      \[\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. Simplified48.6

      \[\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}} \]
      Proof

      [Start]52.6

      \[ \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} \]

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]52.6

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]52.6

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]52.6

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]52.6

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]48.6

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]48.6

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

      \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
    4. Simplified50.0

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

      [Start]53.1

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]50.0

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]50.0

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

      rational_best_oopsla_all_46_json_45_simplify-7 [<=]50.0

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]50.0

      \[ \frac{t \cdot \left(a \cdot \color{blue}{\left(z \cdot -4\right)}\right) + b}{z \cdot c} \]
    5. Taylor expanded in t around 0 27.3

      \[\leadsto \color{blue}{\frac{b}{c \cdot z} + -4 \cdot \frac{a \cdot t}{c}} \]
    6. Taylor expanded in c around 0 21.2

      \[\leadsto \color{blue}{\frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}} \]
    7. Simplified21.2

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

      [Start]21.2

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]21.2

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

    if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 9.9999999999999994e303

    1. Initial program 0.6

      \[\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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification9.3

    \[\leadsto \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} \leq -5 \cdot 10^{-257}:\\ \;\;\;\;\left(\frac{b}{c \cdot z} + 9 \cdot \frac{y \cdot x}{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} \leq 0:\\ \;\;\;\;\frac{\frac{b}{z} + a \cdot \left(-4 \cdot t\right)}{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} \leq 10^{+304}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z} + a \cdot \left(-4 \cdot t\right)}{c}\\ \end{array} \]

Alternatives

Alternative 1
Error10.7
Cost5068
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + a \cdot \left(-4 \cdot t\right)}{c}\\ t_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}\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{-257}:\\ \;\;\;\;\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}\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+304}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error28.6
Cost1760
\[\begin{array}{l} t_1 := \frac{9 \cdot \left(y \cdot x\right) + b}{z \cdot c}\\ t_2 := \frac{a \cdot t}{c} \cdot -4\\ \mathbf{if}\;t \leq -2.7 \cdot 10^{+192}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{+77}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -0.024:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-17}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-150}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error38.2
Cost1504
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ t_2 := \frac{a \cdot t}{c} \cdot -4\\ \mathbf{if}\;t \leq -2.7 \cdot 10^{+192}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+153}:\\ \;\;\;\;9 \cdot \frac{y \cdot x}{z \cdot c}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{+132}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{+98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -0.31:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{-44}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 10^{-204}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error14.6
Cost1480
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + a \cdot \left(-4 \cdot t\right)}{c}\\ \mathbf{if}\;z \leq -16000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+152}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error19.0
Cost1352
\[\begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ t_2 := \frac{b}{c \cdot z} + t_1\\ \mathbf{if}\;b \leq -6 \cdot 10^{+77}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-50}:\\ \;\;\;\;t_1 + 9 \cdot \frac{y \cdot x}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error34.4
Cost976
\[\begin{array}{l} t_1 := \frac{a \cdot t}{c} \cdot -4\\ t_2 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -1.25 \cdot 10^{+130}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 0.00135:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+108}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.8 \cdot 10^{+156}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error19.3
Cost968
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + a \cdot \left(-4 \cdot t\right)}{c}\\ \mathbf{if}\;z \leq -2.55 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+47}:\\ \;\;\;\;\frac{9 \cdot \left(y \cdot x\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error43.8
Cost584
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -2.8 \cdot 10^{+180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error43.4
Cost320
\[\frac{b}{z \cdot c} \]

Error

Reproduce?

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