?

Average Error: 24.2 → 8.4
Time: 37.0s
Precision: binary64
Cost: 3532

?

\[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}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t + \left(-\frac{t - x}{z} \cdot \left(y - a\right)\right)\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-304}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t + \left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - y}{\frac{z - a}{t - x}}\\ \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)))))
   (if (<= t_1 (- INFINITY))
     (+ t (- (* (/ (- t x) z) (- y a))))
     (if (<= t_1 -5e-304)
       (+ x (* (- t x) (/ (- y z) (- a z))))
       (if (<= t_1 0.0)
         (+ t (- (/ (* (- t x) (- y a)) z)))
         (+ x (/ (- z y) (/ (- z a) (- t x)))))))))
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 tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t + -(((t - x) / z) * (y - a));
	} else if (t_1 <= -5e-304) {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	} else if (t_1 <= 0.0) {
		tmp = t + -(((t - x) * (y - a)) / z);
	} else {
		tmp = x + ((z - y) / ((z - a) / (t - x)));
	}
	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 tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t + -(((t - x) / z) * (y - a));
	} else if (t_1 <= -5e-304) {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	} else if (t_1 <= 0.0) {
		tmp = t + -(((t - x) * (y - a)) / z);
	} else {
		tmp = x + ((z - y) / ((z - a) / (t - x)));
	}
	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))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t + -(((t - x) / z) * (y - a))
	elif t_1 <= -5e-304:
		tmp = x + ((t - x) * ((y - z) / (a - z)))
	elif t_1 <= 0.0:
		tmp = t + -(((t - x) * (y - a)) / z)
	else:
		tmp = x + ((z - y) / ((z - a) / (t - x)))
	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)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(t + Float64(-Float64(Float64(Float64(t - x) / z) * Float64(y - a))));
	elseif (t_1 <= -5e-304)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z))));
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(-Float64(Float64(Float64(t - x) * Float64(y - a)) / z)));
	else
		tmp = Float64(x + Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(t - x))));
	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));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t + -(((t - x) / z) * (y - a));
	elseif (t_1 <= -5e-304)
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	elseif (t_1 <= 0.0)
		tmp = t + -(((t - x) * (y - a)) / z);
	else
		tmp = x + ((z - y) / ((z - a) / (t - x)));
	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]}, If[LessEqual[t$95$1, (-Infinity)], N[(t + (-N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[t$95$1, -5e-304], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + (-N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision], N[(x + N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $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}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t + \left(-\frac{t - x}{z} \cdot \left(y - a\right)\right)\\

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

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

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.2
Target11.6
Herbie8.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 z around inf 38.8

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

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

      [Start]38.8

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

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

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

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

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

      rational.json-simplify-52 [=>]38.8

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

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

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

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

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

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

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

      rational.json-simplify-49 [=>]28.8

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

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

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

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

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

      rational.json-simplify-49 [=>]20.2

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

      rational.json-simplify-52 [=>]20.2

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999965e-304

    1. Initial program 1.8

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

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

      [Start]1.8

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

      rational.json-simplify-49 [=>]2.6

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

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

    1. Initial program 60.9

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

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

      [Start]60.9

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

      rational.json-simplify-49 [=>]60.9

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

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

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

      [Start]0.9

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

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

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

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

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

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

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

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

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

      rational.json-simplify-52 [=>]0.9

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

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

    1. Initial program 21.0

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

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

      [Start]21.0

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

      rational.json-simplify-49 [=>]7.0

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

      \[\leadsto x + \color{blue}{\frac{z - y}{\frac{z - a}{t - x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification8.4

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

Alternatives

Alternative 1
Error8.4
Cost3532
\[\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 + \left(-\frac{t - x}{z} \cdot \left(y - a\right)\right)\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-304}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t + \left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \end{array} \]
Alternative 2
Error26.5
Cost1496
\[\begin{array}{l} t_1 := x + z \cdot \frac{t - x}{z - a}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{+140}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.18 \cdot 10^{+95}:\\ \;\;\;\;\frac{x}{\frac{z - a}{y}}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{+38}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error35.2
Cost1372
\[\begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ t_2 := \left(1 - \frac{y}{a}\right) \cdot x\\ t_3 := y \cdot \frac{x}{z}\\ \mathbf{if}\;a \leq -6.5 \cdot 10^{+139}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{+56}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -8.4 \cdot 10^{+30}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-8}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-121}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 900000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error34.9
Cost1372
\[\begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ t_2 := \left(1 - \frac{y}{a}\right) \cdot x\\ \mathbf{if}\;a \leq -7.4 \cdot 10^{+139}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{z - a} \cdot x\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-8}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-295}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-126}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1300000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error28.9
Cost1368
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;a \leq -5.2 \cdot 10^{+140}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-147}:\\ \;\;\;\;\frac{y}{\frac{z - a}{x}}\\ \mathbf{elif}\;a \leq 2850000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+166}:\\ \;\;\;\;\left(1 - \frac{y}{a}\right) \cdot x\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+179}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
Alternative 6
Error31.4
Cost1304
\[\begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ t_2 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -5.5 \cdot 10^{+78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{+58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-36}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-126}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 10^{+14}:\\ \;\;\;\;\left(y - z\right) \cdot \left(-\frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error18.8
Cost1296
\[\begin{array}{l} t_1 := t + \left(-\frac{t - x}{z} \cdot \left(y - a\right)\right)\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-97}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-15}:\\ \;\;\;\;t + \left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error39.8
Cost1240
\[\begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-165}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-97}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+105}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \end{array} \]
Alternative 9
Error31.1
Cost1240
\[\begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ t_2 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.1 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-124}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error29.9
Cost1236
\[\begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ t_3 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;z \leq -5.4 \cdot 10^{-30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-162}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-125}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+134}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 11
Error29.4
Cost1236
\[\begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{-30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-162}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-125}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+134}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;0 + x \cdot \frac{y - a}{z}\\ \end{array} \]
Alternative 12
Error26.3
Cost1236
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.6 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3250000000000:\\ \;\;\;\;\left(1 + \frac{y - z}{z - a}\right) \cdot x\\ \mathbf{elif}\;z \leq -5.3 \cdot 10^{-30}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-100}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+133}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0 + x \cdot \frac{y - a}{z}\\ \end{array} \]
Alternative 13
Error42.6
Cost1112
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a}\\ \mathbf{if}\;z \leq -3.8 \cdot 10^{+59}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-165}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-231}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-162}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+106}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]
Alternative 14
Error8.0
Cost1096
\[\begin{array}{l} t_1 := t + \left(-\frac{t - x}{z} \cdot \left(y - a\right)\right)\\ \mathbf{if}\;z \leq -5.3 \cdot 10^{+150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+109}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error17.5
Cost1032
\[\begin{array}{l} t_1 := t + \left(-\frac{t - x}{z} \cdot \left(y - a\right)\right)\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{-21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-7}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error36.1
Cost976
\[\begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ \mathbf{if}\;a \leq -6.5 \cdot 10^{+139}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-126}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 17
Error26.3
Cost972
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-100}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0 + x \cdot \frac{y - a}{z}\\ \end{array} \]
Alternative 18
Error26.3
Cost972
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -4 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-100}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0 + x \cdot \frac{y - a}{z}\\ \end{array} \]
Alternative 19
Error36.6
Cost716
\[\begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+61}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-165}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 0.0185:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 20
Error38.2
Cost716
\[\begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+139}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-294}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-125}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+23}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 21
Error36.2
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -8.2 \cdot 10^{+139}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+22}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 22
Error62.1
Cost64
\[0 \]
Alternative 23
Error45.5
Cost64
\[t \]

Error

Reproduce?

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