Average Error: 0.0 → 0.0
Time: 15.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 r63179 = x;
        double r63180 = y;
        double r63181 = 1.0;
        double r63182 = r63180 - r63181;
        double r63183 = z;
        double r63184 = r63182 * r63183;
        double r63185 = r63179 - r63184;
        double r63186 = t;
        double r63187 = r63186 - r63181;
        double r63188 = a;
        double r63189 = r63187 * r63188;
        double r63190 = r63185 - r63189;
        double r63191 = r63180 + r63186;
        double r63192 = 2.0;
        double r63193 = r63191 - r63192;
        double r63194 = b;
        double r63195 = r63193 * r63194;
        double r63196 = r63190 + r63195;
        return r63196;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r63197 = 1.0;
        double r63198 = y;
        double r63199 = r63197 - r63198;
        double r63200 = z;
        double r63201 = b;
        double r63202 = t;
        double r63203 = r63198 + r63202;
        double r63204 = 2.0;
        double r63205 = r63203 - r63204;
        double r63206 = x;
        double r63207 = fma(r63201, r63205, r63206);
        double r63208 = r63202 - r63197;
        double r63209 = a;
        double r63210 = r63208 * r63209;
        double r63211 = r63207 - r63210;
        double r63212 = fma(r63199, r63200, r63211);
        return r63212;
}

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