Average Error: 0.0 → 0.0
Time: 5.0s
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 r31666 = x;
        double r31667 = y;
        double r31668 = 1.0;
        double r31669 = r31667 - r31668;
        double r31670 = z;
        double r31671 = r31669 * r31670;
        double r31672 = r31666 - r31671;
        double r31673 = t;
        double r31674 = r31673 - r31668;
        double r31675 = a;
        double r31676 = r31674 * r31675;
        double r31677 = r31672 - r31676;
        double r31678 = r31667 + r31673;
        double r31679 = 2.0;
        double r31680 = r31678 - r31679;
        double r31681 = b;
        double r31682 = r31680 * r31681;
        double r31683 = r31677 + r31682;
        return r31683;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r31684 = 1.0;
        double r31685 = y;
        double r31686 = r31684 - r31685;
        double r31687 = z;
        double r31688 = b;
        double r31689 = t;
        double r31690 = r31685 + r31689;
        double r31691 = 2.0;
        double r31692 = r31690 - r31691;
        double r31693 = x;
        double r31694 = fma(r31688, r31692, r31693);
        double r31695 = r31689 - r31684;
        double r31696 = a;
        double r31697 = r31695 * r31696;
        double r31698 = r31694 - r31697;
        double r31699 = fma(r31686, r31687, r31698);
        return r31699;
}

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 2019347 +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)))