?

Average Error: 25.86% → 9.04%
Time: 27.1s
Precision: binary64
Cost: 7252

?

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

\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-43}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-259}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\

\mathbf{elif}\;t_1 \leq 10^{+285}:\\
\;\;\;\;t_1\\

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

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original25.86%
Target20.55%
Herbie9.04%
\[\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 9.9999999999999998e284 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 95.06

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

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

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

      [Start]60.63

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

      times-frac [=>]28.04

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

      associate-+r+ [=>]28.04

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

      +-commutative [<=]28.04

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

      associate-*r/ [<=]29.99

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.00000000000000019e-43 or 2.0000000000000001e-259 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999998e284

    1. Initial program 0.44

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

    if -5.00000000000000019e-43 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e-259

    1. Initial program 23.23

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

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

      [Start]23.23

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

      associate-/l* [=>]23.35

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

      associate-+l+ [=>]23.35

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

      *-commutative [=>]23.35

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

      associate-/l* [=>]17.13

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

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

    1. Initial program 100

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

      \[\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]100

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

      +-commutative [=>]100

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

      associate-*l/ [<=]99.52

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

      fma-def [=>]99.52

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

      +-commutative [=>]99.52

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

      associate-+r+ [=>]99.52

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

      +-commutative [=>]99.52

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

      associate-*l/ [<=]86.87

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

      fma-def [=>]86.87

      \[ \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 34.51

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

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

      [Start]34.51

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

      +-commutative [=>]34.51

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

      associate-*r/ [=>]34.51

      \[ \frac{z}{b} + \color{blue}{\frac{-1 \cdot \left(-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(\left(1 + a\right) \cdot z\right)}{{b}^{2}}\right)}{y}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification9.04

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

Alternatives

Alternative 1
Error12.78%
Cost15944
\[\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{y}{t} \cdot \frac{z}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{t}, z, x\right)}{1 + \mathsf{fma}\left(\frac{y}{t}, b, a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{x}{\frac{b}{t}} + \frac{z}{b} \cdot \frac{-1 - a}{\frac{b}{t}}}{y}\\ \end{array} \]
Alternative 2
Error9.01%
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}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{-259}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \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 3
Error10.71%
Cost6096
\[\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 \cdot z}{t \cdot t_1} + \frac{x}{t_1}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-258}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{-118}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;t_2 \leq 10^{+285}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{x}{\frac{b}{t}} + \frac{z}{b} \cdot \frac{-1 - a}{\frac{b}{t}}}{y}\\ \end{array} \]
Alternative 4
Error53.78%
Cost1896
\[\begin{array}{l} t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_2 := \frac{x}{a + 1}\\ t_3 := \frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{if}\;x \leq -8.2 \cdot 10^{-64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{-252}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-205}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-178}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 3 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+93}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+132}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error53.85%
Cost1896
\[\begin{array}{l} t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_2 := \frac{x}{a + 1}\\ t_3 := \frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{if}\;x \leq -7.2 \cdot 10^{-61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.55 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-252}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-203}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-177}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+95}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+133}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error53.95%
Cost1896
\[\begin{array}{l} t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_2 := \frac{x}{a + 1}\\ t_3 := \frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{if}\;x \leq -1.06 \cdot 10^{-63}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -4.95 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-252}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-204}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-178}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-67}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+92}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{+132}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error49.25%
Cost1628
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ t_2 := \frac{z}{b} + \frac{x}{\frac{b}{\frac{t}{y}}}\\ \mathbf{if}\;b \leq -1.4 \cdot 10^{+185}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;b \leq -1.72 \cdot 10^{-220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -9.2 \cdot 10^{-278}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;b \leq 0.00046:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 6.8 \cdot 10^{+142}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.05 \cdot 10^{+162}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+214}:\\ \;\;\;\;\frac{t}{\frac{y}{\frac{x}{b}}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error19.88%
Cost1484
\[\begin{array}{l} t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{if}\;t \leq -8 \cdot 10^{-79}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-256}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(\frac{y \cdot b}{t} + \left(a + 1\right)\right)}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-116}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error19.97%
Cost1484
\[\begin{array}{l} t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{if}\;t \leq -8 \cdot 10^{-79}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.32 \cdot 10^{-255}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(\frac{y \cdot b}{t} + \left(a + 1\right)\right)}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-115}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error22.84%
Cost1352
\[\begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+135}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+134}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{x}{\frac{b}{\frac{t}{y}}}\\ \end{array} \]
Alternative 11
Error32.82%
Cost1232
\[\begin{array}{l} t_1 := \frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\ \mathbf{if}\;b \leq -1.75 \cdot 10^{+196}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;b \leq -1.65 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4.1 \cdot 10^{-19}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+218}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{x}{\frac{b}{\frac{t}{y}}}\\ \end{array} \]
Alternative 12
Error52.79%
Cost1108
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;b \leq -1.15 \cdot 10^{+196}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq -1.72 \cdot 10^{-220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2.26 \cdot 10^{-274}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{+160}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+215}:\\ \;\;\;\;\frac{t}{\frac{y}{\frac{x}{b}}}\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+220}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 13
Error43.14%
Cost1100
\[\begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+152}:\\ \;\;\;\;\frac{\frac{y}{t}}{\frac{a + 1}{z}}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{+49}:\\ \;\;\;\;\frac{z}{b} + \frac{x}{\frac{b}{\frac{t}{y}}}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;\frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \end{array} \]
Alternative 14
Error51.83%
Cost844
\[\begin{array}{l} \mathbf{if}\;b \leq -7.5 \cdot 10^{+195}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{+216}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{x}{b}\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{+216}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 15
Error51.77%
Cost844
\[\begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+186}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{+216}:\\ \;\;\;\;\frac{t}{\frac{y}{\frac{x}{b}}}\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+220}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 16
Error57.84%
Cost588
\[\begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+121}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 17
Error57.71%
Cost588
\[\begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-12}:\\ \;\;\;\;x \cdot \left(1 - a\right)\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+121}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 18
Error43.93%
Cost585
\[\begin{array}{l} \mathbf{if}\;t \leq -2.55 \cdot 10^{-39} \lor \neg \left(t \leq 2.85 \cdot 10^{-82}\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 19
Error56.89%
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-10}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 20
Error79.84%
Cost64
\[x \]

Error

Reproduce?

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