?

Average Error: 32.17% → 10.02%
Time: 33.1s
Precision: binary64
Cost: 11212

?

\[\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 + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} - 4 \cdot \frac{t \cdot a}{c}\right)\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 700000000:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \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) (* a (* t (* z -4.0)))) b) (* z c))))
   (if (<= t_1 (- INFINITY))
     (+ (/ (/ b c) z) (- (* (/ x z) (/ (* 9.0 y) c)) (* 4.0 (/ (* t a) c))))
     (if (<= t_1 -2e-126)
       t_1
       (if (<= t_1 700000000.0)
         (/ (+ (* a (* t -4.0)) (/ (fma x (* 9.0 y) b) z)) c)
         (if (<= t_1 2e+306) t_1 (* t (/ (* a -4.0) c))))))))
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) + (a * (t * (z * -4.0)))) + b) / (z * c);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = ((b / c) / z) + (((x / z) * ((9.0 * y) / c)) - (4.0 * ((t * a) / c)));
	} else if (t_1 <= -2e-126) {
		tmp = t_1;
	} else if (t_1 <= 700000000.0) {
		tmp = ((a * (t * -4.0)) + (fma(x, (9.0 * y), b) / z)) / c;
	} else if (t_1 <= 2e+306) {
		tmp = t_1;
	} else {
		tmp = t * ((a * -4.0) / c);
	}
	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(a * Float64(t * Float64(z * -4.0)))) + b) / Float64(z * c))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(b / c) / z) + Float64(Float64(Float64(x / z) * Float64(Float64(9.0 * y) / c)) - Float64(4.0 * Float64(Float64(t * a) / c))));
	elseif (t_1 <= -2e-126)
		tmp = t_1;
	elseif (t_1 <= 700000000.0)
		tmp = Float64(Float64(Float64(a * Float64(t * -4.0)) + Float64(fma(x, Float64(9.0 * y), b) / z)) / c);
	elseif (t_1 <= 2e+306)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(Float64(a * -4.0) / c));
	end
	return 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[(a * N[(t * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision] + N[(N[(N[(x / z), $MachinePrecision] * N[(N[(9.0 * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-126], t$95$1, If[LessEqual[t$95$1, 700000000.0], N[(N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 2e+306], t$95$1, N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $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{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} - 4 \cdot \frac{t \cdot a}{c}\right)\\

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-126}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq 700000000:\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}}{c}\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_1\\

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


\end{array}

Error?

Target

Original32.17%
Target22.92%
Herbie10.02%
\[\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)) < -inf.0

    1. Initial program 100

      \[\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. Taylor expanded in x around 0 46.79

      \[\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}} \]
    3. Simplified28.61

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

      [Start]46.79

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

      associate--l+ [=>]46.79

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

      associate-/r* [=>]53.66

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

      *-commutative [<=]53.66

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

      associate-*r/ [=>]53.98

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

      associate-*r* [=>]53.98

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

      *-commutative [<=]53.98

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

      times-frac [=>]28.61

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

    if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1.9999999999999999e-126 or 7e8 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 2.00000000000000003e306

    1. Initial program 1.03

      \[\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 -1.9999999999999999e-126 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 7e8

    1. Initial program 25.89

      \[\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. Simplified1.48

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

      [Start]25.89

      \[ \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-/r* [=>]2.01

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

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

    1. Initial program 98.96

      \[\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.83

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

      [Start]98.96

      \[ \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- [=>]98.96

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

      associate-*l* [=>]98.82

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

      fma-neg [=>]98.82

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

      neg-sub0 [=>]98.82

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

      associate-+l- [<=]98.82

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

      neg-sub0 [<=]98.82

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

      distribute-lft-neg-in [=>]98.82

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

      *-commutative [=>]98.82

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

      distribute-lft-neg-in [=>]98.82

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

      associate-*r* [=>]87.98

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

      *-commutative [=>]87.98

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

      fma-def [=>]87.97

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

      distribute-rgt-neg-in [<=]87.97

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

      associate-*r* [=>]87.83

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

      distribute-rgt-neg-in [=>]87.83

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

      *-commutative [=>]87.83

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

      metadata-eval [=>]87.83

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    4. Simplified39.07

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

      [Start]46.45

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

      associate-/l* [=>]37.65

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

      associate-*r/ [=>]37.65

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

      *-commutative [<=]37.65

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

      associate-/r/ [=>]39.07

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

      *-commutative [=>]39.07

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c} \leq -\infty:\\ \;\;\;\;\frac{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} - 4 \cdot \frac{t \cdot a}{c}\right)\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c} \leq -2 \cdot 10^{-126}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c} \leq 700000000:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c} \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \end{array} \]

Alternatives

Alternative 1
Error13.05%
Cost6352
\[\begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 10^{-182}:\\ \;\;\;\;\frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \end{array} \]
Alternative 2
Error11.2%
Cost6352
\[\begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-258}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \end{array} \]
Alternative 3
Error10.1%
Cost6352
\[\begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ t_2 := \frac{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} - 4 \cdot \frac{t \cdot a}{c}\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \end{array} \]
Alternative 4
Error31.84%
Cost1884
\[\begin{array}{l} t_1 := \frac{a \cdot \left(t \cdot -4\right) + \frac{x \cdot y}{\frac{z}{9}}}{c}\\ t_2 := \frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{if}\;z \leq -7 \cdot 10^{+126}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+93}:\\ \;\;\;\;\frac{x \cdot \left(9 \cdot y\right)}{z \cdot c} + -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-61}:\\ \;\;\;\;\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+106}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error31.44%
Cost1620
\[\begin{array}{l} t_1 := \frac{a \cdot \left(t \cdot -4\right) + \frac{x \cdot y}{\frac{z}{9}}}{c}\\ t_2 := \frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{if}\;z \leq -8.2 \cdot 10^{-42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-64}:\\ \;\;\;\;\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.06 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{+103}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error22.16%
Cost1481
\[\begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+124} \lor \neg \left(z \leq 5.5 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{z \cdot c}\\ \end{array} \]
Alternative 7
Error54.3%
Cost1372
\[\begin{array}{l} t_1 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;b \leq -2900:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{-226}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.76 \cdot 10^{-200}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-189}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.85 \cdot 10^{-116}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{9 \cdot y}{c}\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{+34}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\ \end{array} \]
Alternative 8
Error54.34%
Cost1372
\[\begin{array}{l} t_1 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;b \leq -2700:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{-199}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z \cdot c}{9}}\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-118}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{9 \cdot y}{c}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+34}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\ \end{array} \]
Alternative 9
Error56.59%
Cost1240
\[\begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{-179}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-296}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-236}:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-28}:\\ \;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+116}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+162}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 10
Error40.43%
Cost1232
\[\begin{array}{l} t_1 := \frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\ t_2 := t \cdot \frac{a \cdot -4}{c}\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+160}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+188}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error30.35%
Cost1225
\[\begin{array}{l} \mathbf{if}\;z \leq -1.42 \cdot 10^{-43} \lor \neg \left(z \leq 67000000000000\right):\\ \;\;\;\;\frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\\ \end{array} \]
Alternative 12
Error56.07%
Cost977
\[\begin{array}{l} t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{-173}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-28}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+115} \lor \neg \left(a \leq 2.1 \cdot 10^{+162}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 13
Error56.07%
Cost976
\[\begin{array}{l} t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{if}\;a \leq -3.2 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-27}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+162}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 14
Error56.05%
Cost976
\[\begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{-174}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-27}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+116}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+162}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 15
Error56.03%
Cost976
\[\begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{-174}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-28}:\\ \;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{+116}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+162}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 16
Error30.37%
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-43} \lor \neg \left(z \leq 16600000000000\right):\\ \;\;\;\;\frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 17
Error67.69%
Cost452
\[\begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+40}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 18
Error68.85%
Cost320
\[\frac{b}{z \cdot c} \]

Error

Reproduce?

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