Average Error: 14.9 → 3.8
Time: 45.7s
Precision: binary64
Cost: 8904
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
\[\begin{array}{l} t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- t x) (/ (- y z) (- a z)) x))
        (t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_2 -1e-305) t_1 (if (<= t_2 0.0) (+ t (* (/ x z) (- y a))) t_1))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((t - x), ((y - z) / (a - z)), x);
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_2 <= -1e-305) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + ((x / z) * (y - a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
end
function code(x, y, z, t, a)
	t_1 = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x)
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_2 <= -1e-305)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(x / z) * Float64(y - a)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-305], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-305}:\\
\;\;\;\;t_1\\

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

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


\end{array}

Error

Derivation

  1. Split input into 2 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999996e-306 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 7.7

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
      Proof
      (fma.f64 (-.f64 t x) (/.f64 (-.f64 y z) (-.f64 a z)) x): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (-.f64 t x) (/.f64 (-.f64 y z) (-.f64 a z))) x)): 5 points increase in error, 1 points decrease in error
      (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (-.f64 t x) (-.f64 y z)) (-.f64 a z))) x): 96 points increase in error, 9 points decrease in error
      (+.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 y z) (-.f64 t x))) (-.f64 a z)) x): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= associate-*r/_binary64 (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) x): 32 points increase in error, 96 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))): 0 points increase in error, 0 points decrease in error

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

    1. Initial program 61.8

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

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

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

      \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Applied egg-rr2.2

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{1}{y - a} \cdot z}} \]
    6. Taylor expanded in t around 0 12.0

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

      \[\leadsto t - \color{blue}{\frac{x}{z} \cdot \left(a - y\right)} \]
      Proof
      (*.f64 (/.f64 x z) (-.f64 a y)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 x z) (Rewrite=> sub-neg_binary64 (+.f64 a (neg.f64 y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 x z) (+.f64 (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 a))) (neg.f64 y))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 x z) (Rewrite<= distribute-neg-in_binary64 (neg.f64 (+.f64 (neg.f64 a) y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 x z) (neg.f64 (Rewrite<= +-commutative_binary64 (+.f64 y (neg.f64 a))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 x z) (neg.f64 (Rewrite<= sub-neg_binary64 (-.f64 y a)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (/.f64 x z) (-.f64 y a)))): 0 points increase in error, 0 points decrease in error
      (neg.f64 (Rewrite<= associate-/r/_binary64 (/.f64 x (/.f64 z (-.f64 y a))))): 58 points increase in error, 41 points decrease in error
      (neg.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 x (-.f64 y a)) z))): 50 points increase in error, 47 points decrease in error
      (neg.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 y a) x)) z)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (*.f64 (-.f64 y a) x) z))): 0 points increase in error, 0 points decrease in error
  3. Recombined 2 regimes into one program.
  4. Final simplification3.8

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

Alternatives

Alternative 1
Error6.7
Cost3660
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-222}:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y - a}{z}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+302}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}\\ \end{array} \]
Alternative 2
Error3.8
Cost2888
\[\begin{array}{l} t_1 := x + \frac{1}{\frac{a - z}{y - z} \cdot \frac{1}{t - x}}\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error7.3
Cost2632
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-222}:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \end{array} \]
Alternative 4
Error14.9
Cost1760
\[\begin{array}{l} t_1 := x + \frac{1}{\frac{a - z}{y \cdot \left(t - x\right)}}\\ t_2 := x + t \cdot \frac{y - z}{a - z}\\ t_3 := t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{if}\;z \leq -1.361816749560688 \cdot 10^{+159}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-104}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 10^{-207}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-70}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 10^{-40}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 46000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3236429707731397 \cdot 10^{+73}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y - a}{z}\\ \end{array} \]
Alternative 5
Error27.4
Cost1500
\[\begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ t_2 := t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{if}\;a \leq -3.081315860114551 \cdot 10^{+240}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;a \leq -3.0927206113092226 \cdot 10^{+172}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -2.164517608939435 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5.4 \cdot 10^{-67}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-94}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 6.718117601367533 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error19.8
Cost1496
\[\begin{array}{l} t_1 := x + \frac{t - x}{\frac{a}{y - z}}\\ t_2 := t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{if}\;z \leq -1.306865675195793 \cdot 10^{+125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.3009545643412528 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-40}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-30}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 3.304544904237476 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\ \end{array} \]
Alternative 7
Error17.6
Cost1496
\[\begin{array}{l} t_1 := x + \frac{t - x}{\frac{a}{y - z}}\\ t_2 := t + \frac{a - y}{\frac{z}{t - x}}\\ \mathbf{if}\;z \leq -1.306865675195793 \cdot 10^{+125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.3009545643412528 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-30}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 3.304544904237476 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error17.1
Cost1496
\[\begin{array}{l} t_1 := x + \frac{t - x}{\frac{a}{y - z}}\\ t_2 := t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{if}\;z \leq -1.306865675195793 \cdot 10^{+125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.3009545643412528 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.304544904237476 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error17.1
Cost1496
\[\begin{array}{l} t_1 := x + \frac{t - x}{\frac{a}{y - z}}\\ t_2 := t + \frac{x - t}{\frac{z}{y - a}}\\ t_3 := t + \left(x - t\right) \cdot \frac{y - a}{z}\\ \mathbf{if}\;z \leq -1.306865675195793 \cdot 10^{+125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.3009545643412528 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-35}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.304544904237476 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 10
Error17.0
Cost1496
\[\begin{array}{l} t_1 := x + \frac{t - x}{\frac{a}{y - z}}\\ t_2 := t + \frac{x - t}{\frac{z}{y - a}}\\ t_3 := t + \left(x - t\right) \cdot \frac{y - a}{z}\\ \mathbf{if}\;z \leq -1.306865675195793 \cdot 10^{+125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.3009545643412528 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-35}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.778594459751128 \cdot 10^{+57}:\\ \;\;\;\;x - \frac{z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 11
Error25.7
Cost1368
\[\begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;a \leq -3.081315860114551 \cdot 10^{+240}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;a \leq -3.0927206113092226 \cdot 10^{+172}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -2.164517608939435 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-94}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 6.569571020087046 \cdot 10^{+106}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;a \leq 6.718117601367533 \cdot 10^{+111}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error21.9
Cost1368
\[\begin{array}{l} t_1 := t + \frac{x}{z} \cdot \left(y - a\right)\\ t_2 := x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -2.164517608939435 \cdot 10^{+37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-94}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 6.569571020087046 \cdot 10^{+106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.718117601367533 \cdot 10^{+111}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error21.0
Cost1368
\[\begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\ t_2 := t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{if}\;z \leq -1.8559725556906693 \cdot 10^{+90}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.3009545643412528 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-40}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-30}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 4.778594459751128 \cdot 10^{+57}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\ \end{array} \]
Alternative 14
Error13.7
Cost1232
\[\begin{array}{l} t_1 := x + t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.361816749560688 \cdot 10^{+159}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-207}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.3236429707731397 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y - a}{z}\\ \end{array} \]
Alternative 15
Error27.6
Cost1104
\[\begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;a \leq -3.081315860114551 \cdot 10^{+240}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;a \leq -3.0927206113092226 \cdot 10^{+172}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -2.164517608939435 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.718117601367533 \cdot 10^{+111}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error9.8
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -1.361816749560688 \cdot 10^{+159}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 4.778594459751128 \cdot 10^{+57}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y - a}{z}\\ \end{array} \]
Alternative 17
Error36.6
Cost1044
\[\begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-33}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.778594459751128 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.811350671608306 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{elif}\;z \leq 3.8923356125689144 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.496128879218712 \cdot 10^{+133}:\\ \;\;\;\;\frac{-x}{\frac{z}{a}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 18
Error36.6
Cost1044
\[\begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-33}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{elif}\;z \leq 4.778594459751128 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.811350671608306 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{elif}\;z \leq 3.8923356125689144 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.496128879218712 \cdot 10^{+133}:\\ \;\;\;\;\frac{-x}{\frac{z}{a}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 19
Error35.1
Cost1044
\[\begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{-40}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{elif}\;z \leq 4.778594459751128 \cdot 10^{+57}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;z \leq 7.811350671608306 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{elif}\;z \leq 3.8923356125689144 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.496128879218712 \cdot 10^{+133}:\\ \;\;\;\;\frac{-x}{\frac{z}{a}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 20
Error35.8
Cost976
\[\begin{array}{l} t_1 := x - y \cdot \frac{x}{a}\\ \mathbf{if}\;a \leq -3.081315860114551 \cdot 10^{+240}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.0927206113092226 \cdot 10^{+172}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-67}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;a \leq 1.0086762029820185 \cdot 10^{+36}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 21
Error34.1
Cost976
\[\begin{array}{l} t_1 := x - y \cdot \frac{x}{a}\\ \mathbf{if}\;a \leq -3.081315860114551 \cdot 10^{+240}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.0927206113092226 \cdot 10^{+172}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -2.169883785435105 \cdot 10^{+39}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;a \leq 1.0086762029820185 \cdot 10^{+36}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 22
Error31.0
Cost844
\[\begin{array}{l} t_1 := t - \frac{x \cdot a}{z}\\ \mathbf{if}\;z \leq -5.1 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3630020714518968 \cdot 10^{+27}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 7.811350671608306 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 23
Error30.5
Cost712
\[\begin{array}{l} t_1 := t - \frac{x \cdot a}{z}\\ \mathbf{if}\;z \leq -5.1 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3630020714518968 \cdot 10^{+27}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 24
Error35.9
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -2.169883785435105 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.075806864926343 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 25
Error45.6
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2022300 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))