Average Error: 10.3 → 6.8
Time: 16.3s
Precision: binary64
Cost: 1232
\[\frac{x - y \cdot z}{t - a \cdot z} \]
\[\begin{array}{l} t_1 := \frac{x - z \cdot y}{t - z \cdot a}\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -1.3216766444606895 \cdot 10^{+161}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.3460107355499526 \cdot 10^{+129}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.9924740520655655 \cdot 10^{+63}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;z \leq 8.436988778214547 \cdot 10^{+90}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \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 (/ (- x (* z y)) (- t (* z a)))) (t_2 (/ (- y (/ x z)) a)))
   (if (<= z -1.3216766444606895e+161)
     t_2
     (if (<= z -2.3460107355499526e+129)
       t_1
       (if (<= z -3.9924740520655655e+63)
         (- (/ y a) (/ (/ x a) z))
         (if (<= z 8.436988778214547e+90) t_1 t_2))))))
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 = (x - (z * y)) / (t - (z * a));
	double t_2 = (y - (x / z)) / a;
	double tmp;
	if (z <= -1.3216766444606895e+161) {
		tmp = t_2;
	} else if (z <= -2.3460107355499526e+129) {
		tmp = t_1;
	} else if (z <= -3.9924740520655655e+63) {
		tmp = (y / a) - ((x / a) / z);
	} else if (z <= 8.436988778214547e+90) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = (x - (y * z)) / (t - (a * z))
end function
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x - (z * y)) / (t - (z * a))
    t_2 = (y - (x / z)) / a
    if (z <= (-1.3216766444606895d+161)) then
        tmp = t_2
    else if (z <= (-2.3460107355499526d+129)) then
        tmp = t_1
    else if (z <= (-3.9924740520655655d+63)) then
        tmp = (y / a) - ((x / a) / z)
    else if (z <= 8.436988778214547d+90) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
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 = (x - (z * y)) / (t - (z * a));
	double t_2 = (y - (x / z)) / a;
	double tmp;
	if (z <= -1.3216766444606895e+161) {
		tmp = t_2;
	} else if (z <= -2.3460107355499526e+129) {
		tmp = t_1;
	} else if (z <= -3.9924740520655655e+63) {
		tmp = (y / a) - ((x / a) / z);
	} else if (z <= 8.436988778214547e+90) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 = (x - (z * y)) / (t - (z * a))
	t_2 = (y - (x / z)) / a
	tmp = 0
	if z <= -1.3216766444606895e+161:
		tmp = t_2
	elif z <= -2.3460107355499526e+129:
		tmp = t_1
	elif z <= -3.9924740520655655e+63:
		tmp = (y / a) - ((x / a) / z)
	elif z <= 8.436988778214547e+90:
		tmp = t_1
	else:
		tmp = t_2
	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(Float64(x - Float64(z * y)) / Float64(t - Float64(z * a)))
	t_2 = Float64(Float64(y - Float64(x / z)) / a)
	tmp = 0.0
	if (z <= -1.3216766444606895e+161)
		tmp = t_2;
	elseif (z <= -2.3460107355499526e+129)
		tmp = t_1;
	elseif (z <= -3.9924740520655655e+63)
		tmp = Float64(Float64(y / a) - Float64(Float64(x / a) / z));
	elseif (z <= 8.436988778214547e+90)
		tmp = t_1;
	else
		tmp = t_2;
	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 = (x - (z * y)) / (t - (z * a));
	t_2 = (y - (x / z)) / a;
	tmp = 0.0;
	if (z <= -1.3216766444606895e+161)
		tmp = t_2;
	elseif (z <= -2.3460107355499526e+129)
		tmp = t_1;
	elseif (z <= -3.9924740520655655e+63)
		tmp = (y / a) - ((x / a) / z);
	elseif (z <= 8.436988778214547e+90)
		tmp = t_1;
	else
		tmp = t_2;
	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[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -1.3216766444606895e+161], t$95$2, If[LessEqual[z, -2.3460107355499526e+129], t$95$1, If[LessEqual[z, -3.9924740520655655e+63], N[(N[(y / a), $MachinePrecision] - N[(N[(x / a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.436988778214547e+90], t$95$1, t$95$2]]]]]]
\frac{x - y \cdot z}{t - a \cdot z}
\begin{array}{l}
t_1 := \frac{x - z \cdot y}{t - z \cdot a}\\
t_2 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -1.3216766444606895 \cdot 10^{+161}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -2.3460107355499526 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -3.9924740520655655 \cdot 10^{+63}:\\
\;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\

\mathbf{elif}\;z \leq 8.436988778214547 \cdot 10^{+90}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original10.3
Target1.6
Herbie6.8
\[\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 3 regimes
  2. if z < -1.321676644460689e161 or 8.43698877821454744e90 < z

    1. Initial program 27.8

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

      \[\leadsto \frac{x - y \cdot z}{\color{blue}{\frac{t \cdot t - {\left(z \cdot \left(-a\right)\right)}^{2}}{t - z \cdot \left(-a\right)}}} \]
    3. Taylor expanded in z around inf 31.3

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

      \[\leadsto \color{blue}{\frac{y}{a} - \frac{a \cdot x - t \cdot y}{a \cdot \left(a \cdot z\right)}} \]
      Proof
      (-.f64 (/.f64 y a) (/.f64 (-.f64 (*.f64 a x) (*.f64 t y)) (*.f64 a (*.f64 a z)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 y a) (/.f64 (-.f64 (*.f64 a x) (Rewrite<= *-commutative_binary64 (*.f64 y t))) (*.f64 a (*.f64 a z)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 y a) (/.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (*.f64 a x) (neg.f64 (*.f64 y t)))) (*.f64 a (*.f64 a z)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 y a) (/.f64 (+.f64 (*.f64 a x) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 y t)))) (*.f64 a (*.f64 a z)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 y a) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (*.f64 y t)) (*.f64 a x))) (*.f64 a (*.f64 a z)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 y a) (/.f64 (+.f64 (*.f64 -1 (*.f64 y t)) (*.f64 a x)) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 a a) z)))): 15 points increase in error, 5 points decrease in error
      (-.f64 (/.f64 y a) (/.f64 (+.f64 (*.f64 -1 (*.f64 y t)) (*.f64 a x)) (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 a 2)) z))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 (/.f64 y a) (neg.f64 (/.f64 (+.f64 (*.f64 -1 (*.f64 y t)) (*.f64 a x)) (*.f64 (pow.f64 a 2) z))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (+.f64 (*.f64 -1 (*.f64 y t)) (*.f64 a x)) (*.f64 (pow.f64 a 2) z))))): 0 points increase in error, 0 points decrease in error
    5. Taylor expanded in a around inf 13.8

      \[\leadsto \color{blue}{\frac{y - \frac{x}{z}}{a}} \]

    if -1.321676644460689e161 < z < -2.3460107355499526e129 or -3.99247405206556549e63 < z < 8.43698877821454744e90

    1. Initial program 2.3

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

    if -2.3460107355499526e129 < z < -3.99247405206556549e63

    1. Initial program 14.2

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

      \[\leadsto \frac{x - y \cdot z}{\color{blue}{\frac{t \cdot t - {\left(z \cdot \left(-a\right)\right)}^{2}}{t - z \cdot \left(-a\right)}}} \]
    3. Taylor expanded in t around 0 33.3

      \[\leadsto \color{blue}{-1 \cdot \frac{x - y \cdot z}{a \cdot z}} \]
    4. Simplified23.6

      \[\leadsto \color{blue}{\frac{y}{a} - \frac{\frac{x}{a}}{z}} \]
      Proof
      (-.f64 (/.f64 y a) (/.f64 (/.f64 x a) z)): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 y a) (Rewrite<= associate-/r*_binary64 (/.f64 x (*.f64 a z)))): 30 points increase in error, 28 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 (/.f64 y a) (neg.f64 (/.f64 x (*.f64 a z))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 y a) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 x (*.f64 a z))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 x (*.f64 a z))) (/.f64 y a))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> mul-1-neg_binary64 (neg.f64 (/.f64 x (*.f64 a z)))) (/.f64 y a)): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 (/.f64 x (*.f64 a z)))) (/.f64 y a)): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 0 (/.f64 x (*.f64 a z))) (/.f64 (Rewrite<= *-lft-identity_binary64 (*.f64 1 y)) a)): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 0 (/.f64 x (*.f64 a z))) (/.f64 (*.f64 (Rewrite<= metadata-eval (/.f64 2 2)) y) a)): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 0 (/.f64 x (*.f64 a z))) (Rewrite<= associate-*r/_binary64 (*.f64 (/.f64 2 2) (/.f64 y a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 0 (/.f64 x (*.f64 a z))) (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 y a) (/.f64 2 2)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 0 (/.f64 x (*.f64 a z))) (*.f64 (/.f64 y a) (Rewrite=> metadata-eval 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 0 (/.f64 x (*.f64 a z))) (*.f64 (/.f64 y a) (Rewrite<= *-inverses_binary64 (/.f64 z z)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 0 (/.f64 x (*.f64 a z))) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 y z) (*.f64 a z)))): 57 points increase in error, 8 points decrease in error
      (Rewrite<= associate--r-_binary64 (-.f64 0 (-.f64 (/.f64 x (*.f64 a z)) (/.f64 (*.f64 y z) (*.f64 a z))))): 0 points increase in error, 0 points decrease in error
      (-.f64 0 (Rewrite<= div-sub_binary64 (/.f64 (-.f64 x (*.f64 y z)) (*.f64 a z)))): 1 points increase in error, 2 points decrease in error
      (Rewrite<= neg-sub0_binary64 (neg.f64 (/.f64 (-.f64 x (*.f64 y z)) (*.f64 a z)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (-.f64 x (*.f64 y z)) (*.f64 a z)))): 0 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification6.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3216766444606895 \cdot 10^{+161}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -2.3460107355499526 \cdot 10^{+129}:\\ \;\;\;\;\frac{x - z \cdot y}{t - z \cdot a}\\ \mathbf{elif}\;z \leq -3.9924740520655655 \cdot 10^{+63}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;z \leq 8.436988778214547 \cdot 10^{+90}:\\ \;\;\;\;\frac{x - z \cdot y}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]

Alternatives

Alternative 1
Error5.7
Cost1484
\[\begin{array}{l} t_1 := t - z \cdot a\\ t_2 := \frac{x}{t_1}\\ t_3 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -1.3216766444606895 \cdot 10^{+161}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -2.0283227832589176 \cdot 10^{+87}:\\ \;\;\;\;t_2 - \frac{y}{\frac{t_1}{z}}\\ \mathbf{elif}\;z \leq 8.436988778214547 \cdot 10^{+90}:\\ \;\;\;\;t_2 - \frac{z \cdot y}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 2
Error21.4
Cost1368
\[\begin{array}{l} t_1 := \frac{x}{t - z \cdot a}\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;a \leq -2.1147287367427253 \cdot 10^{+76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.913915923322733 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-67}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \mathbf{elif}\;a \leq 3.261086220443193 \cdot 10^{+29}:\\ \;\;\;\;\frac{z}{\frac{z \cdot a - t}{y}}\\ \mathbf{elif}\;a \leq 2.402724113426819 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \end{array} \]
Alternative 3
Error21.5
Cost1368
\[\begin{array}{l} t_1 := \frac{x}{t - z \cdot a}\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;a \leq -2.1147287367427253 \cdot 10^{+76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.913915923322733 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-74}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \mathbf{elif}\;a \leq 3.261086220443193 \cdot 10^{+29}:\\ \;\;\;\;z \cdot \frac{y}{z \cdot a - t}\\ \mathbf{elif}\;a \leq 2.402724113426819 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \end{array} \]
Alternative 4
Error5.5
Cost1352
\[\begin{array}{l} t_1 := t - z \cdot a\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -1.3216766444606895 \cdot 10^{+161}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.653779411767812 \cdot 10^{-66}:\\ \;\;\;\;\frac{x}{t_1} - \frac{y}{\frac{t_1}{z}}\\ \mathbf{elif}\;z \leq 8.436988778214547 \cdot 10^{+90}:\\ \;\;\;\;\frac{x - z \cdot y}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error37.6
Cost1308
\[\begin{array}{l} t_1 := \left(-z\right) \cdot \frac{y}{t}\\ \mathbf{if}\;x \leq -1.6126499449737435 \cdot 10^{+27}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;x \leq -1.2713903766820421 \cdot 10^{-164}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;x \leq -5.267797270261372 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.902962302701412 \cdot 10^{-292}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;x \leq 5.983980295783957 \cdot 10^{-241}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.6801644540752687 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;x \leq 8.308396074376017 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{a}\\ \end{array} \]
Alternative 6
Error37.7
Cost1308
\[\begin{array}{l} \mathbf{if}\;x \leq -1.6126499449737435 \cdot 10^{+27}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;x \leq -1.2713903766820421 \cdot 10^{-164}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;x \leq -5.267797270261372 \cdot 10^{-196}:\\ \;\;\;\;\frac{z \cdot \left(-y\right)}{t}\\ \mathbf{elif}\;x \leq 1.902962302701412 \cdot 10^{-292}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;x \leq 5.983980295783957 \cdot 10^{-241}:\\ \;\;\;\;\left(-z\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;x \leq 1.6801644540752687 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;x \leq 8.308396074376017 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{a}\\ \end{array} \]
Alternative 7
Error20.6
Cost1240
\[\begin{array}{l} t_1 := \frac{x - z \cdot y}{t}\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -7.494621510014777 \cdot 10^{+51}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.8636588453403858 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.653779411767812 \cdot 10^{-66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.339609794132321 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.708334041461262 \cdot 10^{-58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 5.933741085068301 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error21.8
Cost1240
\[\begin{array}{l} t_1 := \frac{x}{t - z \cdot a}\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;a \leq -2.1147287367427253 \cdot 10^{+76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.913915923322733 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-67}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \mathbf{elif}\;a \leq 3.261086220443193 \cdot 10^{+29}:\\ \;\;\;\;\frac{z}{\frac{z \cdot a - t}{y}}\\ \mathbf{elif}\;a \leq 2.402724113426819 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error18.7
Cost976
\[\begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -7.494621510014777 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.8636588453403858 \cdot 10^{-24}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \mathbf{elif}\;z \leq -5.653779411767812 \cdot 10^{-66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.933741085068301 \cdot 10^{-28}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error28.1
Cost844
\[\begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;a \leq -4.2 \cdot 10^{-88}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-301}:\\ \;\;\;\;\left(-z\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-59}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error30.2
Cost720
\[\begin{array}{l} \mathbf{if}\;z \leq -3.9924740520655655 \cdot 10^{+63}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -2.8636588453403858 \cdot 10^{-24}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq -5.653779411767812 \cdot 10^{-66}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 5.933741085068301 \cdot 10^{-28}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
Alternative 12
Error42.0
Cost192
\[\frac{y}{a} \]

Error

Reproduce

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