?

Average Error: 24.3 → 7.1
Time: 33.3s
Precision: binary64
Cost: 8905

?

\[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(z - t\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-253} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \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) (- z t)) (- a t)))))
   (if (or (<= t_1 -5e-253) (not (<= t_1 0.0)))
     (fma (/ (- z t) (- a t)) (- y x) x)
     (+ y (/ (- x y) (/ t (- z a)))))))
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) * (z - t)) / (a - t));
	double tmp;
	if ((t_1 <= -5e-253) || !(t_1 <= 0.0)) {
		tmp = fma(((z - t) / (a - t)), (y - x), x);
	} else {
		tmp = y + ((x - y) / (t / (z - a)));
	}
	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(z - t)) / Float64(a - t)))
	tmp = 0.0
	if ((t_1 <= -5e-253) || !(t_1 <= 0.0))
		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x);
	else
		tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a))));
	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[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-253], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $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(z - t\right)}{a - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-253} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\

\mathbf{else}:\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\


\end{array}

Error?

Target

Original24.3
Target9.3
Herbie7.1
\[\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 (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999971e-253 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 21.2

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
      Proof

      [Start]21.2

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

      +-commutative [=>]21.2

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

      associate-*r/ [<=]7.3

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

      *-commutative [<=]7.3

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

      fma-def [=>]7.3

      \[ \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]

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

    1. Initial program 56.0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
      Proof

      [Start]56.0

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

      +-commutative [=>]56.0

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

      associate-*l/ [<=]57.0

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

      fma-def [=>]56.7

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

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

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

      [Start]4.9

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

      mul-1-neg [=>]4.9

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

      unsub-neg [=>]4.9

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

      +-commutative [=>]4.9

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

      associate-*r* [=>]4.9

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

      distribute-rgt-out [=>]4.9

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

      associate-/l* [=>]4.8

      \[ y - \color{blue}{\frac{y - x}{\frac{t}{z + -1 \cdot a}}} \]

      mul-1-neg [=>]4.8

      \[ y - \frac{y - x}{\frac{t}{z + \color{blue}{\left(-a\right)}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification7.1

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

Alternatives

Alternative 1
Error7.2
Cost5332
\[\begin{array}{l} t_1 := x - \frac{y - x}{a - t} \cdot \left(t - z\right)\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+278}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-221}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t_2 \leq 10^{+275}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error7.0
Cost2633
\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-253} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \end{array} \]
Alternative 3
Error30.5
Cost2161
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := y + x \cdot \frac{z}{t}\\ t_3 := \left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{if}\;t \leq -3.85 \cdot 10^{+149}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-149}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-186}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-134}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-82}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-23}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{+79} \lor \neg \left(t \leq 5.2 \cdot 10^{+158}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error30.5
Cost2161
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := y + x \cdot \frac{z}{t}\\ t_3 := \left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{if}\;t \leq -5.4 \cdot 10^{+149}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-149}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-186}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-133}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-80}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.4 \cdot 10^{+79} \lor \neg \left(t \leq 5.5 \cdot 10^{+160}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error30.5
Cost2161
\[\begin{array}{l} t_1 := \left(y - x\right) \cdot \frac{z}{a - t}\\ t_2 := y \cdot \frac{z - t}{a - t}\\ t_3 := y + x \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{+149}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{+21}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-11}:\\ \;\;\;\;x + \frac{t}{\frac{a - t}{x}}\\ \mathbf{elif}\;t \leq -1.46 \cdot 10^{-149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.65 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-135}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-80}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+79} \lor \neg \left(t \leq 1.4 \cdot 10^{+159}\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error38.9
Cost1768
\[\begin{array}{l} t_1 := z \cdot \frac{y}{a - t}\\ t_2 := z \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -230000000000:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-75}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-118}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+31}:\\ \;\;\;\;x - \left(x - y\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+162}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 7
Error36.7
Cost1636
\[\begin{array}{l} t_1 := y - y \cdot \frac{z}{t}\\ t_2 := \frac{z - a}{\frac{t}{x}}\\ \mathbf{if}\;t \leq -620000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.35 \cdot 10^{-122}:\\ \;\;\;\;z \cdot \frac{-x}{a - t}\\ \mathbf{elif}\;t \leq -2.85 \cdot 10^{-148}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-186}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-22}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 30000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+171}:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+197}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error22.7
Cost1633
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := y + x \cdot \frac{z}{t}\\ t_3 := x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{if}\;t \leq -1.55 \cdot 10^{+149}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -400:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-45}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+81} \lor \neg \left(t \leq 2.8 \cdot 10^{+160}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error22.1
Cost1633
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := y + x \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -5.9 \cdot 10^{+149}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1150:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-45}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+80} \lor \neg \left(t \leq 7.2 \cdot 10^{+159}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error35.8
Cost1504
\[\begin{array}{l} \mathbf{if}\;t \leq -7000000000:\\ \;\;\;\;y - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-123}:\\ \;\;\;\;z \cdot \frac{-x}{a - t}\\ \mathbf{elif}\;t \leq -2.85 \cdot 10^{-148}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{-186}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3600000:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{+171}:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - a \cdot \frac{x}{t}\\ \end{array} \]
Alternative 11
Error37.7
Cost1372
\[\begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+15}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-74}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-119}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-149}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-186}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \end{array} \]
Alternative 12
Error37.9
Cost1372
\[\begin{array}{l} \mathbf{if}\;t \leq -3500000:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-75}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-117}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-149}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-186}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \end{array} \]
Alternative 13
Error35.1
Cost1372
\[\begin{array}{l} t_1 := y - y \cdot \frac{z}{t}\\ t_2 := \frac{z - a}{\frac{t}{x}}\\ \mathbf{if}\;t \leq -230:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-186}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 29000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+171}:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+197}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error28.8
Cost1236
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a \leq -6.5 \cdot 10^{+203}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{+166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+82}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.18 \cdot 10^{-54}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+197}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 15
Error19.8
Cost1232
\[\begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+230}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-11}:\\ \;\;\;\;x + \frac{t}{a - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-77}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-24}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
Alternative 16
Error19.1
Cost1232
\[\begin{array}{l} t_1 := y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -3 \cdot 10^{+230}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-11}:\\ \;\;\;\;x + \frac{t}{a - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-77}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-16}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error34.5
Cost1108
\[\begin{array}{l} t_1 := y - y \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -1450:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-186}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 540000:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error21.3
Cost1104
\[\begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+230}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-12}:\\ \;\;\;\;x + \frac{t}{a - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-77}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \end{array} \]
Alternative 19
Error10.1
Cost1097
\[\begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+229} \lor \neg \left(t \leq 7.5 \cdot 10^{+159}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - x}{a - t} \cdot \left(t - z\right)\\ \end{array} \]
Alternative 20
Error30.2
Cost1040
\[\begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{+80}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 10^{+46}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+135}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 3.45 \cdot 10^{+165}:\\ \;\;\;\;\frac{y}{\frac{a - t}{-t}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 21
Error37.3
Cost976
\[\begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{+76}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-268}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-214}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+165}:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 22
Error30.6
Cost976
\[\begin{array}{l} t_1 := y + x \cdot \frac{z}{t}\\ \mathbf{if}\;a \leq -1.25 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 10^{+46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+135}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+179}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 23
Error35.9
Cost844
\[\begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+80}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-269}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-214}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{+23}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 24
Error33.6
Cost844
\[\begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+61}:\\ \;\;\;\;y - y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{+182}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 25
Error20.1
Cost841
\[\begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+46} \lor \neg \left(a \leq 2 \cdot 10^{+25}\right):\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \end{array} \]
Alternative 26
Error35.6
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{+78}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+23}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 27
Error45.6
Cost64
\[x \]

Error

Reproduce?

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