Average Error: 23.3 → 6.6
Time: 52.8s
Precision: binary64
Cost: 14160
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
\[\begin{array}{l} t_1 := \frac{t - a}{b - y} + \frac{\frac{y}{b - y} \cdot \left(x + \frac{a - t}{b - y}\right)}{z}\\ \mathbf{if}\;z \leq -976.6735523584086:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.8512342854438072 \cdot 10^{-211}:\\ \;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 4.027243753612064 \cdot 10^{-108}:\\ \;\;\;\;x + {\left(\frac{\frac{y}{z}}{t - a}\right)}^{-1}\\ \mathbf{elif}\;z \leq 461548.5870654282:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, t - a, y \cdot x\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+
          (/ (- t a) (- b y))
          (/ (* (/ y (- b y)) (+ x (/ (- a t) (- b y)))) z))))
   (if (<= z -976.6735523584086)
     t_1
     (if (<= z -1.8512342854438072e-211)
       (/ (+ (* y x) (* z (- t a))) (+ y (* z (- b y))))
       (if (<= z 4.027243753612064e-108)
         (+ x (pow (/ (/ y z) (- t a)) -1.0))
         (if (<= z 461548.5870654282)
           (/ (fma z (- t a) (* y x)) (fma z (- b y) y))
           t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((t - a) / (b - y)) + (((y / (b - y)) * (x + ((a - t) / (b - y)))) / z);
	double tmp;
	if (z <= -976.6735523584086) {
		tmp = t_1;
	} else if (z <= -1.8512342854438072e-211) {
		tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)));
	} else if (z <= 4.027243753612064e-108) {
		tmp = x + pow(((y / z) / (t - a)), -1.0);
	} else if (z <= 461548.5870654282) {
		tmp = fma(z, (t - a), (y * x)) / fma(z, (b - y), y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
end
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(Float64(y / Float64(b - y)) * Float64(x + Float64(Float64(a - t) / Float64(b - y)))) / z))
	tmp = 0.0
	if (z <= -976.6735523584086)
		tmp = t_1;
	elseif (z <= -1.8512342854438072e-211)
		tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))));
	elseif (z <= 4.027243753612064e-108)
		tmp = Float64(x + (Float64(Float64(y / z) / Float64(t - a)) ^ -1.0));
	elseif (z <= 461548.5870654282)
		tmp = Float64(fma(z, Float64(t - a), Float64(y * x)) / fma(z, Float64(b - y), y));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x + N[(N[(a - t), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -976.6735523584086], t$95$1, If[LessEqual[z, -1.8512342854438072e-211], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.027243753612064e-108], N[(x + N[Power[N[(N[(y / z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 461548.5870654282], N[(N[(z * N[(t - a), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\begin{array}{l}
t_1 := \frac{t - a}{b - y} + \frac{\frac{y}{b - y} \cdot \left(x + \frac{a - t}{b - y}\right)}{z}\\
\mathbf{if}\;z \leq -976.6735523584086:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.8512342854438072 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\

\mathbf{elif}\;z \leq 4.027243753612064 \cdot 10^{-108}:\\
\;\;\;\;x + {\left(\frac{\frac{y}{z}}{t - a}\right)}^{-1}\\

\mathbf{elif}\;z \leq 461548.5870654282:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t - a, y \cdot x\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error

Target

Original23.3
Target18.3
Herbie6.6
\[\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}} \]

Derivation

  1. Split input into 4 regimes
  2. if z < -976.67355235840864 or 461548.587065428204 < z

    1. Initial program 38.5

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified38.5

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(z, t - a, x \cdot y\right)}{\mathsf{fma}\left(z, b - y, y\right)}} \]
      Proof
      (/.f64 (fma.f64 z (-.f64 t a) (*.f64 x y)) (fma.f64 z (-.f64 b y) y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (-.f64 t a)) (*.f64 x y))) (fma.f64 z (-.f64 b y) y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a)))) (fma.f64 z (-.f64 b y) y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (-.f64 b y)) y))): 2 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (Rewrite<= +-commutative_binary64 (+.f64 y (*.f64 z (-.f64 b y))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in z around inf 22.2

      \[\leadsto \color{blue}{\left(\frac{y \cdot x}{z \cdot \left(b - y\right)} + \frac{t}{b - y}\right) - \left(\frac{\left(t - a\right) \cdot y}{z \cdot {\left(b - y\right)}^{2}} + \frac{a}{b - y}\right)} \]
    4. Simplified0.5

      \[\leadsto \color{blue}{\frac{\frac{y}{b - y} \cdot \left(x - \frac{t - a}{b - y}\right)}{z} + \frac{t - a}{b - y}} \]
      Proof
      (+.f64 (/.f64 (*.f64 (/.f64 y (-.f64 b y)) (-.f64 x (/.f64 (-.f64 t a) (-.f64 b y)))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 (/.f64 y (-.f64 b y)) x) (*.f64 (/.f64 y (-.f64 b y)) (/.f64 (-.f64 t a) (-.f64 b y))))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 1 points decrease in error
      (+.f64 (/.f64 (-.f64 (Rewrite<= associate-/r/_binary64 (/.f64 y (/.f64 (-.f64 b y) x))) (*.f64 (/.f64 y (-.f64 b y)) (/.f64 (-.f64 t a) (-.f64 b y)))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 13 points increase in error, 13 points decrease in error
      (+.f64 (/.f64 (-.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y x) (-.f64 b y))) (*.f64 (/.f64 y (-.f64 b y)) (/.f64 (-.f64 t a) (-.f64 b y)))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 33 points increase in error, 10 points decrease in error
      (+.f64 (/.f64 (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 y (-.f64 t a)) (*.f64 (-.f64 b y) (-.f64 b y))))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 35 points increase in error, 2 points decrease in error
      (+.f64 (/.f64 (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 t a) y)) (*.f64 (-.f64 b y) (-.f64 b y)))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (*.f64 (-.f64 t a) y) (Rewrite<= unpow2_binary64 (pow.f64 (-.f64 b y) 2)))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (Rewrite<= *-lft-identity_binary64 (*.f64 1 (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2))))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 (Rewrite<= metadata-eval (*.f64 -1 -1)) (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 -1 (*.f64 -1 (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 -1 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 -1 (/.f64 (*.f64 y x) (-.f64 b y))) (*.f64 -1 (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))))) z) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 (-.f64 (*.f64 -1 (/.f64 (*.f64 y x) (-.f64 b y))) (*.f64 -1 (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))) z))) (/.f64 (-.f64 t a) (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 -1 (/.f64 (-.f64 (*.f64 -1 (/.f64 (*.f64 y x) (-.f64 b y))) (*.f64 -1 (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))) z)) (Rewrite=> div-sub_binary64 (-.f64 (/.f64 t (-.f64 b y)) (/.f64 a (-.f64 b y))))): 1 points increase in error, 1 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 (*.f64 -1 (/.f64 (*.f64 y x) (-.f64 b y))) (*.f64 -1 (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))) z)) (/.f64 t (-.f64 b y))) (/.f64 a (-.f64 b y)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 t (-.f64 b y)) (*.f64 -1 (/.f64 (-.f64 (*.f64 -1 (/.f64 (*.f64 y x) (-.f64 b y))) (*.f64 -1 (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))) z)))) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 -1 (-.f64 (*.f64 -1 (/.f64 (*.f64 y x) (-.f64 b y))) (*.f64 -1 (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2))))) z))) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (/.f64 (*.f64 -1 (Rewrite=> distribute-lft-out--_binary64 (*.f64 -1 (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))))) z)) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (/.f64 (Rewrite=> associate-*r*_binary64 (*.f64 (*.f64 -1 -1) (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2))))) z)) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (/.f64 (*.f64 (Rewrite=> metadata-eval 1) (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))) z)) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (/.f64 (Rewrite=> *-lft-identity_binary64 (-.f64 (/.f64 (*.f64 y x) (-.f64 b y)) (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)))) z)) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (/.f64 (*.f64 y x) (-.f64 b y)) z) (/.f64 (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)) z)))) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (-.f64 (Rewrite<= associate-/r*_binary64 (/.f64 (*.f64 y x) (*.f64 (-.f64 b y) z))) (/.f64 (/.f64 (*.f64 (-.f64 t a) y) (pow.f64 (-.f64 b y) 2)) z))) (/.f64 a (-.f64 b y))): 13 points increase in error, 9 points decrease in error
      (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (-.f64 (/.f64 (*.f64 y x) (*.f64 (-.f64 b y) z)) (Rewrite<= associate-/r*_binary64 (/.f64 (*.f64 (-.f64 t a) y) (*.f64 (pow.f64 (-.f64 b y) 2) z))))) (/.f64 a (-.f64 b y))): 3 points increase in error, 5 points decrease in error
      (-.f64 (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (/.f64 (*.f64 y x) (*.f64 (-.f64 b y) z))) (/.f64 (*.f64 (-.f64 t a) y) (*.f64 (pow.f64 (-.f64 b y) 2) z)))) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (-.f64 (+.f64 (/.f64 t (-.f64 b y)) (/.f64 (*.f64 y x) (Rewrite<= *-commutative_binary64 (*.f64 z (-.f64 b y))))) (/.f64 (*.f64 (-.f64 t a) y) (*.f64 (pow.f64 (-.f64 b y) 2) z))) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 y x) (*.f64 z (-.f64 b y))) (/.f64 t (-.f64 b y)))) (/.f64 (*.f64 (-.f64 t a) y) (*.f64 (pow.f64 (-.f64 b y) 2) z))) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (-.f64 (+.f64 (/.f64 (*.f64 y x) (*.f64 z (-.f64 b y))) (/.f64 t (-.f64 b y))) (/.f64 (*.f64 (-.f64 t a) y) (Rewrite<= *-commutative_binary64 (*.f64 z (pow.f64 (-.f64 b y) 2))))) (/.f64 a (-.f64 b y))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--r+_binary64 (-.f64 (+.f64 (/.f64 (*.f64 y x) (*.f64 z (-.f64 b y))) (/.f64 t (-.f64 b y))) (+.f64 (/.f64 (*.f64 (-.f64 t a) y) (*.f64 z (pow.f64 (-.f64 b y) 2))) (/.f64 a (-.f64 b y))))): 0 points increase in error, 0 points decrease in error

    if -976.67355235840864 < z < -1.85123428544380723e-211

    1. Initial program 8.9

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

    if -1.85123428544380723e-211 < z < 4.0272437536120637e-108

    1. Initial program 9.8

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around 0 22.5

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

      \[\leadsto \color{blue}{\frac{\left(t - a\right) \cdot z}{y} + x} \]
    4. Applied egg-rr15.3

      \[\leadsto \color{blue}{{\left(\frac{\frac{y}{z}}{t - a}\right)}^{-1}} + x \]

    if 4.0272437536120637e-108 < z < 461548.587065428204

    1. Initial program 9.6

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified9.6

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(z, t - a, x \cdot y\right)}{\mathsf{fma}\left(z, b - y, y\right)}} \]
      Proof
      (/.f64 (fma.f64 z (-.f64 t a) (*.f64 x y)) (fma.f64 z (-.f64 b y) y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (-.f64 t a)) (*.f64 x y))) (fma.f64 z (-.f64 b y) y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a)))) (fma.f64 z (-.f64 b y) y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (-.f64 b y)) y))): 2 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (Rewrite<= +-commutative_binary64 (+.f64 y (*.f64 z (-.f64 b y))))): 0 points increase in error, 0 points decrease in error
  3. Recombined 4 regimes into one program.
  4. Final simplification6.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -976.6735523584086:\\ \;\;\;\;\frac{t - a}{b - y} + \frac{\frac{y}{b - y} \cdot \left(x + \frac{a - t}{b - y}\right)}{z}\\ \mathbf{elif}\;z \leq -1.8512342854438072 \cdot 10^{-211}:\\ \;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 4.027243753612064 \cdot 10^{-108}:\\ \;\;\;\;x + {\left(\frac{\frac{y}{z}}{t - a}\right)}^{-1}\\ \mathbf{elif}\;z \leq 461548.5870654282:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, t - a, y \cdot x\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} + \frac{\frac{y}{b - y} \cdot \left(x + \frac{a - t}{b - y}\right)}{z}\\ \end{array} \]

Alternatives

Alternative 1
Error6.6
Cost7436
\[\begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y} + \frac{\frac{y}{b - y} \cdot \left(x + \frac{a - t}{b - y}\right)}{z}\\ t_3 := z \cdot \left(t - a\right)\\ \mathbf{if}\;z \leq -976.6735523584086:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.8512342854438072 \cdot 10^{-211}:\\ \;\;\;\;\frac{y \cdot x + t_3}{t_1}\\ \mathbf{elif}\;z \leq 4.027243753612064 \cdot 10^{-108}:\\ \;\;\;\;x + {\left(\frac{\frac{y}{z}}{t - a}\right)}^{-1}\\ \mathbf{elif}\;z \leq 461548.5870654282:\\ \;\;\;\;\frac{y \cdot x}{t_1} + \frac{t_3}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error7.1
Cost6224
\[\begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := y + z \cdot \left(b - y\right)\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{y \cdot x + t_3}{t_2}\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t_4 \leq -1 \cdot 10^{-295}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{-293}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_4 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;\frac{y \cdot x}{t_2} + \frac{t_3}{t_2}\\ \mathbf{else}:\\ \;\;\;\;t_1 - \frac{x}{z}\\ \end{array} \]
Alternative 3
Error7.1
Cost5712
\[\begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := \frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-295}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{-293}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1 - \frac{x}{z}\\ \end{array} \]
Alternative 4
Error5.9
Cost2128
\[\begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y} + \frac{\frac{y}{b - y} \cdot \left(x + \frac{a - t}{b - y}\right)}{z}\\ t_3 := z \cdot \left(t - a\right)\\ \mathbf{if}\;z \leq -976.6735523584086:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.6536324359925133 \cdot 10^{-194}:\\ \;\;\;\;\frac{y \cdot x + t_3}{t_1}\\ \mathbf{elif}\;z \leq 4.027243753612064 \cdot 10^{-108}:\\ \;\;\;\;x + \frac{t_3}{y}\\ \mathbf{elif}\;z \leq 461548.5870654282:\\ \;\;\;\;\frac{y \cdot x}{t_1} + \frac{t_3}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error16.4
Cost1752
\[\begin{array}{l} t_1 := z \cdot \left(t - a\right)\\ t_2 := y + z \cdot \left(b - y\right)\\ t_3 := \frac{y \cdot x + z \cdot t}{t_2}\\ \mathbf{if}\;z \leq -57952543119.719475:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \mathbf{elif}\;z \leq -3.5223570185307183 \cdot 10^{-65}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.191146606952944 \cdot 10^{-53}:\\ \;\;\;\;x + \frac{t_1}{y}\\ \mathbf{elif}\;z \leq 1.0192212053287416 \cdot 10^{-34}:\\ \;\;\;\;\frac{t_1}{t_2}\\ \mathbf{elif}\;z \leq 3.174226600552146 \cdot 10^{-31}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.722742309793476 \cdot 10^{+40}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
Alternative 6
Error15.8
Cost1364
\[\begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := t_1 - \frac{x}{z}\\ t_3 := z \cdot \left(t - a\right)\\ \mathbf{if}\;z \leq -2.4168679003386746 \cdot 10^{-19}:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \mathbf{elif}\;z \leq 2.191146606952944 \cdot 10^{-53}:\\ \;\;\;\;x + \frac{t_3}{y}\\ \mathbf{elif}\;z \leq 0.4315690313451413:\\ \;\;\;\;\frac{t_3}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.538512487457303 \cdot 10^{+156}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.0948566834423634 \cdot 10^{+223}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error30.2
Cost844
\[\begin{array}{l} t_1 := \frac{t - a}{b}\\ \mathbf{if}\;z \leq -5.224279260498505 \cdot 10^{+177}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq -2.4168679003386746 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.89857842901387 \cdot 10^{-52}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error16.9
Cost840
\[\begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -2.4168679003386746 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.89857842901387 \cdot 10^{-52}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error16.9
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -2.4168679003386746 \cdot 10^{-19}:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \mathbf{elif}\;z \leq 2.89857842901387 \cdot 10^{-52}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
Alternative 10
Error20.0
Cost712
\[\begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -2.4168679003386746 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.89857842901387 \cdot 10^{-52}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error42.2
Cost588
\[\begin{array}{l} \mathbf{if}\;y \leq -1.6045100661763158 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 5.3744050164577695 \cdot 10^{-136}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 131027985589192.89:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 12
Error34.7
Cost584
\[\begin{array}{l} t_1 := \frac{t}{b - y}\\ \mathbf{if}\;z \leq -976.6735523584086:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.191146606952944 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error34.6
Cost584
\[\begin{array}{l} t_1 := \frac{t}{b - y}\\ \mathbf{if}\;z \leq -976.6735523584086:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.277319626165718 \cdot 10^{+113}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error29.5
Cost584
\[\begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -1.6045100661763158 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 131027985589192.89:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error39.7
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -976.6735523584086:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 2.191146606952944 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
Alternative 16
Error46.7
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2022294 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"
  :precision binary64

  :herbie-target
  (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))

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