Average Error: 16.5 → 6.8
Time: 25.3s
Precision: binary64
Cost: 3400
\[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
\[\begin{array}{l} t_1 := x + \frac{y \cdot z}{t}\\ t_2 := \frac{t_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;z \cdot \frac{y}{t + \left(y \cdot b + t \cdot a\right)}\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+292}:\\ \;\;\;\;\frac{t_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \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 (+ x (/ (* y z) t))) (t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_2 (- INFINITY))
     (* z (/ y (+ t (+ (* y b) (* t a)))))
     (if (<= t_2 5e+292) (/ t_1 (+ (+ a 1.0) (* b (/ y t)))) (/ 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 = x + ((y * z) / t);
	double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = z * (y / (t + ((y * b) + (t * a))));
	} else if (t_2 <= 5e+292) {
		tmp = t_1 / ((a + 1.0) + (b * (y / t)));
	} 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 = x + ((y * z) / t);
	double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = z * (y / (t + ((y * b) + (t * a))));
	} else if (t_2 <= 5e+292) {
		tmp = t_1 / ((a + 1.0) + (b * (y / t)));
	} 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 = x + ((y * z) / t)
	t_2 = t_1 / ((a + 1.0) + ((y * b) / t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = z * (y / (t + ((y * b) + (t * a))))
	elif t_2 <= 5e+292:
		tmp = t_1 / ((a + 1.0) + (b * (y / t)))
	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(x + Float64(Float64(y * z) / t))
	t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(z * Float64(y / Float64(t + Float64(Float64(y * b) + Float64(t * a)))));
	elseif (t_2 <= 5e+292)
		tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))));
	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 = x + ((y * z) / t);
	t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = z * (y / (t + ((y * b) + (t * a))));
	elseif (t_2 <= 5e+292)
		tmp = t_1 / ((a + 1.0) + (b * (y / t)));
	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[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(y / N[(t + N[(N[(y * b), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+292], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;z \cdot \frac{y}{t + \left(y \cdot b + t \cdot a\right)}\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+292}:\\
\;\;\;\;\frac{t_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.5
Target13.1
Herbie6.8
\[\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 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0

    1. Initial program 64.0

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

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

      \[\leadsto \color{blue}{\frac{y}{t + t \cdot \left(\frac{y}{\frac{t}{b}} + a\right)} \cdot z} \]
      Proof
      (*.f64 (/.f64 y (+.f64 t (*.f64 t (+.f64 (/.f64 y (/.f64 t b)) a)))) z): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 y (+.f64 (Rewrite<= *-rgt-identity_binary64 (*.f64 t 1)) (*.f64 t (+.f64 (/.f64 y (/.f64 t b)) a)))) z): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 y (+.f64 (*.f64 t 1) (*.f64 t (+.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y b) t)) a)))) z): 4 points increase in error, 14 points decrease in error
      (*.f64 (/.f64 y (Rewrite<= distribute-lft-in_binary64 (*.f64 t (+.f64 1 (+.f64 (/.f64 (*.f64 y b) t) a))))) z): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 y (/.f64 (*.f64 t (+.f64 1 (+.f64 (/.f64 (*.f64 y b) t) a))) z))): 38 points increase in error, 26 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y z) (*.f64 t (+.f64 1 (+.f64 (/.f64 (*.f64 y b) t) a))))): 53 points increase in error, 36 points decrease in error
    4. Taylor expanded in t around 0 12.7

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

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

    1. Initial program 5.9

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

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

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

    1. Initial program 62.1

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
      Proof
      (/.f64 (fma.f64 z (/.f64 y t) x) (+.f64 a (fma.f64 y (/.f64 b t) 1))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (/.f64 y t)) x)) (+.f64 a (fma.f64 y (/.f64 b t) 1))): 1 points increase in error, 1 points decrease in error
      (/.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 y t) z)) x) (+.f64 a (fma.f64 y (/.f64 b t) 1))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 y z) t)) x) (+.f64 a (fma.f64 y (/.f64 b t) 1))): 18 points increase in error, 18 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 x (/.f64 (*.f64 y z) t))) (+.f64 a (fma.f64 y (/.f64 b t) 1))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 a (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (/.f64 b t)) 1)))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 a (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 y b) t)) 1))): 24 points increase in error, 12 points decrease in error
      (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 a (Rewrite<= +-commutative_binary64 (+.f64 1 (/.f64 (*.f64 y b) t))))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))): 1 points increase in error, 0 points decrease in error
    3. Taylor expanded in y around inf 14.3

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

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

Alternatives

Alternative 1
Error24.4
Cost2148
\[\begin{array}{l} t_1 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\ t_2 := 1 + \left(a + \frac{b}{\frac{t}{y}}\right)\\ \mathbf{if}\;z \leq -1 \cdot 10^{+260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+220}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.0933242690560508 \cdot 10^{+163}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -8.769618112797326 \cdot 10^{+139}:\\ \;\;\;\;z \cdot \frac{y}{t + \left(y \cdot b + t \cdot a\right)}\\ \mathbf{elif}\;z \leq -0.00010271241379775213:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.2856457172821985 \cdot 10^{-155}:\\ \;\;\;\;\frac{x}{t_2}\\ \mathbf{elif}\;z \leq 6.277409771972422 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.388705668530709 \cdot 10^{+180}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{t_2}\\ \end{array} \]
Alternative 2
Error24.6
Cost2148
\[\begin{array}{l} t_1 := 1 + \left(a + \frac{b}{\frac{t}{y}}\right)\\ t_2 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{if}\;z \leq -1 \cdot 10^{+260}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+220}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+187}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.0933242690560508 \cdot 10^{+163}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -8.769618112797326 \cdot 10^{+139}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\ \mathbf{elif}\;z \leq -0.00010271241379775213:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.2856457172821985 \cdot 10^{-155}:\\ \;\;\;\;\frac{x}{t_1}\\ \mathbf{elif}\;z \leq 6.277409771972422 \cdot 10^{+78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.388705668530709 \cdot 10^{+180}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{t_1}\\ \end{array} \]
Alternative 3
Error24.9
Cost1892
\[\begin{array}{l} t_1 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{if}\;z \leq -1 \cdot 10^{+260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+220}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.0933242690560508 \cdot 10^{+163}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -8.769618112797326 \cdot 10^{+139}:\\ \;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\ \mathbf{elif}\;z \leq -0.00010271241379775213:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.2856457172821985 \cdot 10^{-155}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;z \leq 6.277409771972422 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{+190}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error24.7
Cost1892
\[\begin{array}{l} t_1 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{if}\;z \leq -1 \cdot 10^{+260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+220}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.0933242690560508 \cdot 10^{+163}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -8.769618112797326 \cdot 10^{+139}:\\ \;\;\;\;z \cdot \frac{y}{t + \left(y \cdot b + t \cdot a\right)}\\ \mathbf{elif}\;z \leq -0.00010271241379775213:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.2856457172821985 \cdot 10^{-155}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;z \leq 6.277409771972422 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{+190}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error25.3
Cost1760
\[\begin{array}{l} t_1 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{if}\;z \leq -1 \cdot 10^{+260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+220}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -8.769618112797326 \cdot 10^{+139}:\\ \;\;\;\;z \cdot \frac{y}{t + y \cdot b}\\ \mathbf{elif}\;z \leq -0.00010271241379775213:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.2856457172821985 \cdot 10^{-155}:\\ \;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\ \mathbf{elif}\;z \leq 6.277409771972422 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{+190}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error28.6
Cost1368
\[\begin{array}{l} t_1 := x + z \cdot \frac{y}{t}\\ t_2 := \frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\ \mathbf{if}\;a \leq -80.49198657433584:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;a \leq -3.0999920051387384 \cdot 10^{-45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.4234561019587369 \cdot 10^{-61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.0315659100058752 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.880001810523834 \cdot 10^{-228}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 6.456457938644078 \cdot 10^{-10}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a}\\ \end{array} \]
Alternative 7
Error28.2
Cost1104
\[\begin{array}{l} t_1 := x + z \cdot \frac{y}{t}\\ t_2 := \frac{x + \frac{z}{\frac{t}{y}}}{a}\\ \mathbf{if}\;a \leq -80.49198657433584:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.0315659100058752 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.7476934446544447 \cdot 10^{-216}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 6.456457938644078 \cdot 10^{-10}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error28.7
Cost1104
\[\begin{array}{l} t_1 := x + z \cdot \frac{y}{t}\\ \mathbf{if}\;a \leq -80.49198657433584:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;a \leq 1.0315659100058752 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.7476934446544447 \cdot 10^{-216}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 6.456457938644078 \cdot 10^{-10}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a}\\ \end{array} \]
Alternative 9
Error22.5
Cost968
\[\begin{array}{l} \mathbf{if}\;y \leq -2.4789318912436836 \cdot 10^{+22}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.5617589696278458 \cdot 10^{+80}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 10
Error37.1
Cost848
\[\begin{array}{l} \mathbf{if}\;a \leq -3.5445056960784646 \cdot 10^{-17}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.0315659100058752 \cdot 10^{-280}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.7476934446544447 \cdot 10^{-216}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 6.456457938644078 \cdot 10^{-10}:\\ \;\;\;\;x - x \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 11
Error37.1
Cost720
\[\begin{array}{l} \mathbf{if}\;a \leq -3.5445056960784646 \cdot 10^{-17}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.0315659100058752 \cdot 10^{-280}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.7476934446544447 \cdot 10^{-216}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 6.456457938644078 \cdot 10^{-10}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 12
Error28.7
Cost584
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.9868804541378352 \cdot 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.3727914668560008 \cdot 10^{-74}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error36.9
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -3.5445056960784646 \cdot 10^{-17}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 6.456457938644078 \cdot 10^{-10}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 14
Error51.1
Cost64
\[x \]

Error

Reproduce

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