?

Average Error: 35.66% → 8.33%
Time: 37.9s
Precision: binary64
Cost: 13896

?

\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
\[\begin{array}{l} t_1 := \frac{y}{y - b}\\ t_2 := \frac{a - t}{y - b}\\ t_3 := z \cdot \left(t - a\right)\\ \mathbf{if}\;z \leq -1750000:\\ \;\;\;\;t_2 - t_1 \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-259}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, x, t_3\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-262}:\\ \;\;\;\;\frac{z \cdot \frac{a - t}{z + -1} - \frac{b}{{\left(z + -1\right)}^{2}} \cdot \left(z \cdot x\right)}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;z \leq 4.45 \cdot 10^{+15}:\\ \;\;\;\;\frac{t_3 + y \cdot x}{y - z \cdot \left(y - b\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2 - \frac{t_1}{\frac{z}{x}}\\ \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 (/ y (- y b))) (t_2 (/ (- a t) (- y b))) (t_3 (* z (- t a))))
   (if (<= z -1750000.0)
     (- t_2 (* t_1 (/ x z)))
     (if (<= z -8.8e-259)
       (/ (fma y x t_3) (fma z (- b y) y))
       (if (<= z 2.6e-262)
         (-
          (/
           (-
            (* z (/ (- a t) (+ z -1.0)))
            (* (/ b (pow (+ z -1.0) 2.0)) (* z x)))
           y)
          (/ x (+ z -1.0)))
         (if (<= z 4.45e+15)
           (/ (+ t_3 (* y x)) (- y (* z (- y b))))
           (- t_2 (/ t_1 (/ z x)))))))))
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 = y / (y - b);
	double t_2 = (a - t) / (y - b);
	double t_3 = z * (t - a);
	double tmp;
	if (z <= -1750000.0) {
		tmp = t_2 - (t_1 * (x / z));
	} else if (z <= -8.8e-259) {
		tmp = fma(y, x, t_3) / fma(z, (b - y), y);
	} else if (z <= 2.6e-262) {
		tmp = (((z * ((a - t) / (z + -1.0))) - ((b / pow((z + -1.0), 2.0)) * (z * x))) / y) - (x / (z + -1.0));
	} else if (z <= 4.45e+15) {
		tmp = (t_3 + (y * x)) / (y - (z * (y - b)));
	} else {
		tmp = t_2 - (t_1 / (z / x));
	}
	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(y / Float64(y - b))
	t_2 = Float64(Float64(a - t) / Float64(y - b))
	t_3 = Float64(z * Float64(t - a))
	tmp = 0.0
	if (z <= -1750000.0)
		tmp = Float64(t_2 - Float64(t_1 * Float64(x / z)));
	elseif (z <= -8.8e-259)
		tmp = Float64(fma(y, x, t_3) / fma(z, Float64(b - y), y));
	elseif (z <= 2.6e-262)
		tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(a - t) / Float64(z + -1.0))) - Float64(Float64(b / (Float64(z + -1.0) ^ 2.0)) * Float64(z * x))) / y) - Float64(x / Float64(z + -1.0)));
	elseif (z <= 4.45e+15)
		tmp = Float64(Float64(t_3 + Float64(y * x)) / Float64(y - Float64(z * Float64(y - b))));
	else
		tmp = Float64(t_2 - Float64(t_1 / Float64(z / x)));
	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[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1750000.0], N[(t$95$2 - N[(t$95$1 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.8e-259], N[(N[(y * x + t$95$3), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-262], N[(N[(N[(N[(z * N[(N[(a - t), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b / N[Power[N[(z + -1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.45e+15], N[(N[(t$95$3 + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - N[(t$95$1 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\begin{array}{l}
t_1 := \frac{y}{y - b}\\
t_2 := \frac{a - t}{y - b}\\
t_3 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -1750000:\\
\;\;\;\;t_2 - t_1 \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{-259}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, x, t_3\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\

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

\mathbf{elif}\;z \leq 4.45 \cdot 10^{+15}:\\
\;\;\;\;\frac{t_3 + y \cdot x}{y - z \cdot \left(y - b\right)}\\

\mathbf{else}:\\
\;\;\;\;t_2 - \frac{t_1}{\frac{z}{x}}\\


\end{array}

Error?

Target

Original35.66%
Target27.73%
Herbie8.33%
\[\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 5 regimes
  2. if z < -1.75e6

    1. Initial program 59.5

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

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

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

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

      [Start]30.08

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

      mul-1-neg [=>]30.08

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

      unsub-neg [=>]30.08

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

      mul-1-neg [=>]30.08

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

      distribute-neg-frac [=>]30.08

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

      mul-1-neg [=>]30.08

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

      unsub-neg [=>]30.08

      \[ \frac{-\left(t - a\right)}{\color{blue}{y - b}} - \frac{\frac{y \cdot x}{y + -1 \cdot b} - -1 \cdot \frac{\left(t - a\right) \cdot y}{{\left(y + -1 \cdot b\right)}^{2}}}{z} \]
    5. Taylor expanded in x around inf 15.81

      \[\leadsto \frac{-\left(t - a\right)}{y - b} - \color{blue}{\frac{y \cdot x}{\left(y - b\right) \cdot z}} \]
    6. Simplified0.89

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

      [Start]15.81

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

      times-frac [=>]0.89

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

    if -1.75e6 < z < -8.80000000000000038e-259

    1. Initial program 14.86

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

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

      [Start]14.86

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

      *-commutative [=>]14.86

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

      fma-def [=>]14.85

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

      +-commutative [=>]14.85

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

      fma-def [=>]14.85

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

    if -8.80000000000000038e-259 < z < 2.5999999999999999e-262

    1. Initial program 11.74

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

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

      [Start]11.74

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

      *-commutative [=>]11.74

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

      fma-def [=>]11.74

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

      +-commutative [=>]11.74

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

      fma-def [=>]11.74

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

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

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

      [Start]23.46

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

      mul-1-neg [=>]23.46

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

      unsub-neg [=>]23.46

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

      mul-1-neg [=>]23.46

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

      distribute-neg-frac [=>]23.46

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

      sub-neg [=>]23.46

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

      metadata-eval [=>]23.46

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

    if 2.5999999999999999e-262 < z < 4.45e15

    1. Initial program 14.06

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

    if 4.45e15 < z

    1. Initial program 61.2

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

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

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

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

      [Start]30.96

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

      mul-1-neg [=>]30.96

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

      unsub-neg [=>]30.96

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

      mul-1-neg [=>]30.96

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

      distribute-neg-frac [=>]30.96

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

      mul-1-neg [=>]30.96

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

      unsub-neg [=>]30.96

      \[ \frac{-\left(t - a\right)}{\color{blue}{y - b}} - \frac{\frac{y \cdot x}{y + -1 \cdot b} - -1 \cdot \frac{\left(t - a\right) \cdot y}{{\left(y + -1 \cdot b\right)}^{2}}}{z} \]
    5. Taylor expanded in x around inf 17.53

      \[\leadsto \frac{-\left(t - a\right)}{y - b} - \color{blue}{\frac{y \cdot x}{\left(y - b\right) \cdot z}} \]
    6. Simplified0.61

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

      [Start]17.53

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

      times-frac [=>]0.61

      \[ \frac{-\left(t - a\right)}{y - b} - \color{blue}{\frac{y}{y - b} \cdot \frac{x}{z}} \]
    7. Applied egg-rr0.75

      \[\leadsto \frac{-\left(t - a\right)}{y - b} - \color{blue}{\frac{\frac{y}{y - b}}{\frac{z}{x}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification8.33

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1750000:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{y}{y - b} \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-259}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, x, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-262}:\\ \;\;\;\;\frac{z \cdot \frac{a - t}{z + -1} - \frac{b}{{\left(z + -1\right)}^{2}} \cdot \left(z \cdot x\right)}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;z \leq 4.45 \cdot 10^{+15}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{\frac{y}{y - b}}{\frac{z}{x}}\\ \end{array} \]

Alternatives

Alternative 1
Error8.24%
Cost8588
\[\begin{array}{l} t_1 := \frac{y}{y - b}\\ t_2 := \frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\ t_3 := \frac{a - t}{y - b}\\ \mathbf{if}\;z \leq -780000000:\\ \;\;\;\;t_3 - t_1 \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-261}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-272}:\\ \;\;\;\;\frac{z \cdot \frac{a - t}{z + -1} - \frac{b}{{\left(z + -1\right)}^{2}} \cdot \left(z \cdot x\right)}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+15}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3 - \frac{t_1}{\frac{z}{x}}\\ \end{array} \]
Alternative 2
Error8.47%
Cost5840
\[\begin{array}{l} t_1 := \frac{a - t}{y - b}\\ t_2 := \frac{y}{y - b}\\ t_3 := z \cdot \left(t - a\right) + y \cdot x\\ t_4 := \frac{t_3}{y - z \cdot \left(y - b\right)}\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t_4 \leq -4 \cdot 10^{-293}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{-243}:\\ \;\;\;\;t_1 - \frac{t_2}{\frac{z}{x}}\\ \mathbf{elif}\;t_4 \leq 10^{+303}:\\ \;\;\;\;\frac{t_3}{y \cdot \left(1 - z\right) + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t_1 - t_2 \cdot \frac{x}{z}\\ \end{array} \]
Alternative 3
Error8.31%
Cost5713
\[\begin{array}{l} t_1 := \frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-304} \lor \neg \left(t_1 \leq 2 \cdot 10^{-243}\right) \land t_1 \leq 10^{+303}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{y}{y - b} \cdot \frac{x}{z}\\ \end{array} \]
Alternative 4
Error11.12%
Cost5712
\[\begin{array}{l} t_1 := \frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-304}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 10^{-304}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;t_1 \leq 10^{+303}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \end{array} \]
Alternative 5
Error8.47%
Cost5712
\[\begin{array}{l} t_1 := \frac{a - t}{y - b}\\ t_2 := \frac{y}{y - b}\\ t_3 := \frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t_3 \leq -4 \cdot 10^{-293}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{-243}:\\ \;\;\;\;t_1 - \frac{t_2}{\frac{z}{x}}\\ \mathbf{elif}\;t_3 \leq 10^{+303}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1 - t_2 \cdot \frac{x}{z}\\ \end{array} \]
Alternative 6
Error40.58%
Cost2152
\[\begin{array}{l} t_1 := \frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\ t_2 := \frac{y}{z} \cdot \frac{x}{b} + \frac{t - a}{b}\\ t_3 := x - \frac{z \cdot a}{y}\\ \mathbf{if}\;b \leq -8.8 \cdot 10^{+196}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -5.1 \cdot 10^{-250}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\ \mathbf{elif}\;b \leq -2.75 \cdot 10^{-286}:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z}\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-239}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{-143}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{elif}\;b \leq 2.45 \cdot 10^{-138}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;b \leq 1300000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{+33}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{+142}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error32.04%
Cost1630
\[\begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+213}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{+178}:\\ \;\;\;\;\frac{a}{y - b} - \frac{y}{y - b} \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{+14}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-75} \lor \neg \left(z \leq 5.1 \cdot 10^{-225}\right) \land \left(z \leq 10^{-143} \lor \neg \left(z \leq 1.6 \cdot 10^{-99}\right)\right):\\ \;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \end{array} \]
Alternative 8
Error32.24%
Cost1498
\[\begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+47}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+16}:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -8.3 \cdot 10^{-75} \lor \neg \left(z \leq 5.1 \cdot 10^{-225}\right) \land \left(z \leq 1.3 \cdot 10^{-141} \lor \neg \left(z \leq 1.76 \cdot 10^{-99}\right)\right):\\ \;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \end{array} \]
Alternative 9
Error31.07%
Cost1366
\[\begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+15}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-75} \lor \neg \left(z \leq 4.2 \cdot 10^{-225} \lor \neg \left(z \leq 1.8 \cdot 10^{-143}\right) \land z \leq 1.2 \cdot 10^{-99}\right):\\ \;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \end{array} \]
Alternative 10
Error58.29%
Cost980
\[\begin{array}{l} t_1 := -\frac{a}{b}\\ t_2 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{-153}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-279}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-235}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 0.066:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error33.96%
Cost977
\[\begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -4.3 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+23}:\\ \;\;\;\;\frac{-x}{z}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-74} \lor \neg \left(z \leq 6 \cdot 10^{-99}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \end{array} \]
Alternative 12
Error33.76%
Cost977
\[\begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -7.6 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{+18}:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-75} \lor \neg \left(z \leq 2.2 \cdot 10^{-99}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \end{array} \]
Alternative 13
Error69.95%
Cost852
\[\begin{array}{l} t_1 := -\frac{a}{b}\\ \mathbf{if}\;y \leq -1 \cdot 10^{-153}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-235}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{+220}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 14
Error66.38%
Cost716
\[\begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+22}:\\ \;\;\;\;\frac{-x}{z}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-74}:\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-99}:\\ \;\;\;\;x + z \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
Alternative 15
Error66.39%
Cost588
\[\begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+14}:\\ \;\;\;\;\frac{-x}{z}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-74}:\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
Alternative 16
Error46.49%
Cost585
\[\begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+14} \lor \neg \left(y \leq 5.2 \cdot 10^{+78}\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b}\\ \end{array} \]
Alternative 17
Error64.06%
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-74}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
Alternative 18
Error72.69%
Cost64
\[x \]

Error

Reproduce?

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