?

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

\mathbf{elif}\;t_1 \leq -4 \cdot 10^{-319}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+282}:\\
\;\;\;\;t_1\\

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

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original73.9%
Target78.7%
Herbie91.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 4 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 2.00000000000000007e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 7.1%

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

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

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

      [Start]34.2

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

      times-frac [=>]72.7

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

      +-commutative [=>]72.7

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

      associate-/l* [=>]71.4

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.0000049e-319 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.00000000000000007e282

    1. Initial program 99.3%

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

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

    1. Initial program 54.5%

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

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

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

      [Start]31.4

      \[ \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t}} \]

      associate-/l* [=>]42.8

      \[ \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{y}{\frac{t}{b}}}} \]
    4. Applied egg-rr62.7%

      \[\leadsto \color{blue}{\frac{x + \frac{y}{\frac{t}{z}}}{y} \cdot \frac{t}{b}} \]
    5. Taylor expanded in b around 0 49.7%

      \[\leadsto \color{blue}{\frac{t \cdot \left(\frac{y \cdot z}{t} + x\right)}{y \cdot b}} \]
    6. Simplified67.5%

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

      [Start]49.7

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

      *-commutative [=>]49.7

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

      associate-*r/ [<=]47.8

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

      fma-udef [<=]47.8

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

      associate-*l/ [<=]50.0

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

      *-commutative [=>]50.0

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

      associate-/r* [=>]67.5

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

      *-lft-identity [<=]67.5

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

      associate-*r/ [=>]67.5

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

      associate-*l/ [<=]67.5

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

      fma-udef [=>]67.5

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

      distribute-lft-out [<=]67.5

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

      associate-*r* [=>]67.5

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

      *-commutative [=>]67.5

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

      lft-mult-inverse [=>]67.5

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

      associate-/r/ [<=]67.5

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

      /-rgt-identity [=>]67.5

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

      associate-*l/ [=>]67.5

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

      *-lft-identity [=>]67.5

      \[ t \cdot \frac{\frac{z}{t} + \frac{\color{blue}{x}}{y}}{b} \]

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

    1. Initial program 0.0%

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

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

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

      +-commutative [=>]0.0

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

      associate-*l/ [<=]0.5

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

      fma-def [=>]0.5

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

      +-commutative [=>]0.5

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

      associate-+r+ [=>]0.5

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

      +-commutative [=>]0.5

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

      associate-*l/ [<=]11.6

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

      fma-def [=>]11.6

      \[ \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 94.6%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification91.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{y}{t} \cdot \frac{z}{1 + \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 -4 \cdot 10^{-319}:\\ \;\;\;\;\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:\\ \;\;\;\;t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 2 \cdot 10^{+282}:\\ \;\;\;\;\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 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy89.3%
Cost18256
\[\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}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;t_1 \leq -4 \cdot 10^{-319}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\ \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}\\ \end{array} \]
Alternative 2
Accuracy81.2%
Cost1616
\[\begin{array}{l} t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ t_2 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{if}\;t \leq -1.75 \cdot 10^{-150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.15 \cdot 10^{-177}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-144}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-115}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Accuracy53.9%
Cost1500
\[\begin{array}{l} t_1 := \frac{x}{1 + \frac{y \cdot b}{t}}\\ t_2 := x + \frac{y \cdot z}{t}\\ t_3 := \frac{t_2}{a}\\ \mathbf{if}\;a \leq -5.1 \cdot 10^{+14}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-37}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.58 \cdot 10^{-31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+91}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+111}:\\ \;\;\;\;\frac{x \cdot t}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Accuracy53.8%
Cost1496
\[\begin{array}{l} t_1 := y \cdot \frac{z}{t}\\ t_2 := \frac{x + t_1}{a}\\ t_3 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{if}\;y \leq -11200:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-78}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-112}:\\ \;\;\;\;\frac{t_1}{a + 1}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-138}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+52}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\ \end{array} \]
Alternative 5
Accuracy62.9%
Cost1233
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{if}\;t \leq -3.3 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.55 \cdot 10^{-177}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-8} \lor \neg \left(t \leq 1.55 \cdot 10^{+49}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\ \end{array} \]
Alternative 6
Accuracy63.1%
Cost1232
\[\begin{array}{l} t_1 := \frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{-139}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-177}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+49}:\\ \;\;\;\;t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Accuracy62.6%
Cost1232
\[\begin{array}{l} t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\ t_2 := t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\ \mathbf{if}\;y \leq -5.2 \cdot 10^{+101}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{-238}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Accuracy52.5%
Cost1100
\[\begin{array}{l} t_1 := t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\ \mathbf{if}\;y \leq -18000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-138}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+53}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Accuracy65.0%
Cost969
\[\begin{array}{l} \mathbf{if}\;y \leq -5.1 \cdot 10^{+101} \lor \neg \left(y \leq 1.35 \cdot 10^{+62}\right):\\ \;\;\;\;t \cdot \frac{\frac{z}{t} + \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \end{array} \]
Alternative 10
Accuracy54.0%
Cost840
\[\begin{array}{l} \mathbf{if}\;y \leq -15500:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-138}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{+51}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
Alternative 11
Accuracy41.8%
Cost588
\[\begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-160}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+66}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 12
Accuracy55.6%
Cost585
\[\begin{array}{l} \mathbf{if}\;y \leq -18000 \lor \neg \left(y \leq 2.3 \cdot 10^{+51}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
Alternative 13
Accuracy42.3%
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
Alternative 14
Accuracy20.3%
Cost64
\[x \]

Error

Reproduce?

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