Average Error: 0.0 → 0.0
Time: 5.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 r39228 = x;
        double r39229 = y;
        double r39230 = 1.0;
        double r39231 = r39229 - r39230;
        double r39232 = z;
        double r39233 = r39231 * r39232;
        double r39234 = r39228 - r39233;
        double r39235 = t;
        double r39236 = r39235 - r39230;
        double r39237 = a;
        double r39238 = r39236 * r39237;
        double r39239 = r39234 - r39238;
        double r39240 = r39229 + r39235;
        double r39241 = 2.0;
        double r39242 = r39240 - r39241;
        double r39243 = b;
        double r39244 = r39242 * r39243;
        double r39245 = r39239 + r39244;
        return r39245;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r39246 = 1.0;
        double r39247 = y;
        double r39248 = r39246 - r39247;
        double r39249 = z;
        double r39250 = b;
        double r39251 = t;
        double r39252 = r39247 + r39251;
        double r39253 = 2.0;
        double r39254 = r39252 - r39253;
        double r39255 = x;
        double r39256 = fma(r39250, r39254, r39255);
        double r39257 = r39251 - r39246;
        double r39258 = a;
        double r39259 = r39257 * r39258;
        double r39260 = r39256 - r39259;
        double r39261 = fma(r39248, r39249, r39260);
        return r39261;
}

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