Average Error: 0.0 → 0.0
Time: 5.3s
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 r31921 = x;
        double r31922 = y;
        double r31923 = 1.0;
        double r31924 = r31922 - r31923;
        double r31925 = z;
        double r31926 = r31924 * r31925;
        double r31927 = r31921 - r31926;
        double r31928 = t;
        double r31929 = r31928 - r31923;
        double r31930 = a;
        double r31931 = r31929 * r31930;
        double r31932 = r31927 - r31931;
        double r31933 = r31922 + r31928;
        double r31934 = 2.0;
        double r31935 = r31933 - r31934;
        double r31936 = b;
        double r31937 = r31935 * r31936;
        double r31938 = r31932 + r31937;
        return r31938;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r31939 = 1.0;
        double r31940 = y;
        double r31941 = r31939 - r31940;
        double r31942 = z;
        double r31943 = b;
        double r31944 = t;
        double r31945 = r31940 + r31944;
        double r31946 = 2.0;
        double r31947 = r31945 - r31946;
        double r31948 = x;
        double r31949 = fma(r31943, r31947, r31948);
        double r31950 = r31944 - r31939;
        double r31951 = a;
        double r31952 = r31950 * r31951;
        double r31953 = r31949 - r31952;
        double r31954 = fma(r31941, r31942, r31953);
        return r31954;
}

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