Average Error: 20.7 → 6.7
Time: 34.3s
Precision: binary64
Cost: 17484
\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ \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 + 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^{-56}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 10^{-79}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \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))
     (* -4.0 (/ t (/ c a)))
     (if (<= t_1 -1e-56)
       t_1
       (if (<= t_1 1e-79)
         (/ (fma t (* a -4.0) (/ (fma x (* 9.0 y) b) z)) c)
         (if (<= t_1 4e+307) t_1 (* a (/ (* t -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 = -4.0 * (t / (c / a));
	} else if (t_1 <= -1e-56) {
		tmp = t_1;
	} else if (t_1 <= 1e-79) {
		tmp = fma(t, (a * -4.0), (fma(x, (9.0 * y), b) / z)) / c;
	} else if (t_1 <= 4e+307) {
		tmp = t_1;
	} else {
		tmp = a * ((t * -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(-4.0 * Float64(t / Float64(c / a)));
	elseif (t_1 <= -1e-56)
		tmp = t_1;
	elseif (t_1 <= 1e-79)
		tmp = Float64(fma(t, Float64(a * -4.0), Float64(fma(x, Float64(9.0 * y), b) / z)) / c);
	elseif (t_1 <= 4e+307)
		tmp = t_1;
	else
		tmp = Float64(a * Float64(Float64(t * -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[(-4.0 * N[(t / N[(c / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-56], t$95$1, If[LessEqual[t$95$1, 1e-79], N[(N[(t * N[(a * -4.0), $MachinePrecision] + N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 4e+307], t$95$1, N[(a * N[(N[(t * -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:\\
\;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-56}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;t_1\\

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


\end{array}

Error

Target

Original20.7
Target14.1
Herbie6.7
\[\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 64.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. Simplified24.7

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}} \]
      Proof
      (/.f64 (fma.f64 t (*.f64 a -4) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 a (Rewrite<= metadata-eval (neg.f64 4))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 a 4))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (Rewrite<= distribute-lft-neg-out_binary64 (*.f64 (neg.f64 a) 4)) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (Rewrite=> *-commutative_binary64 (*.f64 4 (neg.f64 a))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 x (*.f64 9 y)) b)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x 9) y)) b) z)) c): 2 points increase in error, 7 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 b (*.f64 (*.f64 x 9) y))) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 t (*.f64 4 (neg.f64 a))) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z))) c): 3 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 t 4) (neg.f64 a))) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 4 t)) (neg.f64 a)) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite=> distribute-rgt-neg-out_binary64 (neg.f64 (*.f64 (*.f64 4 t) a))) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (neg.f64 (*.f64 (*.f64 4 t) a)))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite=> unsub-neg_binary64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (*.f64 4 t) a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite=> associate-*l*_binary64 (*.f64 4 (*.f64 t a)))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (Rewrite<= metadata-eval (/.f64 4 1)) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (/.f64 4 (Rewrite<= *-inverses_binary64 (/.f64 z z))) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 4 z) z)) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 z 4)) z) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 z 4) (/.f64 z (*.f64 t a))))) c): 25 points increase in error, 1 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 z 4) (*.f64 t a)) z))) c): 21 points increase in error, 23 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (*.f64 z 4) t) a)) z)) c): 19 points increase in error, 4 points decrease in error
      (/.f64 (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) (*.f64 (*.f64 (*.f64 z 4) t) a)) z)) c): 2 points increase in error, 2 points decrease in error
      (/.f64 (/.f64 (Rewrite<= associate-+r-_binary64 (+.f64 b (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)))) z) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b)) z) c): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r*_binary64 (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))): 41 points increase in error, 55 points decrease in error
    3. Taylor expanded in t around inf 32.2

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

      \[\leadsto \color{blue}{-4 \cdot \frac{t}{\frac{c}{a}}} \]
      Proof
      (*.f64 -4 (/.f64 t (/.f64 c a))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 t a) c))): 57 points increase in error, 58 points decrease in error
      (*.f64 -4 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 a t)) c)): 0 points increase in error, 0 points decrease in error

    if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1e-56 or 1e-79 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 3.99999999999999994e307

    1. Initial program 0.7

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

    1. Initial program 18.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} \]
    2. Simplified1.2

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}} \]
      Proof
      (/.f64 (fma.f64 t (*.f64 a -4) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 a (Rewrite<= metadata-eval (neg.f64 4))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 a 4))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (Rewrite<= distribute-lft-neg-out_binary64 (*.f64 (neg.f64 a) 4)) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (Rewrite=> *-commutative_binary64 (*.f64 4 (neg.f64 a))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 x (*.f64 9 y)) b)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x 9) y)) b) z)) c): 2 points increase in error, 7 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 b (*.f64 (*.f64 x 9) y))) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 t (*.f64 4 (neg.f64 a))) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z))) c): 3 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 t 4) (neg.f64 a))) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 4 t)) (neg.f64 a)) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite=> distribute-rgt-neg-out_binary64 (neg.f64 (*.f64 (*.f64 4 t) a))) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (neg.f64 (*.f64 (*.f64 4 t) a)))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite=> unsub-neg_binary64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (*.f64 4 t) a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite=> associate-*l*_binary64 (*.f64 4 (*.f64 t a)))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (Rewrite<= metadata-eval (/.f64 4 1)) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (/.f64 4 (Rewrite<= *-inverses_binary64 (/.f64 z z))) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 4 z) z)) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 z 4)) z) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 z 4) (/.f64 z (*.f64 t a))))) c): 25 points increase in error, 1 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 z 4) (*.f64 t a)) z))) c): 21 points increase in error, 23 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (*.f64 z 4) t) a)) z)) c): 19 points increase in error, 4 points decrease in error
      (/.f64 (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) (*.f64 (*.f64 (*.f64 z 4) t) a)) z)) c): 2 points increase in error, 2 points decrease in error
      (/.f64 (/.f64 (Rewrite<= associate-+r-_binary64 (+.f64 b (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)))) z) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b)) z) c): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r*_binary64 (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))): 41 points increase in error, 55 points decrease in error

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

    1. Initial program 64.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. Applied egg-rr49.1

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

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

      \[\leadsto \color{blue}{a \cdot \frac{t \cdot -4}{c}} \]
      Proof
      (*.f64 a (/.f64 (*.f64 t -4) c)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (*.f64 t -4) c) a)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 t -4) (/.f64 c a))): 58 points increase in error, 48 points decrease in error
      (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 t (/.f64 c a)) -4)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 t a) c)) -4): 57 points increase in error, 58 points decrease in error
      (*.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 a t)) c) -4): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 -4 (/.f64 (*.f64 a t) c))): 0 points increase in error, 0 points decrease in error
  3. Recombined 4 regimes into one program.
  4. Final simplification6.7

    \[\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:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \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 -1 \cdot 10^{-56}:\\ \;\;\;\;\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 10^{-79}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{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 4 \cdot 10^{+307}:\\ \;\;\;\;\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}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]

Alternatives

Alternative 1
Error8.5
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 -5 \cdot 10^{-193}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-268}:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 2
Error6.9
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 -5 \cdot 10^{-301}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{-201}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) + z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right)}{c}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 3
Error6.7
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^{-205}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-268}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) + z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right)}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 4
Error24.7
Cost2148
\[\begin{array}{l} t_1 := b + 9 \cdot \left(x \cdot y\right)\\ t_2 := \frac{t_1}{z \cdot c}\\ t_3 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{if}\;a \leq -3.610639467199985 \cdot 10^{-183}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -8.383087733856617 \cdot 10^{-290}:\\ \;\;\;\;\frac{\frac{t_1}{z}}{c}\\ \mathbf{elif}\;a \leq 1.0835991795547297 \cdot 10^{-245}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 0.026634117496437074:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.895417072190404 \cdot 10^{+42}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 6.4413807916816 \cdot 10^{+66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 10^{+195}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 10^{+245}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{elif}\;a \leq 10^{+269}:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 5
Error24.6
Cost1628
\[\begin{array}{l} t_1 := b + 9 \cdot \left(x \cdot y\right)\\ t_2 := \frac{t_1}{z \cdot c}\\ t_3 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{if}\;a \leq -3.610639467199985 \cdot 10^{-183}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -8.383087733856617 \cdot 10^{-290}:\\ \;\;\;\;\frac{\frac{t_1}{z}}{c}\\ \mathbf{elif}\;a \leq 1.0835991795547297 \cdot 10^{-245}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 0.026634117496437074:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.895417072190404 \cdot 10^{+42}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 6.4413807916816 \cdot 10^{+66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 10^{+195}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 6
Error26.9
Cost1364
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ t_2 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ t_3 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;a \leq -1.603090587703254 \cdot 10^{-133}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 0.026634117496437074:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.895417072190404 \cdot 10^{+42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.4413807916816 \cdot 10^{+66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 10^{+195}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error35.7
Cost1240
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ t_2 := -4 \cdot \frac{t}{\frac{c}{a}}\\ t_3 := 9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{if}\;a \leq -1.603090587703254 \cdot 10^{-133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.3956307309529616 \cdot 10^{-253}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 3.0524117067429713 \cdot 10^{-189}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.0257000747116964 \cdot 10^{-140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.0199837282608828 \cdot 10^{-100}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.575429946987249 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error35.7
Cost1240
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ t_2 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;a \leq -1.603090587703254 \cdot 10^{-133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.3956307309529616 \cdot 10^{-253}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 3.0524117067429713 \cdot 10^{-189}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;a \leq 1.0257000747116964 \cdot 10^{-140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.005345633154789 \cdot 10^{-98}:\\ \;\;\;\;\frac{x \cdot \left(9 \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;a \leq 1.575429946987249 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error35.7
Cost1240
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ t_2 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;a \leq -1.603090587703254 \cdot 10^{-133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.3956307309529616 \cdot 10^{-253}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 3.0524117067429713 \cdot 10^{-189}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;a \leq 1.0257000747116964 \cdot 10^{-140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.005345633154789 \cdot 10^{-98}:\\ \;\;\;\;\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c}\\ \mathbf{elif}\;a \leq 1.575429946987249 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error27.8
Cost1232
\[\begin{array}{l} t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ t_2 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;a \leq -1.603090587703254 \cdot 10^{-133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.575429946987249 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+150}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+168}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error34.1
Cost976
\[\begin{array}{l} t_1 := a \cdot \frac{t \cdot -4}{c}\\ t_2 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -6.660339303857882 \cdot 10^{+31}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.5002801132186935 \cdot 10^{-246}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.0119934855358523 \cdot 10^{+34}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;b \leq 8.256245939304956 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error34.3
Cost976
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -6.660339303857882 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.8734162845912721 \cdot 10^{-296}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{elif}\;b \leq 1.4226758528884656 \cdot 10^{-22}:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{elif}\;b \leq 8.256245939304956 \cdot 10^{+39}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error34.3
Cost976
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -6.660339303857882 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.8734162845912721 \cdot 10^{-296}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{elif}\;b \leq 1.4226758528884656 \cdot 10^{-22}:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{elif}\;b \leq 8.256245939304956 \cdot 10^{+39}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error34.3
Cost976
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -6.660339303857882 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.8734162845912721 \cdot 10^{-296}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{elif}\;b \leq 1.4226758528884656 \cdot 10^{-22}:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{elif}\;b \leq 8.256245939304956 \cdot 10^{+39}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error34.3
Cost976
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -6.660339303857882 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.8734162845912721 \cdot 10^{-296}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{elif}\;b \leq 1.4226758528884656 \cdot 10^{-22}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;b \leq 8.256245939304956 \cdot 10^{+39}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error35.5
Cost712
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;a \leq -1.603090587703254 \cdot 10^{-133}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.575429946987249 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error42.2
Cost584
\[\begin{array}{l} t_1 := \frac{\frac{b}{z}}{c}\\ \mathbf{if}\;z \leq -1 \cdot 10^{-44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.2709721482752868 \cdot 10^{+32}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error42.6
Cost584
\[\begin{array}{l} \mathbf{if}\;c \leq -100000:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{+56}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 19
Error44.5
Cost320
\[\frac{\frac{b}{z}}{c} \]

Error

Reproduce

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