Average Error: 24.6 → 8.0
Time: 14.8s
Precision: binary64
Cost: 7368
\[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
\[\begin{array}{l} t_1 := \frac{a}{t} + 1\\ \mathbf{if}\;t \leq -5.123158031866663 \cdot 10^{+129}:\\ \;\;\;\;y + t_1 \cdot \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq 2.430027280147453 \cdot 10^{+155}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + t_1 \cdot \left(\frac{y - x}{t} \cdot \left(a - z\right)\right)\\ \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 (+ (/ a t) 1.0)))
   (if (<= t -5.123158031866663e+129)
     (+ y (* t_1 (/ (- x y) (/ t (- z a)))))
     (if (<= t 2.430027280147453e+155)
       (fma (- y x) (/ (- z t) (- a t)) x)
       (+ y (* t_1 (* (/ (- y x) t) (- a z))))))))
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 = (a / t) + 1.0;
	double tmp;
	if (t <= -5.123158031866663e+129) {
		tmp = y + (t_1 * ((x - y) / (t / (z - a))));
	} else if (t <= 2.430027280147453e+155) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} else {
		tmp = y + (t_1 * (((y - x) / t) * (a - z)));
	}
	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(Float64(a / t) + 1.0)
	tmp = 0.0
	if (t <= -5.123158031866663e+129)
		tmp = Float64(y + Float64(t_1 * Float64(Float64(x - y) / Float64(t / Float64(z - a)))));
	elseif (t <= 2.430027280147453e+155)
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = Float64(y + Float64(t_1 * Float64(Float64(Float64(y - x) / t) * Float64(a - z))));
	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[(N[(a / t), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t, -5.123158031866663e+129], N[(y + N[(t$95$1 * N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.430027280147453e+155], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(t$95$1 * N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\begin{array}{l}
t_1 := \frac{a}{t} + 1\\
\mathbf{if}\;t \leq -5.123158031866663 \cdot 10^{+129}:\\
\;\;\;\;y + t_1 \cdot \frac{x - y}{\frac{t}{z - a}}\\

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

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


\end{array}

Error

Target

Original24.6
Target9.5
Herbie8.0
\[\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 t < -5.12315803186666324e129

    1. Initial program 45.8

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

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

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

      \[\leadsto \color{blue}{y - \left(\frac{a}{t} + 1\right) \cdot \frac{y - x}{\frac{t}{z - a}}} \]
      Proof
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (/.f64 (-.f64 y x) (/.f64 t (-.f64 z a))))): 0 points increase in error, 0 points decrease in error
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z a)) t)))): 35 points increase in error, 12 points decrease in error
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (/.f64 (Rewrite<= distribute-rgt-out--_binary64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) t))): 0 points increase in error, 0 points decrease in error
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (/.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 (Rewrite<= distribute-lft1-in_binary64 (+.f64 (*.f64 (/.f64 a t) (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t)) (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t)))): 1 points increase in error, 3 points decrease in error
      (-.f64 y (+.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 a (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) (*.f64 t t))) (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))): 18 points increase in error, 2 points decrease in error
      (-.f64 y (+.f64 (/.f64 (*.f64 a (-.f64 (Rewrite=> *-commutative_binary64 (*.f64 z (-.f64 y x))) (*.f64 a (-.f64 y x)))) (*.f64 t t)) (/.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 (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (Rewrite<= unpow2_binary64 (pow.f64 t 2))) (/.f64 (-.f64 (*.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 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)) (/.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 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)) (/.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<= distribute-lft-out_binary64 (+.f64 (*.f64 -1 (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2))) (*.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
      (Rewrite=> associate-+r+_binary64 (+.f64 (+.f64 y (*.f64 -1 (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)))) (*.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 (+.f64 y (Rewrite=> mul-1-neg_binary64 (neg.f64 (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2))))) (*.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 (Rewrite=> unsub-neg_binary64 (-.f64 y (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)))) (*.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 (-.f64 y (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x))) a)) (pow.f64 t 2))) (*.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 (-.f64 y (/.f64 (*.f64 (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 y x) z)) (*.f64 a (-.f64 y x))) a) (pow.f64 t 2))) (*.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 (-.f64 y (/.f64 (*.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) a) (Rewrite=> unpow2_binary64 (*.f64 t t)))) (*.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 (-.f64 y (Rewrite=> times-frac_binary64 (*.f64 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t) (/.f64 a t)))) (*.f64 -1 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))): 2 points increase in error, 18 points decrease in error
      (+.f64 (Rewrite=> cancel-sign-sub-inv_binary64 (+.f64 y (*.f64 (neg.f64 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t)) (/.f64 a t)))) (*.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 (+.f64 y (*.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))) (/.f64 a t))) (*.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 (+.f64 y (*.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 -1 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) t)) (/.f64 a t))) (*.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 (+.f64 y (*.f64 (/.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x))))) t) (/.f64 a t))) (*.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 (+.f64 y (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (*.f64 t t)))) (*.f64 -1 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))): 18 points increase in error, 2 points decrease in error
      (+.f64 (+.f64 y (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (Rewrite<= unpow2_binary64 (pow.f64 t 2)))) (*.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 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) y)) (*.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 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) y) (*.f64 -1 (/.f64 (-.f64 (Rewrite=> *-commutative_binary64 (*.f64 z (-.f64 y x))) (*.f64 a (-.f64 y x))) t))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) y) (*.f64 -1 (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (*.f64 z (-.f64 y x)) t) (/.f64 (*.f64 a (-.f64 y x)) t))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) 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 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) 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)) (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) y))) (*.f64 -1 (/.f64 (*.f64 a (-.f64 y x)) t))): 0 points increase in error, 0 points decrease in error

    if -5.12315803186666324e129 < t < 2.4300272801474528e155

    1. Initial program 15.0

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Simplified7.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)): 3 points increase in error, 1 points decrease in error
      (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) x): 87 points increase in error, 15 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

    if 2.4300272801474528e155 < t

    1. Initial program 47.9

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

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

      \[\leadsto \color{blue}{y - \left(\frac{a}{t} + 1\right) \cdot \left(\frac{y - x}{t} \cdot \left(z - a\right)\right)} \]
      Proof
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (*.f64 (/.f64 (-.f64 y x) t) (-.f64 z a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (Rewrite<= associate-/r/_binary64 (/.f64 (-.f64 y x) (/.f64 t (-.f64 z a)))))): 14 points increase in error, 18 points decrease in error
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 y x) (-.f64 z a)) t)))): 35 points increase in error, 12 points decrease in error
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (/.f64 (Rewrite<= distribute-rgt-out--_binary64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) t))): 0 points increase in error, 0 points decrease in error
      (-.f64 y (*.f64 (+.f64 (/.f64 a t) 1) (/.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 (Rewrite<= distribute-rgt1-in_binary64 (+.f64 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t) (*.f64 (/.f64 a t) (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))))): 1 points increase in error, 3 points decrease in error
      (-.f64 y (+.f64 (/.f64 (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 z (-.f64 y x))) (*.f64 a (-.f64 y x))) t) (*.f64 (/.f64 a t) (/.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 (/.f64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x))) t) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 a (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) (*.f64 t t))))): 18 points increase in error, 2 points decrease in error
      (-.f64 y (+.f64 (/.f64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x))) t) (/.f64 (*.f64 a (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) (Rewrite<= unpow2_binary64 (pow.f64 t 2))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 y (neg.f64 (+.f64 (/.f64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x))) t) (/.f64 (*.f64 a (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (+.f64 (/.f64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x))) t) (/.f64 (*.f64 a (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 -1 (+.f64 (/.f64 (-.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 y x) z)) (*.f64 a (-.f64 y x))) t) (/.f64 (*.f64 a (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) (pow.f64 t 2))))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 -1 (+.f64 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t) (/.f64 (*.f64 a (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 z (-.f64 y x))) (*.f64 a (-.f64 y x)))) (pow.f64 t 2))))): 0 points increase in error, 0 points decrease in error
      (+.f64 y (*.f64 -1 (Rewrite=> +-commutative_binary64 (+.f64 (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)) (/.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<= distribute-lft-out_binary64 (+.f64 (*.f64 -1 (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2))) (*.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
      (Rewrite=> associate-+r+_binary64 (+.f64 (+.f64 y (*.f64 -1 (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)))) (*.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 (+.f64 y (Rewrite=> mul-1-neg_binary64 (neg.f64 (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2))))) (*.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 (Rewrite=> unsub-neg_binary64 (-.f64 y (/.f64 (*.f64 a (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x)))) (pow.f64 t 2)))) (*.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 (-.f64 y (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 (*.f64 z (-.f64 y x)) (*.f64 a (-.f64 y x))) a)) (pow.f64 t 2))) (*.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 (-.f64 y (/.f64 (*.f64 (-.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 y x) z)) (*.f64 a (-.f64 y x))) a) (pow.f64 t 2))) (*.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 (-.f64 y (/.f64 (*.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) a) (Rewrite=> unpow2_binary64 (*.f64 t t)))) (*.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 (-.f64 y (Rewrite=> times-frac_binary64 (*.f64 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t) (/.f64 a t)))) (*.f64 -1 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))): 2 points increase in error, 18 points decrease in error
      (+.f64 (Rewrite=> cancel-sign-sub-inv_binary64 (+.f64 y (*.f64 (neg.f64 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t)) (/.f64 a t)))) (*.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 (+.f64 y (*.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))) (/.f64 a t))) (*.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 (+.f64 y (*.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 -1 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x)))) t)) (/.f64 a t))) (*.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 (+.f64 y (*.f64 (/.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x))))) t) (/.f64 a t))) (*.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 (+.f64 y (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (*.f64 t t)))) (*.f64 -1 (/.f64 (-.f64 (*.f64 (-.f64 y x) z) (*.f64 a (-.f64 y x))) t))): 18 points increase in error, 2 points decrease in error
      (+.f64 (+.f64 y (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (Rewrite<= unpow2_binary64 (pow.f64 t 2)))) (*.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 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) y)) (*.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 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) 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 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) 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 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) 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 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) 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)) (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 (*.f64 (-.f64 y x) z)) (*.f64 -1 (*.f64 a (-.f64 y x)))) a) (pow.f64 t 2)) y))) (*.f64 -1 (/.f64 (*.f64 a (-.f64 y x)) t))): 0 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification8.0

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

Alternatives

Alternative 1
Error20.2
Cost1104
\[\begin{array}{l} \mathbf{if}\;t \leq -1.2642221319952192 \cdot 10^{+104}:\\ \;\;\;\;y + \frac{x}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -6.656604804651459 \cdot 10^{+25}:\\ \;\;\;\;x - \frac{y}{\frac{a}{t} + -1}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-41}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 1.7935992381310722 \cdot 10^{+47}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\ \end{array} \]
Alternative 2
Error8.1
Cost1096
\[\begin{array}{l} \mathbf{if}\;t \leq -1.64150010901097 \cdot 10^{+107}:\\ \;\;\;\;y - \left(y - x\right) \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 2.430027280147453 \cdot 10^{+155}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \end{array} \]
Alternative 3
Error28.0
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -7.593640540488542 \cdot 10^{-23}:\\ \;\;\;\;y + \frac{x \cdot z}{t}\\ \mathbf{elif}\;t \leq 1.7935992381310722 \cdot 10^{+47}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \end{array} \]
Alternative 4
Error35.6
Cost328
\[\begin{array}{l} \mathbf{if}\;t \leq -4.111676896966894 \cdot 10^{+89}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.1246132749892606 \cdot 10^{+88}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 5
Error45.9
Cost64
\[y \]

Error

Reproduce

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