Average Error: 0.0 → 0.0
Time: 13.7s
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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r54582 = x;
        double r54583 = y;
        double r54584 = 1.0;
        double r54585 = r54583 - r54584;
        double r54586 = z;
        double r54587 = r54585 * r54586;
        double r54588 = r54582 - r54587;
        double r54589 = t;
        double r54590 = r54589 - r54584;
        double r54591 = a;
        double r54592 = r54590 * r54591;
        double r54593 = r54588 - r54592;
        double r54594 = r54583 + r54589;
        double r54595 = 2.0;
        double r54596 = r54594 - r54595;
        double r54597 = b;
        double r54598 = r54596 * r54597;
        double r54599 = r54593 + r54598;
        return r54599;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r54600 = 1.0;
        double r54601 = t;
        double r54602 = r54600 - r54601;
        double r54603 = a;
        double r54604 = b;
        double r54605 = y;
        double r54606 = r54605 + r54601;
        double r54607 = 2.0;
        double r54608 = r54606 - r54607;
        double r54609 = r54600 - r54605;
        double r54610 = z;
        double r54611 = x;
        double r54612 = fma(r54609, r54610, r54611);
        double r54613 = fma(r54604, r54608, r54612);
        double r54614 = fma(r54602, r54603, r54613);
        return r54614;
}

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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)}\]
  3. Final simplification0.0

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

Reproduce

herbie shell --seed 2020047 +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)))