?

Average Error: 24.1 → 9.4
Time: 40.1s
Precision: binary64
Cost: 5008

?

\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
\[\begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ t_2 := \frac{t \cdot \left(y - z\right)}{a - z} + x \cdot \left(1 + \left(-\frac{y - z}{a - z}\right)\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-299}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t + \left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+290}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\right) - \left(-\frac{a \cdot \left(t - x\right)}{z}\right)\\ \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 (+ x (/ (* (- y z) (- t x)) (- a z))))
        (t_2
         (+ (/ (* t (- y z)) (- a z)) (* x (+ 1.0 (- (/ (- y z) (- a z))))))))
   (if (<= t_1 (- INFINITY))
     (* t (- (/ y (- a z)) (/ z (- a z))))
     (if (<= t_1 -1e-299)
       t_2
       (if (<= t_1 0.0)
         (+ t (- (/ (* (- t x) (- y a)) z)))
         (if (<= t_1 4e+290)
           t_2
           (- (+ t (* y (- (/ x z) (/ t z)))) (- (/ (* a (- t x)) z)))))))))
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 = x + (((y - z) * (t - x)) / (a - z));
	double t_2 = ((t * (y - z)) / (a - z)) + (x * (1.0 + -((y - z) / (a - z))));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t * ((y / (a - z)) - (z / (a - z)));
	} else if (t_1 <= -1e-299) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = t + -(((t - x) * (y - a)) / z);
	} else if (t_1 <= 4e+290) {
		tmp = t_2;
	} else {
		tmp = (t + (y * ((x / z) - (t / z)))) - -((a * (t - x)) / z);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double t_2 = ((t * (y - z)) / (a - z)) + (x * (1.0 + -((y - z) / (a - z))));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t * ((y / (a - z)) - (z / (a - z)));
	} else if (t_1 <= -1e-299) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = t + -(((t - x) * (y - a)) / z);
	} else if (t_1 <= 4e+290) {
		tmp = t_2;
	} else {
		tmp = (t + (y * ((x / z) - (t / z)))) - -((a * (t - x)) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
def code(x, y, z, t, a):
	t_1 = x + (((y - z) * (t - x)) / (a - z))
	t_2 = ((t * (y - z)) / (a - z)) + (x * (1.0 + -((y - z) / (a - z))))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t * ((y / (a - z)) - (z / (a - z)))
	elif t_1 <= -1e-299:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = t + -(((t - x) * (y - a)) / z)
	elif t_1 <= 4e+290:
		tmp = t_2
	else:
		tmp = (t + (y * ((x / z) - (t / z)))) - -((a * (t - x)) / z)
	return tmp
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	t_2 = Float64(Float64(Float64(t * Float64(y - z)) / Float64(a - z)) + Float64(x * Float64(1.0 + Float64(-Float64(Float64(y - z) / Float64(a - z))))))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(t * Float64(Float64(y / Float64(a - z)) - Float64(z / Float64(a - z))));
	elseif (t_1 <= -1e-299)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(-Float64(Float64(Float64(t - x) * Float64(y - a)) / z)));
	elseif (t_1 <= 4e+290)
		tmp = t_2;
	else
		tmp = Float64(Float64(t + Float64(y * Float64(Float64(x / z) - Float64(t / z)))) - Float64(-Float64(Float64(a * Float64(t - x)) / z)));
	end
	return tmp
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - z) * (t - x)) / (a - z));
	t_2 = ((t * (y - z)) / (a - z)) + (x * (1.0 + -((y - z) / (a - z))));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t * ((y / (a - z)) - (z / (a - z)));
	elseif (t_1 <= -1e-299)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = t + -(((t - x) * (y - a)) / z);
	elseif (t_1 <= 4e+290)
		tmp = t_2;
	else
		tmp = (t + (y * ((x / z) - (t / z)))) - -((a * (t - x)) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(x * N[(1.0 + (-N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t * N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-299], t$95$2, If[LessEqual[t$95$1, 0.0], N[(t + (-N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision], If[LessEqual[t$95$1, 4e+290], t$95$2, N[(N[(t + N[(y * N[(N[(x / z), $MachinePrecision] - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - (-N[(N[(a * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision]]]]]]]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
t_2 := \frac{t \cdot \left(y - z\right)}{a - z} + x \cdot \left(1 + \left(-\frac{y - z}{a - z}\right)\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-299}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+290}:\\
\;\;\;\;t_2\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.1
Target11.8
Herbie9.4
\[\begin{array}{l} \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \end{array} \]

Derivation?

  1. Split input into 4 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0

    1. Initial program 64.0

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999992e-300 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 4.00000000000000025e290

    1. Initial program 2.0

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

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

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

      [Start]2.1

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

      rational.json-simplify-1 [=>]2.1

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

      rational.json-simplify-2 [=>]2.1

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

      rational.json-simplify-2 [=>]2.1

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

      rational.json-simplify-9 [=>]2.1

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

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

    1. Initial program 60.0

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

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

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

      [Start]1.2

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

      rational.json-simplify-1 [=>]1.2

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

      rational.json-simplify-2 [=>]1.2

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

      rational.json-simplify-9 [=>]1.2

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

      rational.json-simplify-2 [=>]1.2

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

      rational.json-simplify-48 [=>]1.2

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

    if 4.00000000000000025e290 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 61.8

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

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

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

      [Start]39.7

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

      rational.json-simplify-1 [=>]39.7

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

      rational.json-simplify-2 [=>]39.7

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

      rational.json-simplify-9 [=>]39.7

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

      rational.json-simplify-2 [=>]39.7

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

      rational.json-simplify-48 [=>]39.7

      \[ t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
    4. Taylor expanded in y around 0 29.8

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

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

      [Start]29.8

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

      rational.json-simplify-1 [=>]29.8

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

      rational.json-simplify-2 [=>]29.8

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

      rational.json-simplify-9 [=>]29.8

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

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

Alternatives

Alternative 1
Error9.3
Cost4880
\[\begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t + \left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+290}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\right) - \left(-\frac{a \cdot \left(t - x\right)}{z}\right)\\ \end{array} \]
Alternative 2
Error8.8
Cost4432
\[\begin{array}{l} t_1 := t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-299}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;t + \left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+290}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error23.2
Cost2020
\[\begin{array}{l} t_1 := \frac{z}{a - z}\\ t_2 := \frac{t \cdot \left(y - z\right)}{a - z} + x\\ t_3 := t \cdot \left(\frac{y}{a - z} - t_1\right)\\ t_4 := t + \left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+110}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-164}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-248}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 1.66 \cdot 10^{-203}:\\ \;\;\;\;x \cdot \left(1 + \left(-\frac{y - z}{a - z}\right)\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-158}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-56}:\\ \;\;\;\;x + \frac{\left(t - x\right) \cdot y}{a - z}\\ \mathbf{elif}\;t \leq 3.55 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \left(-t_1\right)\\ \mathbf{elif}\;t \leq 380:\\ \;\;\;\;\left(\frac{a}{z} - \frac{y}{z}\right) \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+112}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error34.3
Cost1900
\[\begin{array}{l} t_1 := y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\ t_2 := \frac{\left(y - a\right) \cdot x}{z}\\ t_3 := \left(1 - \frac{y}{z}\right) \cdot t\\ \mathbf{if}\;a \leq -1.55 \cdot 10^{+236}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{+116}:\\ \;\;\;\;\left(1 - \frac{y}{a}\right) \cdot x\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{+51}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-31}:\\ \;\;\;\;x + \left(-\frac{x \cdot y}{a}\right)\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-55}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-206}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-257}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8.8 \cdot 10^{-201}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-189}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-55}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 7.3 \cdot 10^{-9}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot t}{a} + x\\ \end{array} \]
Alternative 5
Error33.0
Cost1632
\[\begin{array}{l} t_1 := \frac{y \cdot \left(t - x\right)}{a} + x\\ \mathbf{if}\;a \leq -2.8 \cdot 10^{+217}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{+119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.75 \cdot 10^{+42}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-55}:\\ \;\;\;\;\left(1 - \frac{y}{z}\right) \cdot t\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-9}:\\ \;\;\;\;\left(\frac{a}{z} - \frac{y}{z}\right) \cdot \left(-x\right)\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{+146}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+214}:\\ \;\;\;\;\frac{z \cdot \left(x - t\right)}{a} + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot t}{a} + x\\ \end{array} \]
Alternative 6
Error33.7
Cost1372
\[\begin{array}{l} t_1 := \left(1 - \frac{y}{a}\right) \cdot x\\ t_2 := \frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{if}\;a \leq -1.55 \cdot 10^{+236}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{+117}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{+53}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-55}:\\ \;\;\;\;\left(1 - \frac{y}{z}\right) \cdot t\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-9}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot t}{a} + x\\ \end{array} \]
Alternative 7
Error33.9
Cost1372
\[\begin{array}{l} t_1 := \frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{if}\;a \leq -1.55 \cdot 10^{+236}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{+116}:\\ \;\;\;\;\left(1 - \frac{y}{a}\right) \cdot x\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-29}:\\ \;\;\;\;x + \left(-\frac{x \cdot y}{a}\right)\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-59}:\\ \;\;\;\;\left(1 - \frac{y}{z}\right) \cdot t\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot t}{a} + x\\ \end{array} \]
Alternative 8
Error26.0
Cost1300
\[\begin{array}{l} t_1 := x + \frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;z \leq -1.24 \cdot 10^{-45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-67}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a} + x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+100}:\\ \;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \left(-\frac{a \cdot \left(t - x\right)}{z}\right)\\ \end{array} \]
Alternative 9
Error25.9
Cost1300
\[\begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{-39}:\\ \;\;\;\;x + \frac{z \cdot \left(x - t\right)}{a - z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-75}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a} + x\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+66}:\\ \;\;\;\;x + \frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+97}:\\ \;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \left(-\frac{a \cdot \left(t - x\right)}{z}\right)\\ \end{array} \]
Alternative 10
Error22.2
Cost1296
\[\begin{array}{l} t_1 := t + \left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-42}:\\ \;\;\;\;x + \frac{z \cdot \left(x - t\right)}{a - z}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-269}:\\ \;\;\;\;x + \frac{\left(t - x\right) \cdot y}{a - z}\\ \mathbf{elif}\;z \leq 10:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z} + x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error31.2
Cost1240
\[\begin{array}{l} t_1 := \left(1 - \frac{y}{z}\right) \cdot t\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-296}:\\ \;\;\;\;\frac{y \cdot t}{a} + x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+66}:\\ \;\;\;\;\left(1 - \frac{y}{a}\right) \cdot x\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+129}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error26.4
Cost1172
\[\begin{array}{l} t_1 := x + \frac{z \cdot \left(-t\right)}{a - z}\\ t_2 := t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-67}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a} + x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+163}:\\ \;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error24.4
Cost1168
\[\begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-38}:\\ \;\;\;\;x + \frac{z \cdot \left(x - t\right)}{a - z}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+37}:\\ \;\;\;\;x + \frac{\left(t - x\right) \cdot y}{a - z}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+103}:\\ \;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \left(-\frac{a \cdot \left(t - x\right)}{z}\right)\\ \end{array} \]
Alternative 14
Error30.8
Cost1108
\[\begin{array}{l} t_1 := \left(1 - \frac{y}{z}\right) \cdot t\\ \mathbf{if}\;z \leq -1.55 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-9}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.4:\\ \;\;\;\;\frac{y \cdot t}{a} + x\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+165}:\\ \;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error37.7
Cost976
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a}\\ \mathbf{if}\;a \leq -8.4 \cdot 10^{+213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{+69}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \left(\frac{a}{z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 16
Error37.6
Cost976
\[\begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+217}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{+69}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5 \cdot 10^{+15}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 2.75 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \left(\frac{a}{z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 17
Error35.9
Cost844
\[\begin{array}{l} t_1 := \left(1 - \frac{y}{a}\right) \cdot x\\ \mathbf{if}\;a \leq -1.55 \cdot 10^{+236}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error32.9
Cost844
\[\begin{array}{l} t_1 := \left(1 - \frac{y}{a}\right) \cdot x\\ \mathbf{if}\;a \leq -1.55 \cdot 10^{+236}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+14}:\\ \;\;\;\;\left(1 - \frac{y}{z}\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error27.2
Cost840
\[\begin{array}{l} t_1 := t \cdot \left(-\frac{z}{a - z}\right)\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+16}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a} + x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 20
Error35.9
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+115}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+15}:\\ \;\;\;\;t \cdot \left(\frac{a}{z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 21
Error35.8
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{+115}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+17}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 22
Error45.9
Cost64
\[t \]

Error

Reproduce?

herbie shell --seed 2023077 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))