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

\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-300}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t_2\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.9
Target9.4
Herbie6.5
\[\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 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 2.00000000000000012e290 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 61.8

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.00000000000000003e-300 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.00000000000000012e290

    1. Initial program 2.0

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

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

    1. Initial program 60.6

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

      \[\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}} \]
    3. Simplified6.3

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
      Proof
      (-.f64 y (*.f64 (/.f64 (-.f64 y x) t) (-.f64 z a))): 0 points increase in error, 0 points decrease in error
      (-.f64 y (Rewrite<= associate-/r/_binary64 (/.f64 (-.f64 y x) (/.f64 t (-.f64 z a))))): 31 points increase in error, 26 points decrease in error
      (-.f64 y (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z a)) t))): 45 points increase in error, 33 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
      (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 (*.f64 -1 (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (*.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 (*.f64 -1 (-.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 z (-.f64 y x))) t) (/.f64 (*.f64 a (-.f64 y x)) t)))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.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
      (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
    4. Taylor expanded in y around 0 1.4

      \[\leadsto y - \color{blue}{-1 \cdot \frac{\left(z - a\right) \cdot x}{t}} \]
    5. Simplified1.2

      \[\leadsto y - \color{blue}{x \cdot \frac{a - z}{t}} \]
      Proof
      (*.f64 x (/.f64 (-.f64 a z) t)): 0 points increase in error, 0 points decrease in error
      (*.f64 x (Rewrite=> div-sub_binary64 (-.f64 (/.f64 a t) (/.f64 z t)))): 1 points increase in error, 3 points decrease in error
      (*.f64 x (Rewrite=> sub-neg_binary64 (+.f64 (/.f64 a t) (neg.f64 (/.f64 z t))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (+.f64 (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (/.f64 a t)))) (neg.f64 (/.f64 z t)))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (Rewrite<= distribute-neg-in_binary64 (neg.f64 (+.f64 (neg.f64 (/.f64 a t)) (/.f64 z t))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (neg.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 z t) (neg.f64 (/.f64 a t)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (neg.f64 (Rewrite<= sub-neg_binary64 (-.f64 (/.f64 z t) (/.f64 a t))))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (neg.f64 (Rewrite<= div-sub_binary64 (/.f64 (-.f64 z a) t)))): 3 points increase in error, 1 points decrease in error
      (*.f64 x (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (-.f64 z a) t)))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (Rewrite=> *-commutative_binary64 (*.f64 (/.f64 (-.f64 z a) t) -1))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (Rewrite<= associate-/r/_binary64 (/.f64 (-.f64 z a) (/.f64 t -1)))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x (-.f64 z a)) (/.f64 t -1))): 46 points increase in error, 38 points decrease in error
      (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 z a) x)) (/.f64 t -1)): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-/r/_binary64 (*.f64 (/.f64 (*.f64 (-.f64 z a) x) t) -1)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 -1 (/.f64 (*.f64 (-.f64 z a) x) t))): 0 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification6.5

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

Alternatives

Alternative 1
Error6.8
Cost8904
\[\begin{array}{l} t_1 := \mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-300}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error8.5
Cost4432
\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;y - \frac{z - a}{\frac{t}{y - x}}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-300}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+298}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \end{array} \]
Alternative 3
Error6.7
Cost3144
\[\begin{array}{l} t_1 := \frac{a - t}{z - t}\\ t_2 := x + \left(\frac{y}{t_1} - \frac{x}{t_1}\right)\\ t_3 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-300}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error33.0
Cost1304
\[\begin{array}{l} t_1 := x - \frac{y \cdot t}{a}\\ t_2 := \frac{-y}{-1 + \frac{a}{t}}\\ \mathbf{if}\;t \leq -8.346541679729033 \cdot 10^{+64}:\\ \;\;\;\;y - a \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-293}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 3.7823495009990064 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8.181742105487555 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.944842118914548 \cdot 10^{+101}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error32.8
Cost1240
\[\begin{array}{l} t_1 := x - \frac{y \cdot t}{a}\\ t_2 := y - a \cdot \frac{x}{t}\\ \mathbf{if}\;t \leq -8.346541679729033 \cdot 10^{+64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-293}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.6314554375113966 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.6725457330322887 \cdot 10^{+112}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error30.8
Cost1236
\[\begin{array}{l} t_1 := x - \frac{y}{-1 + \frac{a}{t}}\\ \mathbf{if}\;t \leq -7.756499760286151 \cdot 10^{+221}:\\ \;\;\;\;y - a \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-293}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.944842118914548 \cdot 10^{+101}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error25.0
Cost1236
\[\begin{array}{l} t_1 := x - \frac{y}{-1 + \frac{a}{t}}\\ \mathbf{if}\;t \leq -7.756499760286151 \cdot 10^{+221}:\\ \;\;\;\;y - a \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -9.64387109824766 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.443618643517862 \cdot 10^{-49}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.944842118914548 \cdot 10^{+101}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error20.3
Cost1236
\[\begin{array}{l} t_1 := x - \frac{y}{-1 + \frac{a}{t}}\\ t_2 := y - x \cdot \frac{a - z}{t}\\ \mathbf{if}\;t \leq -6.280711541317693 \cdot 10^{+97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -9.64387109824766 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.443618643517862 \cdot 10^{-49}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.944842118914548 \cdot 10^{+101}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error17.4
Cost1232
\[\begin{array}{l} t_1 := x - \frac{y}{-1 + \frac{a}{t}}\\ t_2 := y - \frac{y - x}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -2.884037903822675 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -9.64387109824766 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.443618643517862 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error17.6
Cost1232
\[\begin{array}{l} t_1 := x - \frac{y}{-1 + \frac{a}{t}}\\ \mathbf{if}\;t \leq -2.884037903822675 \cdot 10^{+71}:\\ \;\;\;\;y - \frac{z - a}{\frac{t}{y - x}}\\ \mathbf{elif}\;t \leq -9.64387109824766 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.443618643517862 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z - a}}\\ \end{array} \]
Alternative 11
Error17.6
Cost1232
\[\begin{array}{l} t_1 := x - \frac{y}{-1 + \frac{a}{t}}\\ \mathbf{if}\;t \leq -2.884037903822675 \cdot 10^{+71}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -9.64387109824766 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.443618643517862 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z - a}}\\ \end{array} \]
Alternative 12
Error17.4
Cost1232
\[\begin{array}{l} \mathbf{if}\;t \leq -2.884037903822675 \cdot 10^{+71}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -9.64387109824766 \cdot 10^{-128}:\\ \;\;\;\;x - \frac{y - x}{\frac{a - t}{t}}\\ \mathbf{elif}\;t \leq 3.443618643517862 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;x - \frac{y}{-1 + \frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z - a}}\\ \end{array} \]
Alternative 13
Error37.6
Cost1176
\[\begin{array}{l} t_1 := z \cdot \frac{y - x}{a}\\ \mathbf{if}\;t \leq -8.346541679729033 \cdot 10^{+64}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-215}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-293}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-188}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.6314554375113966 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{-z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 14
Error27.0
Cost1104
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := x \cdot \frac{-z}{a - t}\\ \mathbf{if}\;z \leq -1.65 \cdot 10^{+202}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{+138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.1415624688742124 \cdot 10^{+47}:\\ \;\;\;\;x - \frac{y}{-1 + \frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error20.2
Cost1104
\[\begin{array}{l} t_1 := x - \frac{y}{-1 + \frac{a}{t}}\\ \mathbf{if}\;t \leq -6.280711541317693 \cdot 10^{+97}:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \mathbf{elif}\;t \leq -9.64387109824766 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.443618643517862 \cdot 10^{-49}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \end{array} \]
Alternative 16
Error19.5
Cost1104
\[\begin{array}{l} t_1 := x - \frac{y}{-1 + \frac{a}{t}}\\ \mathbf{if}\;t \leq -6.280711541317693 \cdot 10^{+97}:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \mathbf{elif}\;t \leq -9.64387109824766 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.443618643517862 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 6.110384043735131 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \end{array} \]
Alternative 17
Error35.6
Cost976
\[\begin{array}{l} t_1 := x - \frac{y \cdot t}{a}\\ \mathbf{if}\;t \leq -8.346541679729033 \cdot 10^{+64}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-293}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.6314554375113966 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 18
Error34.6
Cost976
\[\begin{array}{l} t_1 := x - \frac{y \cdot t}{a}\\ \mathbf{if}\;t \leq -8.346541679729033 \cdot 10^{+64}:\\ \;\;\;\;y - a \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-293}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.6314554375113966 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 19
Error36.6
Cost720
\[\begin{array}{l} \mathbf{if}\;t \leq -8.346541679729033 \cdot 10^{+64}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{-238}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-293}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 4.6314554375113966 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 20
Error35.9
Cost456
\[\begin{array}{l} \mathbf{if}\;t \leq -8.346541679729033 \cdot 10^{+64}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.6314554375113966 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 21
Error35.4
Cost328
\[\begin{array}{l} \mathbf{if}\;t \leq -8.346541679729033 \cdot 10^{+64}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 47.31397332002547:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 22
Error45.6
Cost64
\[x \]

Error

Reproduce

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