Average Error: 16.3 → 4.7
Time: 14.4s
Precision: binary64
Cost: 4432
\[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
\[\begin{array}{l} t_1 := x + \left(z - a\right) \cdot \frac{y}{t}\\ t_2 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{-235}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t_2 \leq 10^{+300}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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 (* (- z a) (/ y t))))
        (t_2 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -5e-235)
       t_2
       (if (<= t_2 0.0)
         (+ x (/ (* y (- z a)) t))
         (if (<= t_2 1e+300) t_2 t_1))))))
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 + ((z - a) * (y / t));
	double t_2 = (x + y) + ((y * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -5e-235) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = x + ((y * (z - a)) / t);
	} else if (t_2 <= 1e+300) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	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 + ((z - a) * (y / t));
	double t_2 = (x + y) + ((y * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -5e-235) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = x + ((y * (z - a)) / t);
	} else if (t_2 <= 1e+300) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	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 + ((z - a) * (y / t))
	t_2 = (x + y) + ((y * (t - z)) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -5e-235:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = x + ((y * (z - a)) / t)
	elif t_2 <= 1e+300:
		tmp = t_2
	else:
		tmp = t_1
	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(x + Float64(Float64(z - a) * Float64(y / t)))
	t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -5e-235)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t));
	elseif (t_2 <= 1e+300)
		tmp = t_2;
	else
		tmp = t_1;
	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 + ((z - a) * (y / t));
	t_2 = (x + y) + ((y * (t - z)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -5e-235)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = x + ((y * (z - a)) / t);
	elseif (t_2 <= 1e+300)
		tmp = t_2;
	else
		tmp = t_1;
	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[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-235], t$95$2, If[LessEqual[t$95$2, 0.0], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+300], t$95$2, t$95$1]]]]]]
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\begin{array}{l}
t_1 := x + \left(z - a\right) \cdot \frac{y}{t}\\
t_2 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.3
Target8.7
Herbie4.7
\[\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 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or 1.0000000000000001e300 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 61.0

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

      \[\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)): 6 points increase in error, 6 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)): 6 points increase in error, 6 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))): 1 points increase in error, 1 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)): 49 points increase in error, 10 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)))): 21 points increase in error, 7 points decrease in error
    3. Taylor expanded in t around inf 55.9

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

      \[\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): 27 points increase in error, 20 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)))): 23 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)): 27 points increase in error, 11 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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -4.9999999999999998e-235 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.0000000000000001e300

    1. Initial program 1.5

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

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

    1. Initial program 58.3

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

      \[\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)): 6 points increase in error, 6 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)): 6 points increase in error, 6 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))): 1 points increase in error, 1 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)): 49 points increase in error, 10 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)))): 21 points increase in error, 7 points decrease in error
    3. Taylor expanded in t around inf 59.9

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

      \[\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): 27 points increase in error, 20 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)))): 23 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)): 27 points increase in error, 11 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 2.0

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - a\right)}{t}} + x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification4.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq -\infty:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq -5 \cdot 10^{-235}:\\ \;\;\;\;\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 \left(z - a\right)}{t}\\ \mathbf{elif}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq 10^{+300}:\\ \;\;\;\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \end{array} \]

Alternatives

Alternative 1
Error5.2
Cost8904
\[\begin{array}{l} t_1 := x + \mathsf{fma}\left(y, \frac{z - t}{t - a}, y\right)\\ t_2 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error11.3
Cost1236
\[\begin{array}{l} t_1 := x + y \cdot \frac{z}{t - a}\\ \mathbf{if}\;a \leq -3.778146315230698 \cdot 10^{+119}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.1616979126306147 \cdot 10^{+65}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.994844279153727 \cdot 10^{+23}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 10^{-219}:\\ \;\;\;\;x + \frac{y \cdot z}{t - a}\\ \mathbf{elif}\;a \leq 1.0882842756320094 \cdot 10^{+175}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 3
Error15.7
Cost1108
\[\begin{array}{l} \mathbf{if}\;a \leq -8.787807453946963 \cdot 10^{+32}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3.2545409116364424 \cdot 10^{-74}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 8.785363947631768 \cdot 10^{+88}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7.054989824342834 \cdot 10^{+114}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 2.12014759799818 \cdot 10^{+144}:\\ \;\;\;\;y - z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 4
Error9.5
Cost1104
\[\begin{array}{l} t_1 := \left(x + y\right) - z \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -4214030054943969.5:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{-219}:\\ \;\;\;\;x + \frac{y \cdot z}{t - a}\\ \mathbf{elif}\;a \leq 8.003323500230787 \cdot 10^{-96}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 5.90236986094371 \cdot 10^{+63}:\\ \;\;\;\;x + y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error24.2
Cost976
\[\begin{array}{l} \mathbf{if}\;z \leq -4.0981511186209807 \cdot 10^{-29}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -1.4390136275394494 \cdot 10^{-112}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.57754132777008 \cdot 10^{-172}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -3.941230753090808 \cdot 10^{-201}:\\ \;\;\;\;\frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;z \leq -2.794508281066266 \cdot 10^{-306}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 6
Error14.1
Cost840
\[\begin{array}{l} \mathbf{if}\;a \leq -8.787807453946963 \cdot 10^{+32}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3.2545409116364424 \cdot 10^{-74}:\\ \;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 7
Error15.0
Cost840
\[\begin{array}{l} t_1 := x + \left(z - a\right) \cdot \frac{y}{t}\\ \mathbf{if}\;t \leq -2.2809849630464558 \cdot 10^{+53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.462849520098056 \cdot 10^{-65}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error10.9
Cost840
\[\begin{array}{l} \mathbf{if}\;a \leq -3.778146315230698 \cdot 10^{+119}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.0882842756320094 \cdot 10^{+175}:\\ \;\;\;\;x + y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 9
Error14.6
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -8.787807453946963 \cdot 10^{+32}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3.2545409116364424 \cdot 10^{-74}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 10
Error20.1
Cost456
\[\begin{array}{l} \mathbf{if}\;a \leq -3.9805335784510744 \cdot 10^{-75}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.4569978073507062 \cdot 10^{-176}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 11
Error28.6
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -1.5150373758736632 \cdot 10^{-56}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -4.066657020896651 \cdot 10^{-306}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 12
Error51.3
Cost64
\[y \]

Error

Reproduce

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