Average Error: 0.0 → 0.0
Time: 1.9s
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 r17403 = x;
        double r17404 = y;
        double r17405 = 1.0;
        double r17406 = r17404 - r17405;
        double r17407 = z;
        double r17408 = r17406 * r17407;
        double r17409 = r17403 - r17408;
        double r17410 = t;
        double r17411 = r17410 - r17405;
        double r17412 = a;
        double r17413 = r17411 * r17412;
        double r17414 = r17409 - r17413;
        double r17415 = r17404 + r17410;
        double r17416 = 2.0;
        double r17417 = r17415 - r17416;
        double r17418 = b;
        double r17419 = r17417 * r17418;
        double r17420 = r17414 + r17419;
        return r17420;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r17421 = 1.0;
        double r17422 = y;
        double r17423 = r17421 - r17422;
        double r17424 = z;
        double r17425 = b;
        double r17426 = t;
        double r17427 = r17422 + r17426;
        double r17428 = 2.0;
        double r17429 = r17427 - r17428;
        double r17430 = x;
        double r17431 = fma(r17425, r17429, r17430);
        double r17432 = r17426 - r17421;
        double r17433 = a;
        double r17434 = r17432 * r17433;
        double r17435 = r17431 - r17434;
        double r17436 = fma(r17423, r17424, r17435);
        return r17436;
}

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