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

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

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+288}:\\
\;\;\;\;t_2\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.5
Target12.7
Herbie7.3
\[\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 y around inf 35.6

      \[\leadsto \color{blue}{\frac{z}{b}} \]

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.00000000000000005e-300 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e288

    1. Initial program 0.4

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

    if -2.00000000000000005e-300 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 5.0000000000000003e288 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 43.8

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

      \[\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))): 2 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))): 17 points increase in error, 25 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))): 14 points increase in error, 10 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)))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in y around inf 28.7

      \[\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. Simplified23.6

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{\frac{t}{b} \cdot x - \frac{\left(1 + a\right) \cdot \left(z \cdot t\right)}{b \cdot b}}{y}} \]
      Proof
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (*.f64 (/.f64 t b) x) (/.f64 (*.f64 (+.f64 1 a) (*.f64 z t)) (*.f64 b b))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (Rewrite<= associate-/r/_binary64 (/.f64 t (/.f64 b x))) (/.f64 (*.f64 (+.f64 1 a) (*.f64 z t)) (*.f64 b b))) y)): 12 points increase in error, 8 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 t x) b)) (/.f64 (*.f64 (+.f64 1 a) (*.f64 z t)) (*.f64 b b))) y)): 8 points increase in error, 10 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (/.f64 (*.f64 t x) b) (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (+.f64 1 a) z) t)) (*.f64 b b))) y)): 14 points increase in error, 2 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (/.f64 (*.f64 t x) b) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 t (*.f64 (+.f64 1 a) z))) (*.f64 b b))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 z b) (/.f64 (-.f64 (/.f64 (*.f64 t x) b) (/.f64 (*.f64 t (*.f64 (+.f64 1 a) 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 (*.f64 (+.f64 1 a) z)) (pow.f64 b 2)) y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 z b) (-.f64 (Rewrite<= associate-/r*_binary64 (/.f64 (*.f64 t x) (*.f64 b y))) (/.f64 (/.f64 (*.f64 t (*.f64 (+.f64 1 a) z)) (pow.f64 b 2)) y))): 7 points increase in error, 7 points decrease in error
      (+.f64 (/.f64 z b) (-.f64 (/.f64 (*.f64 t x) (Rewrite<= *-commutative_binary64 (*.f64 y b))) (/.f64 (/.f64 (*.f64 t (*.f64 (+.f64 1 a) z)) (pow.f64 b 2)) y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 z b) (-.f64 (/.f64 (*.f64 t x) (*.f64 y b)) (Rewrite<= associate-/r*_binary64 (/.f64 (*.f64 t (*.f64 (+.f64 1 a) z)) (*.f64 (pow.f64 b 2) y))))): 5 points increase in error, 6 points decrease in error
      (+.f64 (/.f64 z b) (-.f64 (/.f64 (*.f64 t x) (*.f64 y b)) (/.f64 (*.f64 t (*.f64 (+.f64 1 a) z)) (Rewrite<= *-commutative_binary64 (*.f64 y (pow.f64 b 2)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (/.f64 z b) (/.f64 (*.f64 t x) (*.f64 y b))) (/.f64 (*.f64 t (*.f64 (+.f64 1 a) 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 (*.f64 (+.f64 1 a) z)) (*.f64 y (pow.f64 b 2)))): 0 points increase in error, 0 points decrease in error
    5. Taylor expanded in a around 0 21.9

      \[\leadsto \frac{z}{b} + \frac{\color{blue}{\frac{t \cdot x}{b} - \frac{t \cdot z}{{b}^{2}}}}{y} \]
    6. Simplified18.1

      \[\leadsto \frac{z}{b} + \frac{\color{blue}{\frac{t}{b} \cdot \left(x - \frac{z}{b}\right)}}{y} \]
      Proof
      (*.f64 (/.f64 t b) (-.f64 x (/.f64 z b))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 (/.f64 t b) x) (*.f64 (/.f64 t b) (/.f64 z b)))): 1 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 t x) b)) (*.f64 (/.f64 t b) (/.f64 z b))): 32 points increase in error, 18 points decrease in error
      (-.f64 (/.f64 (*.f64 t x) b) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 t z) (*.f64 b b)))): 29 points increase in error, 18 points decrease in error
      (-.f64 (/.f64 (*.f64 t x) b) (/.f64 (*.f64 t z) (Rewrite<= unpow2_binary64 (pow.f64 b 2)))): 0 points increase in error, 0 points decrease in error
    7. Taylor expanded in b around inf 19.1

      \[\leadsto \frac{z}{b} + \frac{\color{blue}{\frac{t \cdot x}{b}}}{y} \]
    8. Simplified17.8

      \[\leadsto \frac{z}{b} + \frac{\color{blue}{\frac{x}{\frac{b}{t}}}}{y} \]
      Proof
      (/.f64 x (/.f64 b t)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 x t) b)): 44 points increase in error, 44 points decrease in error
      (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 t x)) b): 0 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification7.3

    \[\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{z}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -2 \cdot 10^{-300}:\\ \;\;\;\;\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} + \frac{\frac{x}{\frac{b}{t}}}{y}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 5 \cdot 10^{+288}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{x}{\frac{b}{t}}}{y}\\ \end{array} \]

Alternatives

Alternative 1
Error21.5
Cost1752
\[\begin{array}{l} t_1 := \frac{y}{\frac{t}{b}}\\ t_2 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_3 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{if}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -3.8194783053128264 \cdot 10^{-147}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.0752556992885101 \cdot 10^{-165}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -3.6225404134969686 \cdot 10^{-179}:\\ \;\;\;\;\frac{z}{t} \cdot \frac{y}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;t \leq 4.456139035456342 \cdot 10^{-124}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.6292790759609041 \cdot 10^{+38}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{1 + t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + t_1\right)}\\ \end{array} \]
Alternative 2
Error21.7
Cost1752
\[\begin{array}{l} t_1 := \frac{y}{\frac{t}{b}}\\ t_2 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_3 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{if}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -3.8194783053128264 \cdot 10^{-147}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.0752556992885101 \cdot 10^{-165}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -8.155519709199454 \cdot 10^{-190}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;t \leq 4.456139035456342 \cdot 10^{-124}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.6292790759609041 \cdot 10^{+38}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{1 + t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + t_1\right)}\\ \end{array} \]
Alternative 3
Error21.1
Cost1356
\[\begin{array}{l} t_1 := \frac{y}{\frac{t}{b}}\\ \mathbf{if}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 4.456139035456342 \cdot 10^{-124}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 1.6292790759609041 \cdot 10^{+38}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{1 + t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + t_1\right)}\\ \end{array} \]
Alternative 4
Error23.2
Cost1100
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{if}\;t \leq -3.458102671314262 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 7.188868693748563 \cdot 10^{+35}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error36.9
Cost980
\[\begin{array}{l} \mathbf{if}\;a \leq -7.022036138873372 \cdot 10^{+56}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -7.231755143427921 \cdot 10^{-52}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -3.927552255290442 \cdot 10^{-87}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.404865390345594 \cdot 10^{-262}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 9.251071820827037 \cdot 10^{-5}:\\ \;\;\;\;x - x \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 6
Error25.9
Cost972
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -3.458102671314262 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 7.188868693748563 \cdot 10^{+35}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error20.5
Cost968
\[\begin{array}{l} \mathbf{if}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\ \mathbf{elif}\;t \leq 7.188868693748563 \cdot 10^{+35}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \end{array} \]
Alternative 8
Error20.5
Cost968
\[\begin{array}{l} \mathbf{if}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 7.188868693748563 \cdot 10^{+35}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \end{array} \]
Alternative 9
Error21.3
Cost968
\[\begin{array}{l} \mathbf{if}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 7.188868693748563 \cdot 10^{+35}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \end{array} \]
Alternative 10
Error36.9
Cost852
\[\begin{array}{l} \mathbf{if}\;a \leq -7.022036138873372 \cdot 10^{+56}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -7.231755143427921 \cdot 10^{-52}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -3.927552255290442 \cdot 10^{-87}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.404865390345594 \cdot 10^{-262}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 4.322941455173198:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 11
Error29.1
Cost716
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -3.458102671314262 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.0434236111929062 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 7.188868693748563 \cdot 10^{+35}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error28.4
Cost584
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -3.8316926052241864 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.188868693748563 \cdot 10^{+35}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error37.0
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -4.646862722630185 \cdot 10^{+22}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 4.322941455173198:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 14
Error50.8
Cost64
\[x \]

Error

Reproduce

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