Average Error: 0.0 → 0.0
Time: 8.4s
Precision: 64
\[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\]
\[\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(t - 1\right) \cdot a\right)\]
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(t - 1\right) \cdot a\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r47604 = x;
        double r47605 = y;
        double r47606 = 1.0;
        double r47607 = r47605 - r47606;
        double r47608 = z;
        double r47609 = r47607 * r47608;
        double r47610 = r47604 - r47609;
        double r47611 = t;
        double r47612 = r47611 - r47606;
        double r47613 = a;
        double r47614 = r47612 * r47613;
        double r47615 = r47610 - r47614;
        double r47616 = r47605 + r47611;
        double r47617 = 2.0;
        double r47618 = r47616 - r47617;
        double r47619 = b;
        double r47620 = r47618 * r47619;
        double r47621 = r47615 + r47620;
        return r47621;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r47622 = 1.0;
        double r47623 = y;
        double r47624 = r47622 - r47623;
        double r47625 = z;
        double r47626 = b;
        double r47627 = t;
        double r47628 = r47623 + r47627;
        double r47629 = 2.0;
        double r47630 = r47628 - r47629;
        double r47631 = x;
        double r47632 = fma(r47626, r47630, r47631);
        double r47633 = r47627 - r47622;
        double r47634 = a;
        double r47635 = r47633 * r47634;
        double r47636 = r47632 - r47635;
        double r47637 = fma(r47624, r47625, r47636);
        return r47637;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 0.0

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(t - 1\right) \cdot a\right)}\]
  3. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(t - 1\right) \cdot a\right)\]

Reproduce

herbie shell --seed 2020036 +o rules:numerics
(FPCore (x y z t a b)
  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
  :precision binary64
  (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) b)))