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

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

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

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

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.5
Target8.6
Herbie5.2
\[\begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} < -1.3664970889390727 \cdot 10^{-7}:\\ \;\;\;\;\left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\ \mathbf{elif}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} < 1.4754293444577233 \cdot 10^{-239}:\\ \;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\ \end{array} \]

Derivation

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

    1. Initial program 64.0

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Simplified18.7

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(y, \frac{z - t}{t - a}, y\right)} \]
      Proof
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (-.f64 t a)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (Rewrite<= *-lft-identity_binary64 (*.f64 1 (-.f64 t a)))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (*.f64 (Rewrite<= metadata-eval (/.f64 -1 -1)) (-.f64 t a))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (Rewrite<= associate-/r/_binary64 (/.f64 -1 (/.f64 -1 (-.f64 t a))))) y)): 11 points increase in error, 1 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 -1 (-.f64 t a)) -1))) y)): 1 points increase in error, 11 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 (-.f64 t a))) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 t a))) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 t) a)) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 t)) a) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 a (neg.f64 t))) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= sub-neg_binary64 (-.f64 a t)) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (Rewrite=> associate-/r/_binary64 (*.f64 (/.f64 (-.f64 z t) (-.f64 a t)) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (Rewrite<= *-commutative_binary64 (*.f64 -1 (/.f64 (-.f64 z t) (-.f64 a t)))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (Rewrite<= neg-mul-1_binary64 (neg.f64 (/.f64 (-.f64 z t) (-.f64 a t)))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (neg.f64 (/.f64 (-.f64 z t) (-.f64 a t)))) y))): 0 points increase in error, 3 points decrease in error
      (+.f64 x (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (+.f64 (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (-.f64 z t) (-.f64 a t)) y))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (+.f64 (neg.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))) y)): 47 points increase in error, 9 points decrease in error
      (+.f64 x (Rewrite<= +-commutative_binary64 (+.f64 y (neg.f64 (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite<= sub-neg_binary64 (-.f64 y (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))): 14 points increase in error, 7 points decrease in error
    3. Taylor expanded in t around inf 56.5

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

      \[\leadsto \color{blue}{\frac{y}{t} \cdot \left(z - a\right) + x} \]
      Proof
      (+.f64 (*.f64 (/.f64 y t) (-.f64 z a)) x): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 y (-.f64 z a)) t)) x): 31 points increase in error, 28 points decrease in error
      (+.f64 (/.f64 (*.f64 y (-.f64 z a)) t) (Rewrite<= +-lft-identity_binary64 (+.f64 0 x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 y (-.f64 z a)) t) (+.f64 (Rewrite<= mul0-lft_binary64 (*.f64 0 y)) x)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 y (-.f64 z a)) t) (+.f64 (*.f64 (Rewrite<= metadata-eval (+.f64 -1 1)) y) x)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 y (-.f64 z a)) t) (+.f64 (Rewrite<= distribute-rgt1-in_binary64 (+.f64 y (*.f64 -1 y))) x)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 y (-.f64 z a)) t) (Rewrite=> associate-+l+_binary64 (+.f64 y (+.f64 (*.f64 -1 y) x)))): 19 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 y (-.f64 z a)) t) (Rewrite=> +-commutative_binary64 (+.f64 (+.f64 (*.f64 -1 y) x) y))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (/.f64 (*.f64 y (-.f64 z a)) t) (+.f64 (*.f64 -1 y) x)) y)): 31 points increase in error, 6 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 (/.f64 (*.f64 y (-.f64 z a)) t) (+.f64 (*.f64 -1 y) x)))): 0 points increase in error, 0 points decrease in error
    5. Taylor expanded in y around 0 38.1

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - a\right)}{t}} + x \]
    6. Applied egg-rr19.9

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -4e-204 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999998e294

    1. Initial program 1.3

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

    if -4e-204 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 55.7

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

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

    if 9.9999999999999998e294 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 54.4

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Simplified18.0

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(y, \frac{z - t}{t - a}, y\right)} \]
      Proof
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (-.f64 t a)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (Rewrite<= *-lft-identity_binary64 (*.f64 1 (-.f64 t a)))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (*.f64 (Rewrite<= metadata-eval (/.f64 -1 -1)) (-.f64 t a))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (Rewrite<= associate-/r/_binary64 (/.f64 -1 (/.f64 -1 (-.f64 t a))))) y)): 11 points increase in error, 1 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 -1 (-.f64 t a)) -1))) y)): 1 points increase in error, 11 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 (-.f64 t a))) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 t a))) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 t) a)) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 t)) a) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 a (neg.f64 t))) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (/.f64 (-.f64 z t) (/.f64 (Rewrite<= sub-neg_binary64 (-.f64 a t)) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (Rewrite=> associate-/r/_binary64 (*.f64 (/.f64 (-.f64 z t) (-.f64 a t)) -1)) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (Rewrite<= *-commutative_binary64 (*.f64 -1 (/.f64 (-.f64 z t) (-.f64 a t)))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (fma.f64 y (Rewrite<= neg-mul-1_binary64 (neg.f64 (/.f64 (-.f64 z t) (-.f64 a t)))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (neg.f64 (/.f64 (-.f64 z t) (-.f64 a t)))) y))): 0 points increase in error, 3 points decrease in error
      (+.f64 x (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (+.f64 (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (-.f64 z t) (-.f64 a t)) y))) y)): 0 points increase in error, 0 points decrease in error
      (+.f64 x (+.f64 (neg.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))) y)): 47 points increase in error, 9 points decrease in error
      (+.f64 x (Rewrite<= +-commutative_binary64 (+.f64 y (neg.f64 (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite<= sub-neg_binary64 (-.f64 y (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))): 14 points increase in error, 7 points decrease in error
    3. Taylor expanded in z around inf 37.0

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t - a}} \]
    4. Simplified21.8

      \[\leadsto x + \color{blue}{\frac{z}{t - a} \cdot y} \]
      Proof
      (*.f64 (/.f64 z (-.f64 t a)) y): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 z (/.f64 (-.f64 t a) y))): 55 points increase in error, 36 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 z y) (-.f64 t a))): 44 points increase in error, 48 points decrease in error
      (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 y z)) (-.f64 t a)): 0 points increase in error, 0 points decrease in error
  3. Recombined 4 regimes into one program.
  4. Final simplification5.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq -\infty:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{elif}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq -4 \cdot 10^{-204}:\\ \;\;\;\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{elif}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq 0:\\ \;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\ \mathbf{elif}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq 10^{+295}:\\ \;\;\;\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t - a}\\ \end{array} \]

Alternatives

Alternative 1
Error5.4
Cost8004
\[\begin{array}{l} t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-204}:\\ \;\;\;\;x + \mathsf{fma}\left(y, \frac{z - t}{t - a}, y\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\ \mathbf{elif}\;t_1 \leq 10^{+295}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t - a}\\ \end{array} \]
Alternative 2
Error10.7
Cost1364
\[\begin{array}{l} t_1 := x + y \cdot \frac{z}{t - a}\\ t_2 := \frac{t}{a - t}\\ \mathbf{if}\;a \leq -0.01025509647256459:\\ \;\;\;\;\left(x + y\right) - z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{-151}:\\ \;\;\;\;y \cdot \left(1 + t_2\right)\\ \mathbf{elif}\;a \leq 10^{-225}:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{elif}\;a \leq 8.92006472653132 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot t_2 + \left(x + y\right)\\ \end{array} \]
Alternative 3
Error10.0
Cost1236
\[\begin{array}{l} t_1 := x + y \cdot \frac{z}{t - a}\\ t_2 := \left(x + y\right) - z \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -0.01025509647256459:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{-151}:\\ \;\;\;\;y \cdot \left(1 + \frac{t}{a - t}\right)\\ \mathbf{elif}\;a \leq 10^{-225}:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{elif}\;a \leq 3.285671407035047 \cdot 10^{+41}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error14.3
Cost1104
\[\begin{array}{l} \mathbf{if}\;a \leq -135300.70633324742:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.7956819495113058 \cdot 10^{-22}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-116}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.0783981174235899 \cdot 10^{-10}:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 5
Error14.3
Cost1104
\[\begin{array}{l} \mathbf{if}\;a \leq -135300.70633324742:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.7956819495113058 \cdot 10^{-22}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-116}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.0783981174235899 \cdot 10^{-10}:\\ \;\;\;\;x + y \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 6
Error12.2
Cost1104
\[\begin{array}{l} t_1 := x + \frac{y \cdot z}{t - a}\\ \mathbf{if}\;a \leq -135300.70633324742:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{-262}:\\ \;\;\;\;x + y \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 8.92006472653132 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 7
Error20.1
Cost976
\[\begin{array}{l} t_1 := x - a \cdot \frac{y}{t}\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{-155}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-252}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-142}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 8
Error19.5
Cost976
\[\begin{array}{l} t_1 := x - a \cdot \frac{y}{t}\\ \mathbf{if}\;t \leq -3.524329194281158 \cdot 10^{+183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.5399636900490922 \cdot 10^{-62}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 3.9698376042583525 \cdot 10^{-30}:\\ \;\;\;\;\frac{y \cdot z}{t - a}\\ \mathbf{elif}\;t \leq 1.009026070764406 \cdot 10^{+62}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error17.8
Cost976
\[\begin{array}{l} t_1 := x + z \cdot \frac{y}{t}\\ \mathbf{if}\;t \leq -1.2608906482942978 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.5399636900490922 \cdot 10^{-62}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 3.9698376042583525 \cdot 10^{-30}:\\ \;\;\;\;\frac{y \cdot z}{t - a}\\ \mathbf{elif}\;t \leq 2.533266466765433 \cdot 10^{-16}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error15.4
Cost976
\[\begin{array}{l} \mathbf{if}\;a \leq -135300.70633324742:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.7956819495113058 \cdot 10^{-22}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{-151}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.0783981174235899 \cdot 10^{-10}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 11
Error11.1
Cost840
\[\begin{array}{l} \mathbf{if}\;a \leq -3.7898467554265396 \cdot 10^{+140}:\\ \;\;\;\;\left(x + y\right) + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq 8.92006472653132 \cdot 10^{+140}:\\ \;\;\;\;x + y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 12
Error20.2
Cost720
\[\begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-155}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-267}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-252}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-144}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 13
Error15.7
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{-151}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3.459193979856991 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 14
Error20.0
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-155}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-144}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 15
Error28.7
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2022300 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))

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