Average Error: 16.6 → 6.5
Time: 25.6s
Precision: binary64
Cost: 11212
\[\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)}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;z \cdot \frac{y}{t + t \cdot \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-293}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{\frac{x}{b}}{y} + \frac{\frac{z}{b}}{b} \cdot \frac{-1 - a}{y}, \frac{z}{b}\right)\\ \mathbf{elif}\;t_1 \leq 10^{+302}:\\ \;\;\;\;t_1\\ \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)) (+ (/ (* y b) t) (+ a 1.0)))))
   (if (<= t_1 (- INFINITY))
     (* z (/ y (+ t (* t (+ a (/ y (/ t b)))))))
     (if (<= t_1 -2e-293)
       t_1
       (if (<= t_1 0.0)
         (fma t (+ (/ (/ x b) y) (* (/ (/ z b) b) (/ (- -1.0 a) y))) (/ z b))
         (if (<= t_1 1e+302) t_1 (/ 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)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z * (y / (t + (t * (a + (y / (t / b))))));
	} else if (t_1 <= -2e-293) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = fma(t, (((x / b) / y) + (((z / b) / b) * ((-1.0 - a) / y))), (z / b));
	} else if (t_1 <= 1e+302) {
		tmp = t_1;
	} 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(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z * Float64(y / Float64(t + Float64(t * Float64(a + Float64(y / Float64(t / b)))))));
	elseif (t_1 <= -2e-293)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = fma(t, Float64(Float64(Float64(x / b) / y) + Float64(Float64(Float64(z / b) / b) * Float64(Float64(-1.0 - a) / y))), Float64(z / b));
	elseif (t_1 <= 1e+302)
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(y / N[(t + N[(t * N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-293], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t * N[(N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision] + N[(N[(N[(z / b), $MachinePrecision] / b), $MachinePrecision] * N[(N[(-1.0 - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+302], t$95$1, 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 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;z \cdot \frac{y}{t + t \cdot \left(a + \frac{y}{\frac{t}{b}}\right)}\\

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}

Error

Target

Original16.6
Target13.2
Herbie6.5
\[\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. 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)}} \]
    3. Simplified15.2

      \[\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): 6 points increase in error, 8 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))): 37 points increase in error, 33 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y z) (*.f64 t (+.f64 1 (+.f64 (/.f64 (*.f64 y b) t) a))))): 52 points increase in error, 30 points decrease in error

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-293 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.0000000000000001e302

    1. Initial program 0.4

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

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

    1. Initial program 27.4

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \frac{\frac{x}{b}}{y} - \frac{1 + a}{y} \cdot \frac{\frac{z}{b}}{b}, \frac{z}{b}\right)} \]
      Proof
      (fma.f64 t (-.f64 (/.f64 (/.f64 x b) y) (*.f64 (/.f64 (+.f64 1 a) y) (/.f64 (/.f64 z b) b))) (/.f64 z b)): 0 points increase in error, 0 points decrease in error
      (fma.f64 t (-.f64 (Rewrite<= associate-/r*_binary64 (/.f64 x (*.f64 b y))) (*.f64 (/.f64 (+.f64 1 a) y) (/.f64 (/.f64 z b) b))) (/.f64 z b)): 15 points increase in error, 7 points decrease in error
      (fma.f64 t (-.f64 (/.f64 x (Rewrite<= *-commutative_binary64 (*.f64 y b))) (*.f64 (/.f64 (+.f64 1 a) y) (/.f64 (/.f64 z b) b))) (/.f64 z b)): 0 points increase in error, 0 points decrease in error
      (fma.f64 t (-.f64 (/.f64 x (*.f64 y b)) (*.f64 (/.f64 (+.f64 1 a) y) (Rewrite<= associate-/r*_binary64 (/.f64 z (*.f64 b b))))) (/.f64 z b)): 6 points increase in error, 3 points decrease in error
      (fma.f64 t (-.f64 (/.f64 x (*.f64 y b)) (*.f64 (/.f64 (+.f64 1 a) y) (/.f64 z (Rewrite<= unpow2_binary64 (pow.f64 b 2))))) (/.f64 z b)): 0 points increase in error, 0 points decrease in error
      (fma.f64 t (-.f64 (/.f64 x (*.f64 y b)) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (+.f64 1 a) z) (*.f64 y (pow.f64 b 2))))) (/.f64 z b)): 8 points increase in error, 9 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 t (-.f64 (/.f64 x (*.f64 y b)) (/.f64 (*.f64 (+.f64 1 a) z) (*.f64 y (pow.f64 b 2))))) (/.f64 z b))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 (/.f64 x (*.f64 y b)) (/.f64 (*.f64 (+.f64 1 a) z) (*.f64 y (pow.f64 b 2)))) t)) (/.f64 z b)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 z b) (*.f64 (-.f64 (/.f64 x (*.f64 y b)) (/.f64 (*.f64 (+.f64 1 a) z) (*.f64 y (pow.f64 b 2)))) t))): 0 points increase in error, 0 points decrease in error

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

    1. Initial program 63.6

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Simplified51.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))): 0 points increase in error, 0 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, 19 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))): 9 points increase in error, 14 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 13.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -\infty:\\ \;\;\;\;z \cdot \frac{y}{t + t \cdot \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -2 \cdot 10^{-293}:\\ \;\;\;\;\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:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{\frac{x}{b}}{y} + \frac{\frac{z}{b}}{b} \cdot \frac{-1 - a}{y}, \frac{z}{b}\right)\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 10^{+302}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternatives

Alternative 1
Error6.2
Cost5712
\[\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:\\ \;\;\;\;z \cdot \frac{y}{t + t \cdot \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-318}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{1}{\frac{b}{z} + \frac{a}{x}}\\ \mathbf{elif}\;t_1 \leq 10^{+302}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 2
Error24.2
Cost1628
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ t_2 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\ t_3 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{if}\;y \leq -1.339637885349144 \cdot 10^{+178}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -6.298194607569277 \cdot 10^{+90}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.0726079134171064 \cdot 10^{+72}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -10438869287.701777:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -6.874018934130949 \cdot 10^{-47}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -2.4122253663204653 \cdot 10^{-269}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8.635806177143924 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Error24.3
Cost1628
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ t_2 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{if}\;y \leq -1.339637885349144 \cdot 10^{+178}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -6.298194607569277 \cdot 10^{+90}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;y \leq -1.0726079134171064 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -10438869287.701777:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -6.874018934130949 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.4122253663204653 \cdot 10^{-269}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\ \mathbf{elif}\;y \leq 8.635806177143924 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error28.5
Cost1500
\[\begin{array}{l} t_1 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ t_2 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ t_3 := \frac{x + \frac{z}{\frac{t}{y}}}{a}\\ \mathbf{if}\;a \leq -2.657474695869047 \cdot 10^{+220}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.8307032603445556 \cdot 10^{+185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -9.49504771145734 \cdot 10^{+70}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -7.619888452712192 \cdot 10^{-15}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.3387009892078616 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.056696321288189 \cdot 10^{-167}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 0.16182957213626867:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error28.1
Cost1368
\[\begin{array}{l} t_1 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ t_2 := \frac{x + \frac{z}{\frac{t}{y}}}{a}\\ \mathbf{if}\;a \leq -9.49504771145734 \cdot 10^{+70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -7.619888452712192 \cdot 10^{-15}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -3.277139994400831 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 7.564457940989936 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.056696321288189 \cdot 10^{-167}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 0.16182957213626867:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error23.4
Cost1364
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{if}\;t \leq -4.794671578860896 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.343858708290077 \cdot 10^{-167}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq 1.1102029232551794 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 368482453536605.3:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 2.9849559351114222 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error30.6
Cost1244
\[\begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -4.794671578860896 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.339024012233552 \cdot 10^{-195}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 3.671234314947054 \cdot 10^{-58}:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;t \leq 368482453536605.3:\\ \;\;\;\;\frac{1}{\frac{b}{z} + \frac{a}{x}}\\ \mathbf{elif}\;t \leq 2.9849559351114222 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 2.8476567042527483 \cdot 10^{+91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.791003475298559 \cdot 10^{+98}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error28.1
Cost1104
\[\begin{array}{l} t_1 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ t_2 := \frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{if}\;a \leq -37946034.77315159:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 7.564457940989936 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.056696321288189 \cdot 10^{-167}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 0.16182957213626867:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error36.8
Cost980
\[\begin{array}{l} \mathbf{if}\;a \leq -7.259334412063702 \cdot 10^{+67}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -6.896358349867942 \cdot 10^{-149}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 2.584013674077 \cdot 10^{-266}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.4990161215018772 \cdot 10^{-139}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 0.16182957213626867:\\ \;\;\;\;x - x \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 10
Error36.9
Cost852
\[\begin{array}{l} \mathbf{if}\;a \leq -7.259334412063702 \cdot 10^{+67}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -6.896358349867942 \cdot 10^{-149}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 2.584013674077 \cdot 10^{-266}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.4990161215018772 \cdot 10^{-139}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 0.16182957213626867:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 11
Error29.1
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -9.79805913852728 \cdot 10^{-48}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.4600212623070965 \cdot 10^{+84}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 12
Error36.9
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -37946034.77315159:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 0.16182957213626867:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 13
Error51.1
Cost64
\[x \]

Error

Reproduce

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