Average Error: 27.0 → 6.8
Time: 24.2s
Precision: binary64
Cost: 2376
\[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{+156}:\\ \;\;\;\;\frac{y + x}{\frac{t_1}{z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+148}:\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(\frac{a}{\frac{t_1}{y + t}} + \frac{z \cdot x}{t_1}\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + x}{t_1}\\ \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t))))
   (if (<= z -4.2e+156)
     (/ (+ y x) (/ t_1 z))
     (if (<= z 4.2e+148)
       (+ (/ (- z b) (/ t_1 y)) (+ (/ a (/ t_1 (+ y t))) (/ (* z x) t_1)))
       (* z (/ (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double tmp;
	if (z <= -4.2e+156) {
		tmp = (y + x) / (t_1 / z);
	} else if (z <= 4.2e+148) {
		tmp = ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + ((z * x) / t_1));
	} else {
		tmp = z * ((y + x) / t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y + (x + t)
    if (z <= (-4.2d+156)) then
        tmp = (y + x) / (t_1 / z)
    else if (z <= 4.2d+148) then
        tmp = ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + ((z * x) / t_1))
    else
        tmp = z * ((y + x) / t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double tmp;
	if (z <= -4.2e+156) {
		tmp = (y + x) / (t_1 / z);
	} else if (z <= 4.2e+148) {
		tmp = ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + ((z * x) / t_1));
	} else {
		tmp = z * ((y + x) / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	tmp = 0
	if z <= -4.2e+156:
		tmp = (y + x) / (t_1 / z)
	elif z <= 4.2e+148:
		tmp = ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + ((z * x) / t_1))
	else:
		tmp = z * ((y + x) / t_1)
	return tmp
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
end
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	tmp = 0.0
	if (z <= -4.2e+156)
		tmp = Float64(Float64(y + x) / Float64(t_1 / z));
	elseif (z <= 4.2e+148)
		tmp = Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(Float64(a / Float64(t_1 / Float64(y + t))) + Float64(Float64(z * x) / t_1)));
	else
		tmp = Float64(z * Float64(Float64(y + x) / t_1));
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	tmp = 0.0;
	if (z <= -4.2e+156)
		tmp = (y + x) / (t_1 / z);
	elseif (z <= 4.2e+148)
		tmp = ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + ((z * x) / t_1));
	else
		tmp = z * ((y + x) / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+156], N[(N[(y + x), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+148], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+156}:\\
\;\;\;\;\frac{y + x}{\frac{t_1}{z}}\\

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

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y + x}{t_1}\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original27.0
Target11.8
Herbie6.8
\[\begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{\left(x + t\right) + y}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Derivation

  1. Split input into 3 regimes
  2. if z < -4.19999999999999963e156

    1. Initial program 42.1

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

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

      \[\leadsto \color{blue}{\frac{y + x}{\frac{y + \left(t + x\right)}{z}}} \]
      Proof
      (/.f64 (+.f64 y x) (/.f64 (+.f64 y (+.f64 t x)) z)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 y x) (/.f64 (Rewrite=> associate-+r+_binary64 (+.f64 (+.f64 y t) x)) z)): 6 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 y x) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 x (+.f64 y t))) z)): 0 points increase in error, 6 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 x (+.f64 y t)))): 3 points increase in error, 3 points decrease in error
      (/.f64 (*.f64 (+.f64 y x) z) (Rewrite=> +-commutative_binary64 (+.f64 (+.f64 y t) x))): 0 points increase in error, 3 points decrease in error
      (/.f64 (*.f64 (+.f64 y x) z) (Rewrite<= associate-+r+_binary64 (+.f64 y (+.f64 t x)))): 3 points increase in error, 3 points decrease in error

    if -4.19999999999999963e156 < z < 4.19999999999999998e148

    1. Initial program 21.8

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, z - b, \mathsf{fma}\left(y + t, a, x \cdot z\right)\right)}{x + \left(y + t\right)}} \]
      Proof
      (/.f64 (fma.f64 y (-.f64 z b) (fma.f64 (+.f64 y t) a (*.f64 x z))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (fma.f64 (Rewrite<= +-commutative_binary64 (+.f64 t y)) a (*.f64 x z))) (+.f64 x (+.f64 y t))): 0 points increase in error, 17 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (+.f64 t y) a) (*.f64 x z)))) (+.f64 x (+.f64 y t))): 17 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 x z) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (-.f64 z b)) (+.f64 (*.f64 x z) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 y z) (*.f64 y b))) (+.f64 (*.f64 x z) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite=> sub-neg_binary64 (+.f64 (*.f64 y z) (neg.f64 (*.f64 y b)))) (+.f64 (*.f64 x z) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 17 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 (*.f64 x z) (*.f64 (+.f64 t y) a)) (+.f64 (*.f64 y z) (neg.f64 (*.f64 y b))))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (+.f64 (*.f64 x z) (*.f64 (+.f64 t y) a)) (*.f64 y z)) (neg.f64 (*.f64 y b)))) (+.f64 x (+.f64 y t))): 17 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 y z) (+.f64 (*.f64 x z) (*.f64 (+.f64 t y) a)))) (neg.f64 (*.f64 y b))) (+.f64 x (+.f64 y t))): 0 points increase in error, 17 points decrease in error
      (/.f64 (+.f64 (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (*.f64 y z) (*.f64 x z)) (*.f64 (+.f64 t y) a))) (neg.f64 (*.f64 y b))) (+.f64 x (+.f64 y t))): 17 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (+.f64 (Rewrite<= distribute-rgt-in_binary64 (*.f64 z (+.f64 y x))) (*.f64 (+.f64 t y) a)) (neg.f64 (*.f64 y b))) (+.f64 x (+.f64 y t))): 0 points increase in error, 17 points decrease in error
      (/.f64 (+.f64 (+.f64 (*.f64 z (Rewrite<= +-commutative_binary64 (+.f64 x y))) (*.f64 (+.f64 t y) a)) (neg.f64 (*.f64 y b))) (+.f64 x (+.f64 y t))): 4 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 x y) z)) (*.f64 (+.f64 t y) a)) (neg.f64 (*.f64 y b))) (+.f64 x (+.f64 y t))): 0 points increase in error, 4 points decrease in error
      (/.f64 (Rewrite<= sub-neg_binary64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 x (Rewrite<= +-commutative_binary64 (+.f64 t y)))): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y))): 17 points increase in error, 0 points decrease in error
    3. Taylor expanded in a around inf 21.8

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

      \[\leadsto \color{blue}{\frac{z - b}{\frac{\left(x + t\right) + y}{y}} + \left(\frac{a}{\frac{\left(x + t\right) + y}{t + y}} + \frac{z \cdot x}{\left(x + t\right) + y}\right)} \]
      Proof
      (+.f64 (/.f64 (-.f64 z b) (/.f64 (+.f64 (+.f64 x t) y) y)) (+.f64 (/.f64 a (/.f64 (+.f64 (+.f64 x t) y) (+.f64 t y))) (/.f64 (*.f64 z x) (+.f64 (+.f64 x t) y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (-.f64 z b) (/.f64 (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y) y)) (+.f64 (/.f64 a (/.f64 (+.f64 (+.f64 x t) y) (+.f64 t y))) (/.f64 (*.f64 z x) (+.f64 (+.f64 x t) y)))): 0 points increase in error, 11 points decrease in error
      (+.f64 (/.f64 (-.f64 z b) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x))) y)) (+.f64 (/.f64 a (/.f64 (+.f64 (+.f64 x t) y) (+.f64 t y))) (/.f64 (*.f64 z x) (+.f64 (+.f64 x t) y)))): 4 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x)))) (+.f64 (/.f64 a (/.f64 (+.f64 (+.f64 x t) y) (+.f64 t y))) (/.f64 (*.f64 z x) (+.f64 (+.f64 x t) y)))): 4 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (+.f64 (/.f64 a (/.f64 (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y) (+.f64 t y))) (/.f64 (*.f64 z x) (+.f64 (+.f64 x t) y)))): 3 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (+.f64 (/.f64 a (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x))) (+.f64 t y))) (/.f64 (*.f64 z x) (+.f64 (+.f64 x t) y)))): 0 points increase in error, 7 points decrease in error
      (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (+.f64 (/.f64 a (/.f64 (+.f64 y (+.f64 t x)) (Rewrite<= +-commutative_binary64 (+.f64 y t)))) (/.f64 (*.f64 z x) (+.f64 (+.f64 x t) y)))): 0 points increase in error, 11 points decrease in error
      (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (+.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x)))) (/.f64 (*.f64 z x) (+.f64 (+.f64 x t) y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (/.f64 (*.f64 z x) (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y)))): 11 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (/.f64 (*.f64 z x) (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x)))))): 0 points increase in error, 11 points decrease in error
      (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 z x) (+.f64 y (+.f64 t x))) (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x)))))): 4 points increase in error, 0 points decrease in error

    if 4.19999999999999998e148 < z

    1. Initial program 42.8

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

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

      \[\leadsto \color{blue}{\frac{y + x}{y + \left(t + x\right)} \cdot z} \]
      Proof
      (/.f64 (+.f64 y x) (/.f64 (+.f64 y (+.f64 t x)) z)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 y x) (/.f64 (Rewrite=> associate-+r+_binary64 (+.f64 (+.f64 y t) x)) z)): 6 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 y x) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 x (+.f64 y t))) z)): 0 points increase in error, 6 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 x (+.f64 y t)))): 3 points increase in error, 3 points decrease in error
      (/.f64 (*.f64 (+.f64 y x) z) (Rewrite=> +-commutative_binary64 (+.f64 (+.f64 y t) x))): 0 points increase in error, 3 points decrease in error
      (/.f64 (*.f64 (+.f64 y x) z) (Rewrite<= associate-+r+_binary64 (+.f64 y (+.f64 t x)))): 3 points increase in error, 3 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification6.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+156}:\\ \;\;\;\;\frac{y + x}{\frac{y + \left(x + t\right)}{z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+148}:\\ \;\;\;\;\frac{z - b}{\frac{y + \left(x + t\right)}{y}} + \left(\frac{a}{\frac{y + \left(x + t\right)}{y + t}} + \frac{z \cdot x}{y + \left(x + t\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + x}{y + \left(x + t\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error7.7
Cost4168
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+272}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + a\\ \end{array} \]
Alternative 2
Error35.1
Cost2032
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;a \leq -3.6 \cdot 10^{+207}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{+110}:\\ \;\;\;\;t \cdot \frac{a}{x + t}\\ \mathbf{elif}\;a \leq -1660000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.08 \cdot 10^{-103}:\\ \;\;\;\;b \cdot \frac{-y}{t_1}\\ \mathbf{elif}\;a \leq -1.76 \cdot 10^{-181}:\\ \;\;\;\;\frac{x}{\frac{t_1}{z}}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-224}:\\ \;\;\;\;a + \frac{z - b}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-91}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-70}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+203}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+217}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+274}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \end{array} \]
Alternative 3
Error16.1
Cost2008
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ \mathbf{if}\;x \leq -1.08 \cdot 10^{+154}:\\ \;\;\;\;\left(z + y \cdot \frac{z}{x}\right) + \frac{y + t}{\frac{x}{a - z}}\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{+85}:\\ \;\;\;\;y \cdot \frac{z - b}{y + t} + \left(a + \frac{z \cdot x}{t_1}\right)\\ \mathbf{elif}\;x \leq -2.85 \cdot 10^{+81}:\\ \;\;\;\;\frac{z \cdot x + t \cdot a}{x + t}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+55}:\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + a\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+120}:\\ \;\;\;\;z \cdot \frac{y + x}{t_1}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+160}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\left(z + \frac{t \cdot \left(a - z\right)}{x}\right) + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\ \end{array} \]
Alternative 4
Error23.8
Cost1892
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{z - b}{\frac{t_1}{y}} + a\\ t_3 := \frac{a}{\frac{t_1}{y + t}}\\ t_4 := z \cdot \frac{y + x}{t_1}\\ \mathbf{if}\;a \leq -2.8 \cdot 10^{+120}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-122}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-237}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-203}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-161}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-118}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-101}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-70}:\\ \;\;\;\;\frac{y + x}{\frac{t_1}{z}}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+61}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error34.8
Cost1768
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;a \leq -5.8 \cdot 10^{+206}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{+110}:\\ \;\;\;\;t \cdot \frac{a}{x + t}\\ \mathbf{elif}\;a \leq -42000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-224}:\\ \;\;\;\;a + \frac{z - b}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-70}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+203}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+217}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+274}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \end{array} \]
Alternative 6
Error29.9
Cost1760
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := y + \left(x + t\right)\\ t_3 := \left(y + t\right) \cdot \frac{a}{t_2}\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+109}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2200000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-11}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-103}:\\ \;\;\;\;b \cdot \frac{-y}{t_2}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-184}:\\ \;\;\;\;\frac{x}{\frac{t_2}{z}}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-90}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-70}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+19}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error16.2
Cost1744
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ \mathbf{if}\;x \leq -1.25 \cdot 10^{+111}:\\ \;\;\;\;\left(z + y \cdot \frac{z}{x}\right) + \frac{y + t}{\frac{x}{a - z}}\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+53}:\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + a\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+120}:\\ \;\;\;\;z \cdot \frac{y + x}{t_1}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+160}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\left(z + \frac{t \cdot \left(a - z\right)}{x}\right) + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\ \end{array} \]
Alternative 8
Error28.8
Cost1632
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \frac{a}{\frac{x + t}{t}}\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{-227}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \frac{a}{x + t}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-301}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-226}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-171}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-116}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-50}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+33}:\\ \;\;\;\;a + y \cdot \frac{z - b}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error27.5
Cost1628
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := z \cdot \frac{y + x}{t_1}\\ t_3 := \frac{a}{\frac{t_1}{y + t}}\\ t_4 := \frac{z \cdot x + t \cdot a}{x + t}\\ \mathbf{if}\;a \leq -1 \cdot 10^{+106}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+92}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{+62}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{+45}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-15}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-103}:\\ \;\;\;\;b \cdot \frac{-y}{t_1}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+60}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 10
Error16.3
Cost1616
\[\begin{array}{l} t_1 := \left(z + y \cdot \frac{z}{x}\right) + \frac{y + t}{\frac{x}{a - z}}\\ t_2 := y + \left(x + t\right)\\ \mathbf{if}\;x \leq -2.35 \cdot 10^{+110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+55}:\\ \;\;\;\;\frac{z - b}{\frac{t_2}{y}} + a\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+121}:\\ \;\;\;\;z \cdot \frac{y + x}{t_2}\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+160}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error28.5
Cost1240
\[\begin{array}{l} t_1 := t \cdot \frac{a}{x + t}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -8.5 \cdot 10^{-226}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-277}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-297}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{-207}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-171}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-121}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error28.5
Cost1240
\[\begin{array}{l} t_1 := t \cdot \frac{a}{x + t}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{-226}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7.1 \cdot 10^{-274}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-299}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-226}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-171}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-121}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error28.0
Cost1240
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \frac{a}{\frac{x + t}{t}}\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{-226}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-270}:\\ \;\;\;\;t \cdot \frac{a}{x + t}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-301}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-225}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-171}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-121}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error26.9
Cost1233
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \left(y + t\right) \cdot \frac{a}{t_1}\\ \mathbf{if}\;a \leq -2.85 \cdot 10^{+110}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1660000000000:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq -0.00155 \lor \neg \left(a \leq 2.2 \cdot 10^{+61}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + x}{t_1}\\ \end{array} \]
Alternative 15
Error26.2
Cost1232
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{a}{\frac{t_1}{y + t}}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{+15}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-8}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{t_1}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+61}:\\ \;\;\;\;z \cdot \frac{y + x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error36.2
Cost592
\[\begin{array}{l} \mathbf{if}\;t \leq -2.45 \cdot 10^{-8}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-8}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.56 \cdot 10^{+109}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 9.4 \cdot 10^{+150}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 17
Error26.5
Cost584
\[\begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+119}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+157}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 18
Error43.5
Cost64
\[a \]

Error

Reproduce

herbie shell --seed 2022343 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

  :herbie-target
  (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))

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