?

Average Error: 16.3 → 6.1
Time: 19.0s
Precision: binary64
Cost: 6740

?

\[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
\[\begin{array}{l} t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\ t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\ t_3 := \frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-322}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\frac{z}{b} + \left(\frac{t}{\frac{b}{\frac{x}{y}}} - \frac{t \cdot \left(a + 1\right)}{\frac{y}{\frac{\frac{z}{b}}{b}}}\right)\\ \mathbf{elif}\;t_2 \leq 10^{+285}:\\ \;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{t_1}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (/ (* y b) t) (+ a 1.0)))
        (t_2 (/ (+ x (/ (* y z) t)) t_1))
        (t_3 (* (/ y t) (/ z (+ (+ a 1.0) (/ y (/ t b)))))))
   (if (<= t_2 (- INFINITY))
     t_3
     (if (<= t_2 -2e-322)
       t_2
       (if (<= t_2 0.0)
         (+
          (/ z b)
          (- (/ t (/ b (/ x y))) (/ (* t (+ a 1.0)) (/ y (/ (/ z b) b)))))
         (if (<= t_2 1e+285)
           (/ (+ x (* (* y z) (/ 1.0 t))) t_1)
           (if (<= t_2 INFINITY) t_3 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y * b) / t) + (a + 1.0);
	double t_2 = (x + ((y * z) / t)) / t_1;
	double t_3 = (y / t) * (z / ((a + 1.0) + (y / (t / b))));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_2 <= -2e-322) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = (z / b) + ((t / (b / (x / y))) - ((t * (a + 1.0)) / (y / ((z / b) / b))));
	} else if (t_2 <= 1e+285) {
		tmp = (x + ((y * z) * (1.0 / t))) / t_1;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = z / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y * b) / t) + (a + 1.0);
	double t_2 = (x + ((y * z) / t)) / t_1;
	double t_3 = (y / t) * (z / ((a + 1.0) + (y / (t / b))));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else if (t_2 <= -2e-322) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = (z / b) + ((t / (b / (x / y))) - ((t * (a + 1.0)) / (y / ((z / b) / b))));
	} else if (t_2 <= 1e+285) {
		tmp = (x + ((y * z) * (1.0 / t))) / t_1;
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
def code(x, y, z, t, a, b):
	t_1 = ((y * b) / t) + (a + 1.0)
	t_2 = (x + ((y * z) / t)) / t_1
	t_3 = (y / t) * (z / ((a + 1.0) + (y / (t / b))))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_3
	elif t_2 <= -2e-322:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = (z / b) + ((t / (b / (x / y))) - ((t * (a + 1.0)) / (y / ((z / b) / b))))
	elif t_2 <= 1e+285:
		tmp = (x + ((y * z) * (1.0 / t))) / t_1
	elif t_2 <= math.inf:
		tmp = t_3
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
end
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))
	t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1)
	t_3 = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_2 <= -2e-322)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(z / b) + Float64(Float64(t / Float64(b / Float64(x / y))) - Float64(Float64(t * Float64(a + 1.0)) / Float64(y / Float64(Float64(z / b) / b)))));
	elseif (t_2 <= 1e+285)
		tmp = Float64(Float64(x + Float64(Float64(y * z) * Float64(1.0 / t))) / t_1);
	elseif (t_2 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((y * b) / t) + (a + 1.0);
	t_2 = (x + ((y * z) / t)) / t_1;
	t_3 = (y / t) * (z / ((a + 1.0) + (y / (t / b))));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_3;
	elseif (t_2 <= -2e-322)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = (z / b) + ((t / (b / (x / y))) - ((t * (a + 1.0)) / (y / ((z / b) / b))));
	elseif (t_2 <= 1e+285)
		tmp = (x + ((y * z) * (1.0 / t))) / t_1;
	elseif (t_2 <= Inf)
		tmp = t_3;
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-322], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t / N[(b / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y / N[(N[(z / b), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+285], N[(N[(x + N[(N[(y * z), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[(z / b), $MachinePrecision]]]]]]]]]
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\
t_3 := \frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{z}{b} + \left(\frac{t}{\frac{b}{\frac{x}{y}}} - \frac{t \cdot \left(a + 1\right)}{\frac{y}{\frac{\frac{z}{b}}{b}}}\right)\\

\mathbf{elif}\;t_2 \leq 10^{+285}:\\
\;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{t_1}\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.3
Target12.9
Herbie6.1
\[\begin{array}{l} \mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\ \;\;\;\;1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\ \mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\ \end{array} \]

Derivation?

  1. Split input into 5 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 9.9999999999999998e284 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 60.1

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

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

      [Start]60.1

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

      +-commutative [=>]60.1

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

      associate-*l/ [<=]35.8

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

      fma-def [=>]35.8

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

      +-commutative [=>]35.8

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

      associate-+r+ [=>]35.8

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

      +-commutative [=>]35.8

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

      associate-*l/ [<=]35.8

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

      fma-def [=>]35.8

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(\frac{y \cdot b}{t} + \left(1 + a\right)\right)}} \]
    4. Simplified21.9

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

      [Start]40.1

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

      times-frac [=>]20.1

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

      +-commutative [=>]20.1

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

      associate-/l* [=>]21.9

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.97626e-322

    1. Initial program 0.4

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

    if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0

    1. Initial program 28.9

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

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

      [Start]28.9

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

      associate-/l* [=>]28.4

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

      associate-+l+ [=>]28.4

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

      *-commutative [=>]28.4

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

      associate-/l* [=>]19.9

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

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

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

      [Start]26.9

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

      +-commutative [=>]26.9

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

      associate--l+ [=>]26.9

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

      associate-/l* [=>]26.4

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

      *-commutative [=>]26.4

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

      associate-/l* [=>]21.5

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

      associate-*r* [=>]22.6

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

      associate-/l* [=>]21.8

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

      associate-/l* [=>]21.8

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

      unpow2 [=>]21.8

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

      associate-/r* [=>]21.8

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

    if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999998e284

    1. Initial program 0.4

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Applied egg-rr0.4

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

    if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 64.0

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

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

      [Start]64.0

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

      +-commutative [=>]64.0

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

      associate-*l/ [<=]63.7

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

      fma-def [=>]63.7

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

      +-commutative [=>]63.7

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

      associate-+r+ [=>]63.7

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

      +-commutative [=>]63.7

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

      associate-*l/ [<=]56.2

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

      fma-def [=>]56.2

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification6.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -\infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -2 \cdot 10^{-322}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 0:\\ \;\;\;\;\frac{z}{b} + \left(\frac{t}{\frac{b}{\frac{x}{y}}} - \frac{t \cdot \left(a + 1\right)}{\frac{y}{\frac{\frac{z}{b}}{b}}}\right)\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 10^{+285}:\\ \;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternatives

Alternative 1
Error6.6
Cost6740
\[\begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ t_2 := \frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-322}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t_1 \leq 10^{+285}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 2
Error6.6
Cost6740
\[\begin{array}{l} t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\ t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\ t_3 := \frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-322}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t_2 \leq 10^{+285}:\\ \;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{t_1}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 3
Error5.9
Cost6740
\[\begin{array}{l} t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\ t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\ t_3 := \frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-322}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b} + \frac{t}{b} \cdot \frac{z \cdot \left(-1 - a\right)}{b}}{y}\\ \mathbf{elif}\;t_2 \leq 10^{+285}:\\ \;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{t_1}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 4
Error21.7
Cost1628
\[\begin{array}{l} t_1 := \frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\ t_2 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ t_3 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{+34}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-90}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-119}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{-181}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 15500000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error21.8
Cost1628
\[\begin{array}{l} t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ t_2 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\ t_3 := \frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{+34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.06 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{-181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-135}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5500000000:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error11.7
Cost1353
\[\begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{-155} \lor \neg \left(t \leq 5.9 \cdot 10^{-183}\right):\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \end{array} \]
Alternative 7
Error30.3
Cost1236
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.75 \cdot 10^{+34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{-181}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-62}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+40}:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error28.8
Cost1236
\[\begin{array}{l} t_1 := \frac{x + z \cdot \frac{y}{t}}{a}\\ \mathbf{if}\;a \leq -1.18 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-130}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-232}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-275}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 6800000:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error27.2
Cost1234
\[\begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+34} \lor \neg \left(t \leq 1.08 \cdot 10^{-181}\right) \land \left(t \leq 3.5 \cdot 10^{-130} \lor \neg \left(t \leq 2.9 \cdot 10^{+31}\right)\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \end{array} \]
Alternative 10
Error23.6
Cost1234
\[\begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+34} \lor \neg \left(t \leq 1.08 \cdot 10^{-181}\right) \land \left(t \leq 1.5 \cdot 10^{-131} \lor \neg \left(t \leq 4.9 \cdot 10^{-62}\right)\right):\\ \;\;\;\;\frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \end{array} \]
Alternative 11
Error36.7
Cost720
\[\begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-274}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-44}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+53}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 12
Error30.4
Cost585
\[\begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+34} \lor \neg \left(t \leq 1.08 \cdot 10^{-181}\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 13
Error37.1
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{-36}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 14
Error50.7
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023027 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))

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