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

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-237}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+303}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.7
Target13.5
Herbie5.2
\[\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 or 4.9999999999999997e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 62.3

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

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

      \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + \left(a + b \cdot \frac{y}{t}\right)}} \]
      Proof
      (*.f64 (/.f64 y t) (/.f64 z (+.f64 1 (+.f64 a (*.f64 b (/.f64 y t)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 y t) (/.f64 z (+.f64 1 (+.f64 a (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 y t) b)))))): 0 points increase in error, 5 points decrease in error
      (*.f64 (/.f64 y t) (/.f64 z (+.f64 1 (+.f64 a (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 y b) t)))))): 5 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 y t) (/.f64 z (+.f64 1 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 y b) t) a))))): 4 points increase in error, 1 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 y z) (*.f64 t (+.f64 1 (+.f64 (/.f64 (*.f64 y b) t) a))))): 1 points increase in error, 4 points decrease in error

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999999e-238 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e303

    1. Initial program 0.4

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

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

    1. Initial program 26.0

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

      \[\leadsto \color{blue}{\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}} \]
      Proof
      (/.f64 (+.f64 x (/.f64 y (/.f64 t z))) (+.f64 a (+.f64 1 (/.f64 b (/.f64 t y))))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 x (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y z) t))) (+.f64 a (+.f64 1 (/.f64 b (/.f64 t y))))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 a (+.f64 1 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 b y) t))))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 a (+.f64 1 (/.f64 (Rewrite<= *-commutative_binary64 (*.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)))): 3 points increase in error, 0 points decrease in error

    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. Applied egg-rr55.8

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(\frac{y \cdot z}{t} + x\right)}{y \cdot b}} \]
    4. Simplified55.8

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{y \cdot b} + \frac{z}{b}} \]
    6. Simplified2.4

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

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

Alternatives

Alternative 1
Error6.8
Cost8388
\[\begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{\frac{z}{1 + \mathsf{fma}\left(\frac{y}{t}, b, a\right)}}{\frac{t}{y}}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+303}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\ \end{array} \]
Alternative 2
Error33.3
Cost2032
\[\begin{array}{l} t_1 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ t_2 := \frac{y}{t} \cdot \frac{z}{a}\\ t_3 := \frac{x}{a + 1}\\ \mathbf{if}\;a \leq -1 \cdot 10^{+245}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{+98}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{+83}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -62000000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2.35 \cdot 10^{-8}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -1.62 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-209}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-160}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-146}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-9}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+188}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+225}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 3
Error24.8
Cost1893
\[\begin{array}{l} t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ t_2 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_3 := 1 + \left(a + b \cdot \frac{y}{t}\right)\\ \mathbf{if}\;z \leq -4.6 \cdot 10^{+110}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{t_3}\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{+38}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-110}:\\ \;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-77}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+101}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+125}:\\ \;\;\;\;\frac{x}{t_3}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+190} \lor \neg \left(z \leq 4 \cdot 10^{+259}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error33.6
Cost1768
\[\begin{array}{l} t_1 := x + \frac{y \cdot z}{t}\\ t_2 := \frac{y}{t} \cdot \frac{z}{a}\\ t_3 := \frac{x}{a + 1}\\ \mathbf{if}\;a \leq -6.5 \cdot 10^{+245}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{+97}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{+79}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -75000000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-11}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-177}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-227}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-9}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+188}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+225}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 5
Error35.2
Cost1764
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ t_2 := \frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{if}\;x \leq -6 \cdot 10^{+53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{-13}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq -5.1 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;x \leq -3.65 \cdot 10^{-78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-86}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{-104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-206}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-298}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 2.26 \cdot 10^{-156}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-89}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error35.3
Cost1764
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ t_2 := \frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{if}\;x \leq -2.6 \cdot 10^{+58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.75 \cdot 10^{-16}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-22}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{-76}:\\ \;\;\;\;y \cdot \frac{z}{t + t \cdot a}\\ \mathbf{elif}\;x \leq -1.75 \cdot 10^{-85}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{-104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-206}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-300}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-158}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 8.6 \cdot 10^{-92}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error28.7
Cost1764
\[\begin{array}{l} t_1 := \frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\ t_2 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ t_3 := x + \frac{y \cdot z}{t}\\ t_4 := \frac{t_3}{a}\\ \mathbf{if}\;a \leq -5.6 \cdot 10^{+97}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{+84}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{+20}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-226}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-162}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.82 \cdot 10^{-146}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 8
Error29.5
Cost1632
\[\begin{array}{l} t_1 := \frac{x + y \cdot \frac{z}{t}}{a}\\ t_2 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{if}\;a \leq -5.6 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{+84}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-209}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-160}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-147}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 390000:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error11.8
Cost1618
\[\begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-34} \lor \neg \left(t \leq -4.5 \cdot 10^{-74} \lor \neg \left(t \leq -4.8 \cdot 10^{-117}\right) \land t \leq 1.6 \cdot 10^{-103}\right):\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \end{array} \]
Alternative 10
Error11.8
Cost1617
\[\begin{array}{l} t_1 := x + \frac{y}{\frac{t}{z}}\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{-34}:\\ \;\;\;\;\frac{t_1}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-74} \lor \neg \left(t \leq -5 \cdot 10^{-117}\right) \land t \leq 4.3 \cdot 10^{-104}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \end{array} \]
Alternative 11
Error28.8
Cost1500
\[\begin{array}{l} t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_2 := \frac{x + y \cdot \frac{z}{t}}{a}\\ t_3 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{if}\;a \leq -8.5 \cdot 10^{+97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.8 \cdot 10^{-178}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-162}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-144}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 390000:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error28.8
Cost1500
\[\begin{array}{l} t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_2 := x + \frac{y \cdot z}{t}\\ t_3 := \frac{t_2}{a}\\ t_4 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{if}\;a \leq -5.6 \cdot 10^{+97}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2.95 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.7 \cdot 10^{-176}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-198}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-166}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-148}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 13
Error19.5
Cost1234
\[\begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-34} \lor \neg \left(t \leq -1.08 \cdot 10^{-94} \lor \neg \left(t \leq -5.2 \cdot 10^{-117}\right) \land t \leq 3.9 \cdot 10^{-75}\right):\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \end{array} \]
Alternative 14
Error22.0
Cost1100
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-33}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 8.4 \cdot 10^{-75}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error22.7
Cost1100
\[\begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+27}:\\ \;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-34}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 6.7 \cdot 10^{-75}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \end{array} \]
Alternative 16
Error36.9
Cost722
\[\begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+97} \lor \neg \left(a \leq -8.5 \cdot 10^{+81}\right) \land \left(a \leq -720000000 \lor \neg \left(a \leq 9000000000\right)\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 17
Error28.5
Cost585
\[\begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-29} \lor \neg \left(t \leq 8.7 \cdot 10^{-75}\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 18
Error47.6
Cost192
\[\frac{x}{a} \]

Error

Reproduce

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