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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-242}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.6
Target9.0
Herbie7.2
\[\begin{array}{l} \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \end{array} \]

Derivation

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

    1. Initial program 64.0

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

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a - t}{z - t}}} \]
      Proof
      (+.f64 x (/.f64 (-.f64 y x) (/.f64 (-.f64 a t) (-.f64 z t)))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))): 81 points increase in error, 23 points decrease in error
    3. Taylor expanded in t around inf 39.7

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

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
      Proof
      (-.f64 y (/.f64 (-.f64 y x) (/.f64 t (-.f64 z a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 y (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z a)) t))): 37 points increase in error, 32 points decrease in error
      (-.f64 y (/.f64 (Rewrite<= distribute-rgt-out--_binary64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) t)): 0 points increase in error, 1 points decrease in error
      (-.f64 y (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (*.f64 z (-.f64 y x)) t) (/.f64 (*.f64 a (-.f64 y x)) t)))): 1 points increase in error, 0 points decrease in error
      (-.f64 y (-.f64 (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 y x) z)) t) (/.f64 (*.f64 a (-.f64 y x)) t))): 0 points increase in error, 0 points decrease in error
      (-.f64 y (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))): 0 points increase in error, 1 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 y (neg.f64 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t)))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t)))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 -1 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) t))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (/.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x))))) t)): 0 points increase in error, 0 points decrease in error
      (+.f64 y (/.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (Rewrite=> mul-1-neg_binary64 (neg.f64 (*.f64 a (-.f64 y x))))) t)): 0 points increase in error, 0 points decrease in error
      (+.f64 y (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) t) (/.f64 (neg.f64 (*.f64 a (-.f64 y x))) t)))): 1 points increase in error, 0 points decrease in error
      (+.f64 y (-.f64 (/.f64 (*.f64 -1 (Rewrite<= *-commutative_binary64 (*.f64 z (-.f64 y x)))) t) (/.f64 (neg.f64 (*.f64 a (-.f64 y x))) t))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (-.f64 (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 (*.f64 z (-.f64 y x)) t))) (/.f64 (neg.f64 (*.f64 a (-.f64 y x))) t))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (-.f64 (*.f64 -1 (/.f64 (*.f64 z (-.f64 y x)) t)) (/.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 a (-.f64 y x)))) t))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (-.f64 (*.f64 -1 (/.f64 (*.f64 z (-.f64 y x)) t)) (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 (*.f64 a (-.f64 y x)) t))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 y (*.f64 -1 (/.f64 (*.f64 z (-.f64 y x)) t))) (*.f64 -1 (/.f64 (*.f64 a (-.f64 y x)) t)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 (*.f64 z (-.f64 y x)) t)) y)) (*.f64 -1 (/.f64 (*.f64 a (-.f64 y x)) t))): 0 points increase in error, 0 points decrease in error

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2e-242 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.00000000000000011e301

    1. Initial program 1.8

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

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

    1. Initial program 56.3

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - t}, \left(y - x\right) \cdot \left(z - t\right), x\right)} \]
    3. Taylor expanded in t around -inf 4.8

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

      \[\leadsto \color{blue}{y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
      Proof
      (-.f64 y (/.f64 (*.f64 (-.f64 y x) (-.f64 z a)) t)): 0 points increase in error, 0 points decrease in error
      (-.f64 y (/.f64 (Rewrite<= distribute-rgt-out--_binary64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) t)): 0 points increase in error, 1 points decrease in error
      (-.f64 y (/.f64 (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 y x) z)) (*.f64 a (-.f64 y x))) t)): 0 points increase in error, 0 points decrease in error
      (-.f64 y (/.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (*.f64 (-.f64 y x) z) (neg.f64 (*.f64 a (-.f64 y x))))) t)): 0 points increase in error, 0 points decrease in error
      (-.f64 y (/.f64 (+.f64 (*.f64 (-.f64 y x) z) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 a (-.f64 y x))))) t)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 y (neg.f64 (/.f64 (+.f64 (*.f64 (-.f64 y x) z) (*.f64 -1 (*.f64 a (-.f64 y x)))) t)))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (+.f64 (*.f64 (-.f64 y x) z) (*.f64 -1 (*.f64 a (-.f64 y x)))) t)))): 0 points increase in error, 0 points decrease in error

    if 2.00000000000000011e301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 62.8

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
      Proof
      (+.f64 x (*.f64 (/.f64 (-.f64 y x) (-.f64 a t)) (-.f64 z t))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))): 82 points increase in error, 29 points decrease in error
  3. Recombined 4 regimes into one program.
  4. Final simplification7.2

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

Alternatives

Alternative 1
Error7.4
Cost3532
\[\begin{array}{l} t_1 := x - \frac{\left(y - x\right) \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-242}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \end{array} \]
Alternative 2
Error25.0
Cost1760
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := x + \frac{x - y}{\frac{a - t}{t}}\\ \mathbf{if}\;a \leq -2.7 \cdot 10^{+202}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-17}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-124}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+51}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+226}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error17.3
Cost1492
\[\begin{array}{l} t_1 := x + \frac{1}{a - t} \cdot \left(y \cdot \left(z - t\right)\right)\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+100}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-51}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-110}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\ \end{array} \]
Alternative 4
Error37.9
Cost1372
\[\begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-68}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-299}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-212}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 34000:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+24}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+101}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 5
Error32.4
Cost1368
\[\begin{array}{l} t_1 := z \cdot \frac{y - x}{a - t}\\ t_2 := y \cdot \frac{-t}{a - t}\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{-25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-118}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-157}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.3 \cdot 10^{-236}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-164}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+21}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error32.4
Cost1368
\[\begin{array}{l} t_1 := z \cdot \frac{y - x}{a - t}\\ t_2 := y \cdot \frac{-t}{a - t}\\ \mathbf{if}\;z \leq -1 \cdot 10^{-31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-118}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -2.85 \cdot 10^{-154}:\\ \;\;\;\;x \cdot \left(1 + \frac{t}{a - t}\right)\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-235}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-164}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 1.68 \cdot 10^{+19}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error37.1
Cost1240
\[\begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{-68}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-299}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-203}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-65}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-25}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 330000:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 8
Error27.8
Cost1236
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+244}:\\ \;\;\;\;y \cdot \frac{-t}{a - t}\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 38000:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t \leq 11600000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error24.5
Cost1236
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+244}:\\ \;\;\;\;y \cdot \frac{-t}{a - t}\\ \mathbf{elif}\;t \leq -1.82 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-19}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1000000:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t \leq 1700000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error24.4
Cost1236
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{if}\;t \leq -1.1 \cdot 10^{+244}:\\ \;\;\;\;y \cdot \frac{-t}{a - t}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 34000:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t \leq 1700000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error24.0
Cost1236
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+211}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a}{t}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 34000:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t \leq 1850000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error23.6
Cost1232
\[\begin{array}{l} t_1 := y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{if}\;t \leq -5.2 \cdot 10^{+165}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{+32}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error36.8
Cost1112
\[\begin{array}{l} \mathbf{if}\;a \leq -7800000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-82}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-82}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-121}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-239}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-273}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 9.4 \cdot 10^{+150}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 14
Error24.3
Cost1104
\[\begin{array}{l} t_1 := y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{if}\;t \leq -4.6 \cdot 10^{+167}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+29}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error10.5
Cost1096
\[\begin{array}{l} t_1 := y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -1.85 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+240}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error29.1
Cost1040
\[\begin{array}{l} t_1 := y \cdot \frac{-t}{a - t}\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 240000:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t \leq 10^{+18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error32.0
Cost976
\[\begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-68}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 280000:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+72}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 18
Error31.8
Cost976
\[\begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-68}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 680000:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.58 \cdot 10^{+72}:\\ \;\;\;\;\frac{z}{\frac{a - t}{y}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 19
Error31.9
Cost976
\[\begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{-68}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 65000:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+75}:\\ \;\;\;\;\frac{z}{\frac{a - t}{y}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 20
Error17.7
Cost968
\[\begin{array}{l} t_1 := y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{-52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 21
Error18.0
Cost968
\[\begin{array}{l} t_1 := y + \frac{a - z}{\frac{t}{y - x}}\\ \mathbf{if}\;t \leq -1.3 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.42 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 22
Error37.9
Cost716
\[\begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{-68}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-300}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-215}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-88}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 23
Error38.1
Cost716
\[\begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{-68}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.35 \cdot 10^{-299}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-206}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-88}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 24
Error37.4
Cost328
\[\begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{-71}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-88}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 25
Error46.2
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2022325 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

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