Average Error: 24.7 → 8.3
Time: 27.8s
Precision: binary64
Cost: 7368
\[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
\[\begin{array}{l} t_1 := y - \frac{a - z}{t} \cdot \left(x - y\right)\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{+220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+138}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \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 (- y (* (/ (- a z) t) (- x y)))))
   (if (<= t -6.2e+220)
     t_1
     (if (<= t 1.3e+138) (fma (- y x) (/ (- z t) (- a t)) x) 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 = y - (((a - z) / t) * (x - y));
	double tmp;
	if (t <= -6.2e+220) {
		tmp = t_1;
	} else if (t <= 1.3e+138) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} 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(y - Float64(Float64(Float64(a - z) / t) * Float64(x - y)))
	tmp = 0.0
	if (t <= -6.2e+220)
		tmp = t_1;
	elseif (t <= 1.3e+138)
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = t_1;
	end
	return 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[(y - N[(N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+220], t$95$1, If[LessEqual[t, 1.3e+138], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\begin{array}{l}
t_1 := y - \frac{a - z}{t} \cdot \left(x - y\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+220}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

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


\end{array}

Error

Target

Original24.7
Target9.2
Herbie8.3
\[\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 2 regimes
  2. if t < -6.2000000000000001e220 or 1.3e138 < t

    1. Initial program 48.7

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
      Proof
      (fma.f64 (-.f64 y x) (/.f64 (-.f64 z t) (-.f64 a t)) x): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (-.f64 y x) (/.f64 (-.f64 z t) (-.f64 a t))) x)): 2 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) x): 78 points increase in error, 18 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in t around inf 24.6

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

      \[\leadsto \color{blue}{y + \frac{a - z}{t} \cdot \left(y - x\right)} \]
      Proof
      (+.f64 y (*.f64 (/.f64 (-.f64 a z) t) (-.f64 y x))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 (/.f64 (Rewrite<= unsub-neg_binary64 (+.f64 a (neg.f64 z))) t) (-.f64 y x))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 (/.f64 (+.f64 a (Rewrite<= mul-1-neg_binary64 (*.f64 -1 z))) t) (-.f64 y x))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 z) a)) t) (-.f64 y x))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 (/.f64 (+.f64 (*.f64 -1 z) (Rewrite<= *-lft-identity_binary64 (*.f64 1 a))) t) (-.f64 y x))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 (/.f64 (+.f64 (*.f64 -1 z) (*.f64 (Rewrite<= metadata-eval (neg.f64 -1)) a)) t) (-.f64 y x))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 (/.f64 (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 (*.f64 -1 z) (*.f64 -1 a))) t) (-.f64 y x))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (Rewrite<= associate-/r/_binary64 (/.f64 (-.f64 (*.f64 -1 z) (*.f64 -1 a)) (/.f64 t (-.f64 y x))))): 30 points increase in error, 33 points decrease in error
      (+.f64 y (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 (*.f64 -1 z) (*.f64 -1 a)) (-.f64 y x)) t))): 46 points increase in error, 25 points decrease in error
      (+.f64 y (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 y x) (-.f64 (*.f64 -1 z) (*.f64 -1 a)))) t)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 (-.f64 y x) (-.f64 (*.f64 -1 z) (*.f64 -1 a))) t) y)): 0 points increase in error, 0 points decrease in error

    if -6.2000000000000001e220 < t < 1.3e138

    1. Initial program 17.4

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
      Proof
      (fma.f64 (-.f64 y x) (/.f64 (-.f64 z t) (-.f64 a t)) x): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (-.f64 y x) (/.f64 (-.f64 z t) (-.f64 a t))) x)): 2 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) x): 78 points increase in error, 18 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))): 0 points increase in error, 0 points decrease in error
  3. Recombined 2 regimes into one program.
  4. Final simplification8.3

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

Alternatives

Alternative 1
Error6.6
Cost4432
\[\begin{array}{l} t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ 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 -5 \cdot 10^{-257}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y - \frac{a - z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error32.9
Cost2160
\[\begin{array}{l} t_1 := z \cdot \frac{y - x}{a - t}\\ t_2 := x - x \cdot \frac{z}{a}\\ t_3 := \left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -3.15 \cdot 10^{+121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{+32}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{+24}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1900000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3900:\\ \;\;\;\;\frac{a \cdot \left(-x\right)}{t}\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-8}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-75}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-189}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{-121}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 1600000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error35.1
Cost1504
\[\begin{array}{l} t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\ t_2 := x - x \cdot \frac{z}{a}\\ t_3 := \frac{z - a}{\frac{t}{x}}\\ \mathbf{if}\;a \leq -8.5 \cdot 10^{+121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-34}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-77}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-140}:\\ \;\;\;\;\frac{y \cdot z}{a - t}\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-188}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-103}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-7}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 720000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error35.1
Cost1504
\[\begin{array}{l} t_1 := x - x \cdot \frac{z}{a}\\ t_2 := \frac{z - a}{\frac{t}{x}}\\ \mathbf{if}\;a \leq -3.15 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-34}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-75}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-140}:\\ \;\;\;\;\frac{y \cdot z}{a - t}\\ \mathbf{elif}\;a \leq -1.26 \cdot 10^{-189}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-103}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-7}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1100000000000:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error34.9
Cost1504
\[\begin{array}{l} t_1 := x - x \cdot \frac{z}{a}\\ t_2 := \frac{z - a}{\frac{t}{x}}\\ \mathbf{if}\;a \leq -3.2 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-33}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -5.6 \cdot 10^{-75}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-140}:\\ \;\;\;\;\frac{y \cdot z}{a - t}\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-190}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-104}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-7}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 420000000000:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error35.0
Cost1504
\[\begin{array}{l} t_1 := x - x \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -3.7 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-35}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-76}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-141}:\\ \;\;\;\;\frac{y \cdot z}{a - t}\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-188}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-103}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 6000000000000:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error35.0
Cost1504
\[\begin{array}{l} t_1 := x - x \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -3.15 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.08 \cdot 10^{-35}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-76}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-139}:\\ \;\;\;\;\frac{y \cdot z}{a - t}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-188}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 8.4 \cdot 10^{-103}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\ \mathbf{elif}\;a \leq 720000000000:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error26.5
Cost1500
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + \left(y - x\right) \cdot \frac{z}{a}\\ t_3 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;a \leq -3.7 \cdot 10^{+124}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-139}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-188}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-123}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-7}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 470000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error10.0
Cost1360
\[\begin{array}{l} t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ t_2 := y - \frac{a - z}{t} \cdot \left(x - y\right)\\ \mathbf{if}\;t \leq -6.4 \cdot 10^{+220}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-229}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-282}:\\ \;\;\;\;x + \left(y - x\right) \cdot \left(\left(z - t\right) \cdot \frac{1}{a}\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+135}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error30.9
Cost1236
\[\begin{array}{l} t_1 := x - x \cdot \frac{z}{a}\\ t_2 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;a \leq -9.5 \cdot 10^{+123}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-27}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-189}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-122}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 880000000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error35.8
Cost1108
\[\begin{array}{l} t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{if}\;a \leq -3.9 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-95}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-186}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 680000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 12
Error28.2
Cost1104
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x - x \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -2.2 \cdot 10^{+125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-122}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-7}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 7000000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error16.9
Cost1096
\[\begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{-23}:\\ \;\;\;\;y - \frac{a - z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+126}:\\ \;\;\;\;x + \left(y - x\right) \cdot \left(\left(z - t\right) \cdot \frac{1}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \end{array} \]
Alternative 14
Error8.3
Cost1096
\[\begin{array}{l} t_1 := y - \frac{a - z}{t} \cdot \left(x - y\right)\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{+220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.06 \cdot 10^{+136}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error18.7
Cost968
\[\begin{array}{l} t_1 := y - \frac{a - z}{t} \cdot \left(x - y\right)\\ \mathbf{if}\;t \leq -7 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+122}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error18.6
Cost968
\[\begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{-23}:\\ \;\;\;\;y - \frac{a - z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+122}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \end{array} \]
Alternative 17
Error38.8
Cost848
\[\begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-101}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-137}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-188}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 12000000000000:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 18
Error34.5
Cost844
\[\begin{array}{l} \mathbf{if}\;a \leq -3.15 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-95}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 16000000000000:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 19
Error34.3
Cost844
\[\begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+150}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-96}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 1950000000000:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 20
Error32.7
Cost844
\[\begin{array}{l} t_1 := x - x \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -3.15 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -7.1 \cdot 10^{-96}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 4500000000000:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 21
Error19.3
Cost840
\[\begin{array}{l} t_1 := y - \frac{a - z}{\frac{t}{x}}\\ \mathbf{if}\;t \leq -8.6 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 0.0013:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 22
Error36.1
Cost328
\[\begin{array}{l} \mathbf{if}\;t \leq -7.4 \cdot 10^{+59}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+138}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 23
Error62.1
Cost64
\[0 \]
Alternative 24
Error45.5
Cost64
\[x \]

Error

Reproduce

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