Average Error: 10.5 → 4.5
Time: 24.6s
Precision: binary64
Cost: 3920
\[\frac{x - y \cdot z}{t - a \cdot z} \]
\[\begin{array}{l} t_1 := t - z \cdot a\\ t_2 := \frac{x - y \cdot z}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{-318}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 10^{-297}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;t_2 \leq 10^{+250}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} + x \cdot \frac{1}{t_1}\\ \end{array} \]
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* a z))))
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* z a))) (t_2 (/ (- x (* y z)) t_1)))
   (if (<= t_2 (- INFINITY))
     (/ y a)
     (if (<= t_2 -5e-318)
       t_2
       (if (<= t_2 1e-297)
         (- (/ y a) (/ (/ x a) z))
         (if (<= t_2 1e+250) t_2 (+ (/ y a) (* x (/ 1.0 t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	return (x - (y * z)) / (t - (a * z));
}
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (z * a);
	double t_2 = (x - (y * z)) / t_1;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = y / a;
	} else if (t_2 <= -5e-318) {
		tmp = t_2;
	} else if (t_2 <= 1e-297) {
		tmp = (y / a) - ((x / a) / z);
	} else if (t_2 <= 1e+250) {
		tmp = t_2;
	} else {
		tmp = (y / a) + (x * (1.0 / t_1));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	return (x - (y * z)) / (t - (a * z));
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (z * a);
	double t_2 = (x - (y * z)) / t_1;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = y / a;
	} else if (t_2 <= -5e-318) {
		tmp = t_2;
	} else if (t_2 <= 1e-297) {
		tmp = (y / a) - ((x / a) / z);
	} else if (t_2 <= 1e+250) {
		tmp = t_2;
	} else {
		tmp = (y / a) + (x * (1.0 / t_1));
	}
	return tmp;
}
def code(x, y, z, t, a):
	return (x - (y * z)) / (t - (a * z))
def code(x, y, z, t, a):
	t_1 = t - (z * a)
	t_2 = (x - (y * z)) / t_1
	tmp = 0
	if t_2 <= -math.inf:
		tmp = y / a
	elif t_2 <= -5e-318:
		tmp = t_2
	elif t_2 <= 1e-297:
		tmp = (y / a) - ((x / a) / z)
	elif t_2 <= 1e+250:
		tmp = t_2
	else:
		tmp = (y / a) + (x * (1.0 / t_1))
	return tmp
function code(x, y, z, t, a)
	return Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(a * z)))
end
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(z * a))
	t_2 = Float64(Float64(x - Float64(y * z)) / t_1)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(y / a);
	elseif (t_2 <= -5e-318)
		tmp = t_2;
	elseif (t_2 <= 1e-297)
		tmp = Float64(Float64(y / a) - Float64(Float64(x / a) / z));
	elseif (t_2 <= 1e+250)
		tmp = t_2;
	else
		tmp = Float64(Float64(y / a) + Float64(x * Float64(1.0 / t_1)));
	end
	return tmp
end
function tmp = code(x, y, z, t, a)
	tmp = (x - (y * z)) / (t - (a * z));
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - (z * a);
	t_2 = (x - (y * z)) / t_1;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = y / a;
	elseif (t_2 <= -5e-318)
		tmp = t_2;
	elseif (t_2 <= 1e-297)
		tmp = (y / a) - ((x / a) / z);
	elseif (t_2 <= 1e+250)
		tmp = t_2;
	else
		tmp = (y / a) + (x * (1.0 / t_1));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y / a), $MachinePrecision], If[LessEqual[t$95$2, -5e-318], t$95$2, If[LessEqual[t$95$2, 1e-297], N[(N[(y / a), $MachinePrecision] - N[(N[(x / a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+250], t$95$2, N[(N[(y / a), $MachinePrecision] + N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\frac{x - y \cdot z}{t - a \cdot z}
\begin{array}{l}
t_1 := t - z \cdot a\\
t_2 := \frac{x - y \cdot z}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-318}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 10^{-297}:\\
\;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\

\mathbf{elif}\;t_2 \leq 10^{+250}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a} + x \cdot \frac{1}{t_1}\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original10.5
Target1.6
Herbie4.5
\[\begin{array}{l} \mathbf{if}\;z < -32113435955957344:\\ \;\;\;\;\frac{x}{t - a \cdot z} - \frac{y}{\frac{t}{z} - a}\\ \mathbf{elif}\;z < 3.5139522372978296 \cdot 10^{-86}:\\ \;\;\;\;\left(x - y \cdot z\right) \cdot \frac{1}{t - a \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t - a \cdot z} - \frac{y}{\frac{t}{z} - a}\\ \end{array} \]

Derivation

  1. Split input into 4 regimes
  2. if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -inf.0

    1. Initial program 64.0

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Applied egg-rr0.2

      \[\leadsto \color{blue}{\frac{x}{t - z \cdot a} - \frac{y}{\frac{t - z \cdot a}{z}}} \]
    3. Taylor expanded in z around inf 21.5

      \[\leadsto \color{blue}{\frac{y}{a}} \]

    if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -4.9999987e-318 or 1.00000000000000004e-297 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 9.9999999999999992e249

    1. Initial program 0.2

      \[\frac{x - y \cdot z}{t - a \cdot z} \]

    if -4.9999987e-318 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 1.00000000000000004e-297

    1. Initial program 24.0

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Taylor expanded in z around inf 28.7

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

      \[\leadsto \color{blue}{\frac{y}{a} + \frac{\frac{y}{a} \cdot \frac{t}{a} - \frac{x}{a}}{z}} \]
      Proof
      (+.f64 (/.f64 y a) (/.f64 (-.f64 (*.f64 (/.f64 y a) (/.f64 t a)) (/.f64 x a)) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (-.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 y t) (*.f64 a a))) (/.f64 x a)) z)): 31 points increase in error, 7 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (-.f64 (/.f64 (*.f64 y t) (Rewrite<= unpow2_binary64 (pow.f64 a 2))) (/.f64 x a)) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (/.f64 (*.f64 y t) (pow.f64 a 2)) (neg.f64 (/.f64 x a)))) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (+.f64 (/.f64 (*.f64 y t) (pow.f64 a 2)) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 x a)))) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 x a)) (/.f64 (*.f64 y t) (pow.f64 a 2)))) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (+.f64 (*.f64 -1 (/.f64 x a)) (Rewrite<= *-lft-identity_binary64 (*.f64 1 (/.f64 (*.f64 y t) (pow.f64 a 2))))) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (+.f64 (*.f64 -1 (/.f64 x a)) (*.f64 (Rewrite<= metadata-eval (neg.f64 -1)) (/.f64 (*.f64 y t) (pow.f64 a 2)))) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 (*.f64 -1 (/.f64 x a)) (*.f64 -1 (/.f64 (*.f64 y t) (pow.f64 a 2))))) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (/.f64 (Rewrite=> distribute-lft-out--_binary64 (*.f64 -1 (-.f64 (/.f64 x a) (/.f64 (*.f64 y t) (pow.f64 a 2))))) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 (-.f64 (/.f64 x a) (/.f64 (*.f64 y t) (pow.f64 a 2))) z)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (*.f64 -1 (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (/.f64 x a) z) (/.f64 (/.f64 (*.f64 y t) (pow.f64 a 2)) z))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (*.f64 -1 (-.f64 (Rewrite<= associate-/r*_binary64 (/.f64 x (*.f64 a z))) (/.f64 (/.f64 (*.f64 y t) (pow.f64 a 2)) z)))): 18 points increase in error, 10 points decrease in error
      (+.f64 (/.f64 y a) (*.f64 -1 (-.f64 (/.f64 x (*.f64 a z)) (Rewrite<= associate-/r*_binary64 (/.f64 (*.f64 y t) (*.f64 (pow.f64 a 2) z)))))): 6 points increase in error, 3 points decrease in error
      (+.f64 (/.f64 y a) (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 -1 (/.f64 x (*.f64 a z))) (*.f64 -1 (/.f64 (*.f64 y t) (*.f64 (pow.f64 a 2) z)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (/.f64 y a) (*.f64 -1 (/.f64 x (*.f64 a z)))) (*.f64 -1 (/.f64 (*.f64 y t) (*.f64 (pow.f64 a 2) z))))): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 x (*.f64 a z))) (/.f64 y a))) (*.f64 -1 (/.f64 (*.f64 y t) (*.f64 (pow.f64 a 2) z)))): 0 points increase in error, 0 points decrease in error
    4. Taylor expanded in y around 0 17.2

      \[\leadsto \frac{y}{a} + \frac{\color{blue}{-1 \cdot \frac{x}{a}}}{z} \]
    5. Simplified17.2

      \[\leadsto \frac{y}{a} + \frac{\color{blue}{\frac{-x}{a}}}{z} \]
      Proof
      (/.f64 (neg.f64 x) a): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 x)) a): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 x a))): 0 points increase in error, 0 points decrease in error

    if 9.9999999999999992e249 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z)))

    1. Initial program 51.0

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Applied egg-rr29.0

      \[\leadsto \color{blue}{\frac{x}{t - z \cdot a} - \frac{y}{\frac{t - z \cdot a}{z}}} \]
    3. Applied egg-rr29.0

      \[\leadsto \color{blue}{\frac{1}{t - z \cdot a} \cdot x} - \frac{y}{\frac{t - z \cdot a}{z}} \]
    4. Taylor expanded in t around 0 11.7

      \[\leadsto \frac{1}{t - z \cdot a} \cdot x - \color{blue}{-1 \cdot \frac{y}{a}} \]
    5. Simplified11.7

      \[\leadsto \frac{1}{t - z \cdot a} \cdot x - \color{blue}{\frac{-y}{a}} \]
      Proof
      (/.f64 (neg.f64 y) a): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 y)) a): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 y a))): 0 points increase in error, 0 points decrease in error
  3. Recombined 4 regimes into one program.
  4. Final simplification4.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x - y \cdot z}{t - z \cdot a} \leq -\infty:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq -5 \cdot 10^{-318}:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq 10^{-297}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq 10^{+250}:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} + x \cdot \frac{1}{t - z \cdot a}\\ \end{array} \]

Alternatives

Alternative 1
Error4.3
Cost3792
\[\begin{array}{l} t_1 := \frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-318}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 10^{-297}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;t_1 \leq 10^{+298}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
Alternative 2
Error4.5
Cost3532
\[\begin{array}{l} t_1 := t - z \cdot a\\ t_2 := \frac{x - y \cdot z}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;t_2 \leq 10^{-71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{x}{t_1} - \frac{y}{t_1 \cdot \frac{1}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
Alternative 3
Error4.4
Cost3404
\[\begin{array}{l} t_1 := t - z \cdot a\\ t_2 := \frac{x - y \cdot z}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;t_2 \leq 20000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{x}{t_1} - \frac{y}{\frac{t_1}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
Alternative 4
Error18.7
Cost1240
\[\begin{array}{l} t_1 := \frac{x - y \cdot z}{t}\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ t_3 := \frac{x}{t - z \cdot a}\\ \mathbf{if}\;z \leq -5.732919041420877 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.5102413571113795 \cdot 10^{+31}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.0060190173090512 \cdot 10^{-226}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.4953541763242312 \cdot 10^{-259}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.2932682682649484 \cdot 10^{+28}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error27.5
Cost1176
\[\begin{array}{l} t_1 := \frac{x}{t - z \cdot a}\\ \mathbf{if}\;y \leq -1614.7395971900248:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;y \leq 132694075.45141271:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.0563131267723328 \cdot 10^{+77}:\\ \;\;\;\;\left(-y\right) \cdot \frac{z}{t}\\ \mathbf{elif}\;y \leq 3.021245415630793 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 10^{+180}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;y \leq 10^{+225}:\\ \;\;\;\;z \cdot \frac{-y}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
Alternative 6
Error18.3
Cost1108
\[\begin{array}{l} t_1 := t - z \cdot a\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ t_3 := \frac{x}{t_1}\\ \mathbf{if}\;z \leq -5.732919041420877 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.5102413571113795 \cdot 10^{+31}:\\ \;\;\;\;\frac{y}{t_1} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -1.0060190173090512 \cdot 10^{-226}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.4953541763242312 \cdot 10^{-259}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;z \leq 1.2932682682649484 \cdot 10^{+28}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error18.8
Cost1108
\[\begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ t_2 := \frac{x}{t - z \cdot a}\\ \mathbf{if}\;z \leq -5.732919041420877 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.36370015072287 \cdot 10^{+74}:\\ \;\;\;\;\frac{x}{t} - \frac{y}{t \cdot \frac{1}{z}}\\ \mathbf{elif}\;z \leq -1.0060190173090512 \cdot 10^{-226}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.4953541763242312 \cdot 10^{-259}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;z \leq 1.2932682682649484 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error35.1
Cost1044
\[\begin{array}{l} t_1 := \frac{y \cdot z}{-t}\\ \mathbf{if}\;a \leq -1.0571637105865486 \cdot 10^{-19}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-232}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-202}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-77}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;a \leq 3.4830808157242666 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.211124215083799 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
Alternative 9
Error18.3
Cost976
\[\begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -5.732919041420877 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.094155249650627 \cdot 10^{+108}:\\ \;\;\;\;-\frac{y}{t} \cdot z\\ \mathbf{elif}\;z \leq -3.5102413571113795 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.2932682682649484 \cdot 10^{+28}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error30.3
Cost780
\[\begin{array}{l} \mathbf{if}\;z \leq -5.732919041420877 \cdot 10^{+111}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -5.36370015072287 \cdot 10^{+74}:\\ \;\;\;\;\left(-y\right) \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq -5680701318.398498:\\ \;\;\;\;\frac{-\frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq 1.2932682682649484 \cdot 10^{+28}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
Alternative 11
Error29.9
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -3.5102413571113795 \cdot 10^{+31}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 1.2932682682649484 \cdot 10^{+28}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
Alternative 12
Error42.2
Cost192
\[\frac{y}{a} \]

Error

Reproduce

herbie shell --seed 2022297 
(FPCore (x y z t a)
  :name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
  :precision binary64

  :herbie-target
  (if (< z -32113435955957344.0) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a)))))

  (/ (- x (* y z)) (- t (* a z))))