?

Average Error: 24.5 → 8.0
Time: 37.1s
Precision: binary64
Cost: 10380

?

\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
\[\begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{-292}:\\ \;\;\;\;t_1\\ \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 10^{+277}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t + \left(x - t\right) \cdot \left(\frac{y - a}{z} + \frac{a}{{z}^{2}} \cdot \left(y - a\right)\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 (* (- t x) (/ (- y z) (- a z)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 -5e-292)
     t_1
     (if (<= t_2 0.0)
       (+ t (- (/ (* (- t x) (- y a)) z)))
       (if (<= t_2 1e+277)
         t_1
         (+ t (* (- x t) (+ (/ (- y a) z) (* (/ a (pow z 2.0)) (- y a))))))))))
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 + ((t - x) * ((y - z) / (a - z)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -5e-292) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + -(((t - x) * (y - a)) / z);
	} else if (t_2 <= 1e+277) {
		tmp = t_1;
	} else {
		tmp = t + ((x - t) * (((y - a) / z) + ((a / pow(z, 2.0)) * (y - a))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (((y - z) * (t - x)) / (a - z))
end function
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((t - x) * ((y - z) / (a - z)))
    t_2 = x + (((y - z) * (t - x)) / (a - z))
    if (t_2 <= (-5d-292)) then
        tmp = t_1
    else if (t_2 <= 0.0d0) then
        tmp = t + -(((t - x) * (y - a)) / z)
    else if (t_2 <= 1d+277) then
        tmp = t_1
    else
        tmp = t + ((x - t) * (((y - a) / z) + ((a / (z ** 2.0d0)) * (y - a))))
    end if
    code = tmp
end function
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 + ((t - x) * ((y - z) / (a - z)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -5e-292) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + -(((t - x) * (y - a)) / z);
	} else if (t_2 <= 1e+277) {
		tmp = t_1;
	} else {
		tmp = t + ((x - t) * (((y - a) / z) + ((a / Math.pow(z, 2.0)) * (y - a))));
	}
	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 + ((t - x) * ((y - z) / (a - z)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -5e-292:
		tmp = t_1
	elif t_2 <= 0.0:
		tmp = t + -(((t - x) * (y - a)) / z)
	elif t_2 <= 1e+277:
		tmp = t_1
	else:
		tmp = t + ((x - t) * (((y - a) / z) + ((a / math.pow(z, 2.0)) * (y - a))))
	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(t - x) * Float64(Float64(y - z) / Float64(a - z))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= -5e-292)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(-Float64(Float64(Float64(t - x) * Float64(y - a)) / z)));
	elseif (t_2 <= 1e+277)
		tmp = t_1;
	else
		tmp = Float64(t + Float64(Float64(x - t) * Float64(Float64(Float64(y - a) / z) + Float64(Float64(a / (z ^ 2.0)) * Float64(y - a)))));
	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 + ((t - x) * ((y - z) / (a - z)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -5e-292)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = t + -(((t - x) * (y - a)) / z);
	elseif (t_2 <= 1e+277)
		tmp = t_1;
	else
		tmp = t + ((x - t) * (((y - a) / z) + ((a / (z ^ 2.0)) * (y - a))));
	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[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-292], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + (-N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision], If[LessEqual[t$95$2, 1e+277], t$95$1, N[(t + N[(N[(x - t), $MachinePrecision] * N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + N[(N[(a / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-292}:\\
\;\;\;\;t_1\\

\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 10^{+277}:\\
\;\;\;\;t_1\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.5
Target11.8
Herbie8.0
\[\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 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999981e-292 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e277

    1. Initial program 13.5

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

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

      [Start]13.5

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

      rational_best-simplify-47 [=>]5.5

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

    if -4.99999999999999981e-292 < (+.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. Simplified60.3

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

      [Start]60.0

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

      rational_best-simplify-2 [=>]60.0

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

      rational_best-simplify-47 [=>]60.3

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

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

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

      [Start]1.5

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

      rational_best-simplify-1 [=>]1.5

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

      rational_best-simplify-2 [=>]1.5

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

      rational_best-simplify-12 [=>]1.5

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

      rational_best-simplify-2 [=>]1.5

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

      rational_best-simplify-2 [=>]1.5

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

      rational_best-simplify-50 [=>]1.5

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

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

    1. Initial program 58.5

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

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

      [Start]58.5

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

      rational_best-simplify-2 [=>]58.5

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

      rational_best-simplify-47 [=>]18.3

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

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

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

      [Start]44.4

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

      rational_best-simplify-1 [=>]44.4

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

      rational_best-simplify-43 [=>]44.4

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

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

Alternatives

Alternative 1
Error8.0
Cost3532
\[\begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{-292}:\\ \;\;\;\;t_1\\ \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 10^{+277}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \end{array} \]
Alternative 2
Error24.0
Cost1760
\[\begin{array}{l} t_1 := t \cdot \left(\frac{1}{a - z} \cdot \left(y - z\right)\right)\\ \mathbf{if}\;a \leq -9.8 \cdot 10^{+89}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -90000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.6 \cdot 10^{-14}:\\ \;\;\;\;x \cdot \left(\frac{1}{z} \cdot \left(y - a\right)\right)\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-199}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+39}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{t}{z - a}\\ \end{array} \]
Alternative 3
Error35.0
Cost1504
\[\begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_3 := x \cdot \frac{y - a}{z}\\ \mathbf{if}\;a \leq -6 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -170000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-26}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-261}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+39}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error35.1
Cost1504
\[\begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -6.8 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -90000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-261}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+39}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error32.8
Cost1504
\[\begin{array}{l} t_1 := t \cdot \left(\frac{y}{-z} + 1\right)\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -9.5 \cdot 10^{+84}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -55000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-21}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+39}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error32.9
Cost1504
\[\begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \left(\frac{y}{-z} + 1\right)\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{+148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{+57}:\\ \;\;\;\;t + a \cdot \frac{x}{-z}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-261}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+39}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+65}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error32.9
Cost1504
\[\begin{array}{l} t_1 := t \cdot \left(\frac{y}{-z} + 1\right)\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -1.05 \cdot 10^{+148}:\\ \;\;\;\;x + x \cdot \frac{-y}{a}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{+57}:\\ \;\;\;\;t + a \cdot \frac{x}{-z}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+44}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+39}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error15.2
Cost1232
\[\begin{array}{l} t_1 := x + t \cdot \frac{z - y}{z - a}\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+192}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-301}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{z} \cdot \left(y - a\right)\\ \end{array} \]
Alternative 9
Error17.7
Cost1100
\[\begin{array}{l} t_1 := t + \frac{x - t}{z} \cdot \left(y - a\right)\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-59}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+78}:\\ \;\;\;\;x + z \cdot \frac{t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error17.5
Cost1100
\[\begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+45}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-59}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.7 \cdot 10^{+77}:\\ \;\;\;\;x + z \cdot \frac{t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{z} \cdot \left(y - a\right)\\ \end{array} \]
Alternative 11
Error14.9
Cost1100
\[\begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+46}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-302}:\\ \;\;\;\;x + y \cdot \frac{x - t}{z - a}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+79}:\\ \;\;\;\;x + t \cdot \frac{z - y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{z} \cdot \left(y - a\right)\\ \end{array} \]
Alternative 12
Error35.9
Cost976
\[\begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;a \leq -4.2 \cdot 10^{+143}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 13
Error28.4
Cost972
\[\begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+142}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{+22}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+64}:\\ \;\;\;\;x + y \cdot \frac{x}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{x}{-z}\\ \end{array} \]
Alternative 14
Error24.8
Cost972
\[\begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+99}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-61}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+79}:\\ \;\;\;\;x + z \cdot \frac{t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{x}{-z}\\ \end{array} \]
Alternative 15
Error24.1
Cost972
\[\begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+99}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-61}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+79}:\\ \;\;\;\;x + z \cdot \frac{t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{x}{-z}\\ \end{array} \]
Alternative 16
Error29.6
Cost908
\[\begin{array}{l} \mathbf{if}\;z \leq -8.4 \cdot 10^{+142}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -650000000:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 2.06 \cdot 10^{+68}:\\ \;\;\;\;x + x \cdot \frac{-y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{x}{-z}\\ \end{array} \]
Alternative 17
Error25.2
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+100}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+63}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{x}{-z}\\ \end{array} \]
Alternative 18
Error37.0
Cost716
\[\begin{array}{l} \mathbf{if}\;a \leq -2.55 \cdot 10^{+143}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-265}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-199}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 10^{+54}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 19
Error37.0
Cost716
\[\begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+142}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-263}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+53}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 20
Error30.7
Cost712
\[\begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{+48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+59}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 21
Error36.4
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -7.6 \cdot 10^{+142}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+53}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 22
Error45.7
Cost64
\[t \]

Error

Reproduce?

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