Average Error: 16.3 → 7.1
Time: 20.2s
Precision: binary64
Cost: 4556
\[\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:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\frac{t_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+304}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{t}{b} \cdot \left(x - \frac{z}{b}\right)}{y}\\ \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))
     (* (/ y t) (/ z (+ 1.0 (+ a (* b (/ y t))))))
     (if (<= t_2 0.0)
       (/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
       (if (<= t_2 2e+304) t_2 (+ (/ z b) (/ (* (/ t b) (- x (/ z b))) y)))))))
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 = (y / t) * (z / (1.0 + (a + (b * (y / t)))));
	} else if (t_2 <= 0.0) {
		tmp = t_1 / ((a + 1.0) + (y / (t / b)));
	} else if (t_2 <= 2e+304) {
		tmp = t_2;
	} else {
		tmp = (z / b) + (((t / b) * (x - (z / b))) / y);
	}
	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 = (y / t) * (z / (1.0 + (a + (b * (y / t)))));
	} else if (t_2 <= 0.0) {
		tmp = t_1 / ((a + 1.0) + (y / (t / b)));
	} else if (t_2 <= 2e+304) {
		tmp = t_2;
	} else {
		tmp = (z / b) + (((t / b) * (x - (z / b))) / y);
	}
	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 = (y / t) * (z / (1.0 + (a + (b * (y / t)))))
	elif t_2 <= 0.0:
		tmp = t_1 / ((a + 1.0) + (y / (t / b)))
	elif t_2 <= 2e+304:
		tmp = t_2
	else:
		tmp = (z / b) + (((t / b) * (x - (z / b))) / y)
	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(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))));
	elseif (t_2 <= 0.0)
		tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))));
	elseif (t_2 <= 2e+304)
		tmp = t_2;
	else
		tmp = Float64(Float64(z / b) + Float64(Float64(Float64(t / b) * Float64(x - Float64(z / b))) / y));
	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 = (y / t) * (z / (1.0 + (a + (b * (y / t)))));
	elseif (t_2 <= 0.0)
		tmp = t_1 / ((a + 1.0) + (y / (t / b)));
	elseif (t_2 <= 2e+304)
		tmp = t_2;
	else
		tmp = (z / b) + (((t / b) * (x - (z / b))) / y);
	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[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+304], t$95$2, N[(N[(z / b), $MachinePrecision] + N[(N[(N[(t / b), $MachinePrecision] * N[(x - N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $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:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{\frac{t}{b} \cdot \left(x - \frac{z}{b}\right)}{y}\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.3
Target13.1
Herbie7.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 4 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. Applied egg-rr64.0

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

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

      \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + \left(\frac{y}{t} \cdot b + a\right)}} \]
      Proof
      (*.f64 (/.f64 y t) (/.f64 z (+.f64 1 (+.f64 (*.f64 (/.f64 y t) b) a)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 y t) (/.f64 z (+.f64 1 (+.f64 (Rewrite<= associate-/r/_binary64 (/.f64 y (/.f64 t b))) a)))): 8 points increase in error, 2 points decrease in error
      (*.f64 (/.f64 y t) (/.f64 z (+.f64 1 (+.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y b) t)) a)))): 11 points increase in error, 9 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 y z) (*.f64 t (+.f64 1 (+.f64 (/.f64 (*.f64 y b) t) a))))): 42 points increase in error, 55 points decrease in error

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

    1. Initial program 9.7

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

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

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e304

    1. Initial program 0.4

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

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

    1. Initial program 63.5

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{y \cdot b}{t} + 1}} \]
    3. Simplified63.5

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + \frac{y}{t} \cdot b}} \]
      Proof
      (+.f64 1 (*.f64 (/.f64 y t) b)): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (Rewrite<= associate-/r/_binary64 (/.f64 y (/.f64 t b)))): 20 points increase in error, 20 points decrease in error
      (+.f64 1 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y b) t))): 37 points increase in error, 15 points decrease in error
      (Rewrite=> +-commutative_binary64 (+.f64 (/.f64 (*.f64 y b) t) 1)): 0 points increase in error, 0 points decrease in error
    4. Taylor expanded in y around inf 20.8

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{\frac{t}{b} \cdot \left(x - \frac{z}{b}\right)}{y}} \]
      Proof
      (+.f64 (/.f64 z b) (/.f64 (*.f64 (/.f64 t b) (-.f64 x (/.f64 z b))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 (/.f64 t b) x) (*.f64 (/.f64 t b) (/.f64 z b)))) y)): 2 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 t x) b)) (*.f64 (/.f64 t b) (/.f64 z b))) y)): 11 points increase in error, 11 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (/.f64 (*.f64 t x) b) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 t z) (*.f64 b b)))) y)): 16 points increase in error, 5 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (/.f64 (*.f64 t x) b) (/.f64 (*.f64 t z) (Rewrite<= unpow2_binary64 (pow.f64 b 2)))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 z b) (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (/.f64 (*.f64 t x) b) y) (/.f64 (/.f64 (*.f64 t z) (pow.f64 b 2)) y)))): 1 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 z b) (-.f64 (Rewrite=> associate-/l/_binary64 (/.f64 (*.f64 t x) (*.f64 y b))) (/.f64 (/.f64 (*.f64 t z) (pow.f64 b 2)) y))): 13 points increase in error, 7 points decrease in error
      (+.f64 (/.f64 z b) (-.f64 (/.f64 (*.f64 t x) (*.f64 y b)) (Rewrite=> associate-/l/_binary64 (/.f64 (*.f64 t z) (*.f64 y (pow.f64 b 2)))))): 5 points increase in error, 3 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (/.f64 z b) (/.f64 (*.f64 t x) (*.f64 y b))) (/.f64 (*.f64 t z) (*.f64 y (pow.f64 b 2))))): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 t x) (*.f64 y b)) (/.f64 z b))) (/.f64 (*.f64 t z) (*.f64 y (pow.f64 b 2)))): 0 points increase in error, 0 points decrease in error
  3. Recombined 4 regimes into one program.
  4. Final simplification7.1

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

Alternatives

Alternative 1
Error16.3
Cost1616
\[\begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ t_2 := \frac{z}{b} + \frac{\frac{t}{b} \cdot \left(x - \frac{z}{b}\right)}{y}\\ \mathbf{if}\;b \leq -1.192085157961983 \cdot 10^{+149}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -18040449928507167000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.804229891211336 \cdot 10^{-11}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq 1.5125502475857613 \cdot 10^{+234}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error24.8
Cost1488
\[\begin{array}{l} t_1 := 1 + \left(a + b \cdot \frac{y}{t}\right)\\ \mathbf{if}\;x \leq -1.4384559448042367 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;x \leq -6.26274192516493 \cdot 10^{-198}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 1.2667686230358054 \cdot 10^{-301}:\\ \;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\ \mathbf{elif}\;x \leq 1.6883006015340265 \cdot 10^{-108}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{t_1}\\ \mathbf{elif}\;x \leq 491899573274155460:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t_1}\\ \end{array} \]
Alternative 3
Error24.2
Cost1488
\[\begin{array}{l} t_1 := 1 + \left(a + b \cdot \frac{y}{t}\right)\\ \mathbf{if}\;x \leq -1.4384559448042367 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;x \leq -6.26274192516493 \cdot 10^{-198}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq -1.8868661902869862 \cdot 10^{-299}:\\ \;\;\;\;\frac{z}{t} \cdot \frac{y}{t_1}\\ \mathbf{elif}\;x \leq 1.6883006015340265 \cdot 10^{-108}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{t_1}\\ \mathbf{elif}\;x \leq 491899573274155460:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t_1}\\ \end{array} \]
Alternative 4
Error13.7
Cost1352
\[\begin{array}{l} \mathbf{if}\;y \leq -5.811856007328037 \cdot 10^{+71}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;y \leq 6.3637770175696945 \cdot 10^{+88}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{t}{b} \cdot \left(x - \frac{z}{b}\right)}{y}\\ \end{array} \]
Alternative 5
Error24.0
Cost1232
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{if}\;b \leq -4.267539285018985 \cdot 10^{+152}:\\ \;\;\;\;\frac{\frac{z}{t} + \frac{x}{y}}{\frac{b}{t}}\\ \mathbf{elif}\;b \leq -18040449928507167000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.804229891211336 \cdot 10^{-11}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq 123708312920457.58:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error25.6
Cost1232
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{if}\;x \leq -1.4384559448042367 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6.26274192516493 \cdot 10^{-198}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 9.317877234879858 \cdot 10^{-171}:\\ \;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\ \mathbf{elif}\;x \leq 491899573274155460:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error25.6
Cost1232
\[\begin{array}{l} \mathbf{if}\;x \leq -1.4384559448042367 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;x \leq -6.26274192516493 \cdot 10^{-198}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 9.317877234879858 \cdot 10^{-171}:\\ \;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\ \mathbf{elif}\;x \leq 491899573274155460:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \end{array} \]
Alternative 8
Error29.1
Cost1104
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.178915841463421 \cdot 10^{-66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.1335339379732526 \cdot 10^{-129}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 0.5594737357639303:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;t \leq 1.695700985550077 \cdot 10^{+26}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error27.5
Cost1100
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{if}\;x \leq -1.4384559448042367 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6.26274192516493 \cdot 10^{-198}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 9.317877234879858 \cdot 10^{-171}:\\ \;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error36.9
Cost852
\[\begin{array}{l} \mathbf{if}\;a \leq -2.5931324744338786:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -1.125944489560589 \cdot 10^{-182}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 0.0064913647467067645:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.3036828085718196 \cdot 10^{+107}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.9458198156941726 \cdot 10^{+163}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 11
Error30.0
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -7.929840324840676 \cdot 10^{+198}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.1168301194436861 \cdot 10^{+74}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 12
Error36.6
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -1.43815695816846 \cdot 10^{-9}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 0.0064913647467067645:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 13
Error51.2
Cost64
\[x \]

Error

Reproduce

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