Average Error: 24.9 → 7.3
Time: 30.8s
Precision: binary64
Cost: 4432
\[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 -\infty:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t_1 \leq -4 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-306}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t_1 \leq 10^{+261}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x - \left(z - t\right) \cdot \frac{x - y}{a - t}\\ \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 (<= t_1 (- INFINITY))
     (+ y (* (/ (- y x) t) (- a z)))
     (if (<= t_1 -4e-291)
       t_1
       (if (<= t_1 5e-306)
         (+ y (/ (* (- y x) (- a z)) t))
         (if (<= t_1 1e+261) t_1 (- x (* (- z t) (/ (- x y) (- a t))))))))))
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 <= -((double) INFINITY)) {
		tmp = y + (((y - x) / t) * (a - z));
	} else if (t_1 <= -4e-291) {
		tmp = t_1;
	} else if (t_1 <= 5e-306) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_1 <= 1e+261) {
		tmp = t_1;
	} else {
		tmp = x - ((z - t) * ((x - y) / (a - t)));
	}
	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 + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = y + (((y - x) / t) * (a - z));
	} else if (t_1 <= -4e-291) {
		tmp = t_1;
	} else if (t_1 <= 5e-306) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_1 <= 1e+261) {
		tmp = t_1;
	} else {
		tmp = x - ((z - t) * ((x - y) / (a - t)));
	}
	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 + (((y - x) * (z - t)) / (a - t))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = y + (((y - x) / t) * (a - z))
	elif t_1 <= -4e-291:
		tmp = t_1
	elif t_1 <= 5e-306:
		tmp = y + (((y - x) * (a - z)) / t)
	elif t_1 <= 1e+261:
		tmp = t_1
	else:
		tmp = x - ((z - t) * ((x - y) / (a - t)))
	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 <= Float64(-Inf))
		tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z)));
	elseif (t_1 <= -4e-291)
		tmp = t_1;
	elseif (t_1 <= 5e-306)
		tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t));
	elseif (t_1 <= 1e+261)
		tmp = t_1;
	else
		tmp = Float64(x - Float64(Float64(z - t) * Float64(Float64(x - y) / Float64(a - t))));
	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 + (((y - x) * (z - t)) / (a - t));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = y + (((y - x) / t) * (a - z));
	elseif (t_1 <= -4e-291)
		tmp = t_1;
	elseif (t_1 <= 5e-306)
		tmp = y + (((y - x) * (a - z)) / t);
	elseif (t_1 <= 1e+261)
		tmp = t_1;
	else
		tmp = x - ((z - t) * ((x - y) / (a - t)));
	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[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e-291], t$95$1, If[LessEqual[t$95$1, 5e-306], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+261], t$95$1, N[(x - N[(N[(z - t), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / N[(a - t), $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 -\infty:\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\

\mathbf{elif}\;t_1 \leq -4 \cdot 10^{-291}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-306}:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\

\mathbf{elif}\;t_1 \leq 10^{+261}:\\
\;\;\;\;t_1\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.9
Target9.3
Herbie7.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 4 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0

    1. Initial program 64.0

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

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

      [Start]64.0

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

      +-commutative [=>]64.0

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

      associate-*r/ [<=]17.4

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

      *-commutative [<=]17.4

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

      fma-def [=>]17.4

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

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

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

      [Start]41.4

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

      distribute-lft-out-- [=>]41.4

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

      associate-*r* [<=]41.4

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

      *-commutative [<=]41.4

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

      associate-*r/ [<=]41.4

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

      mul-1-neg [=>]41.4

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

      unsub-neg [=>]41.4

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

      associate-/l* [=>]21.4

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

      associate-/r/ [=>]20.5

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999985e-291 or 4.99999999999999998e-306 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999993e260

    1. Initial program 2.0

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

    if -3.99999999999999985e-291 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 4.99999999999999998e-306

    1. Initial program 59.5

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

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

      [Start]59.5

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

      +-commutative [=>]59.5

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

      associate-*l/ [<=]59.7

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

      fma-def [=>]59.6

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

      \[\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. Simplified1.8

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

      [Start]1.8

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

      mul-1-neg [=>]1.8

      \[ 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 [=>]1.8

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

      associate-*r* [=>]1.8

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

      distribute-rgt-out [=>]1.8

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

      +-commutative [<=]1.8

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

      mul-1-neg [=>]1.8

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

    if 9.9999999999999993e260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 54.9

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

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

      [Start]54.9

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

      associate-*l/ [<=]17.2

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -4 \cdot 10^{-291}:\\ \;\;\;\;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 5 \cdot 10^{-306}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 10^{+261}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \left(z - t\right) \cdot \frac{x - y}{a - t}\\ \end{array} \]

Alternatives

Alternative 1
Error7.1
Cost9804
\[\begin{array}{l} t_1 := \frac{y - x}{t} \cdot \left(a - z\right)\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\left(y + t_1\right) + \frac{a}{t} \cdot t_1\\ \mathbf{elif}\;t_2 \leq -4 \cdot 10^{-291}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \end{array} \]
Alternative 2
Error7.1
Cost3532
\[\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{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t_1 \leq -4 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - y}{\frac{a - t}{z - t}}\\ \end{array} \]
Alternative 3
Error7.1
Cost3532
\[\begin{array}{l} t_1 := \frac{y - x}{t} \cdot \left(a - z\right)\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\left(y + t_1\right) + \frac{a}{t} \cdot t_1\\ \mathbf{elif}\;t_2 \leq -4 \cdot 10^{-291}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - y}{\frac{a - t}{z - t}}\\ \end{array} \]
Alternative 4
Error31.6
Cost1700
\[\begin{array}{l} t_1 := \frac{y}{t} \cdot \left(t - z\right)\\ t_2 := x + z \cdot \frac{y}{a}\\ t_3 := \left(-y\right) \cdot \frac{t}{a - t}\\ \mathbf{if}\;a \leq -3.6 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1600000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-22}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-68}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-134}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-232}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-269}:\\ \;\;\;\;\frac{-z}{\frac{t}{y - x}}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+77}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error31.1
Cost1436
\[\begin{array}{l} t_1 := \frac{y}{t} \cdot \left(t - z\right)\\ t_2 := x + z \cdot \frac{y}{a}\\ t_3 := \left(-y\right) \cdot \frac{t}{a - t}\\ \mathbf{if}\;a \leq -2.15 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -19500000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-67}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-134}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+79}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error36.2
Cost1372
\[\begin{array}{l} \mathbf{if}\;a \leq -3.25 \cdot 10^{+143}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{+127}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-119}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-134}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-279}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-272}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+76}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 7
Error25.7
Cost1368
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + z \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -5.7 \cdot 10^{+150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-134}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-273}:\\ \;\;\;\;\frac{-z}{\frac{t}{y - x}}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error24.5
Cost1368
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x - z \cdot \frac{x - y}{a}\\ \mathbf{if}\;a \leq -8.4 \cdot 10^{+150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-134}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-273}:\\ \;\;\;\;\frac{-z}{\frac{t}{y - x}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error24.4
Cost1368
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a \leq -3.9 \cdot 10^{+150}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-134}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-273}:\\ \;\;\;\;\frac{-z}{\frac{t}{y - x}}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+81}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \end{array} \]
Alternative 10
Error25.5
Cost1368
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a \leq -3.9 \cdot 10^{+150}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-134}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-279}:\\ \;\;\;\;y - \frac{x - y}{\frac{t}{a}}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-272}:\\ \;\;\;\;\frac{-z}{\frac{t}{y - x}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \end{array} \]
Alternative 11
Error31.3
Cost1304
\[\begin{array}{l} t_1 := \left(-y\right) \cdot \frac{t}{a - t}\\ t_2 := x + z \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -1.25 \cdot 10^{+42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-179}:\\ \;\;\;\;\frac{x}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-287}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-273}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error36.5
Cost1244
\[\begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+143}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{+127}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-120}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-134}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-300}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-273}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+78}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 13
Error31.8
Cost1240
\[\begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -1.28 \cdot 10^{+41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-120}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-134}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-284}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-271}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+76}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error31.9
Cost1240
\[\begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -6 \cdot 10^{+41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-119}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-134}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-273}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-273}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error31.7
Cost1240
\[\begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -2.65 \cdot 10^{+41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-120}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-134}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-290}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-272}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+76}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error19.3
Cost1232
\[\begin{array}{l} t_1 := y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-111}:\\ \;\;\;\;x - \frac{\left(y - x\right) \cdot t}{a - t}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-95}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-30}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error19.0
Cost1232
\[\begin{array}{l} t_1 := y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -9.5 \cdot 10^{+55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-111}:\\ \;\;\;\;x - \frac{\left(y - x\right) \cdot t}{a - t}\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{-96}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-25}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error21.7
Cost1104
\[\begin{array}{l} t_1 := y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{if}\;t \leq -1.35 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-110}:\\ \;\;\;\;x - \frac{\left(y - x\right) \cdot t}{a - t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-96}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-28}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error10.1
Cost1096
\[\begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+70}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+114}:\\ \;\;\;\;x - \left(z - t\right) \cdot \frac{x - y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \end{array} \]
Alternative 20
Error36.4
Cost980
\[\begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-115}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-134}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-299}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-273}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+77}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 21
Error21.6
Cost972
\[\begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{+150}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 10^{+78}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \end{array} \]
Alternative 22
Error36.3
Cost716
\[\begin{array}{l} \mathbf{if}\;a \leq -1.16 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-298}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-271}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+77}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 23
Error35.8
Cost328
\[\begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-29}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+134}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 24
Error45.9
Cost64
\[x \]

Error

Reproduce

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