Average Error: 0.0 → 0.0
Time: 5.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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r10467 = x;
        double r10468 = y;
        double r10469 = 1.0;
        double r10470 = r10468 - r10469;
        double r10471 = z;
        double r10472 = r10470 * r10471;
        double r10473 = r10467 - r10472;
        double r10474 = t;
        double r10475 = r10474 - r10469;
        double r10476 = a;
        double r10477 = r10475 * r10476;
        double r10478 = r10473 - r10477;
        double r10479 = r10468 + r10474;
        double r10480 = 2.0;
        double r10481 = r10479 - r10480;
        double r10482 = b;
        double r10483 = r10481 * r10482;
        double r10484 = r10478 + r10483;
        return r10484;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r10485 = 1.0;
        double r10486 = t;
        double r10487 = r10485 - r10486;
        double r10488 = a;
        double r10489 = b;
        double r10490 = y;
        double r10491 = r10490 + r10486;
        double r10492 = 2.0;
        double r10493 = r10491 - r10492;
        double r10494 = r10485 - r10490;
        double r10495 = z;
        double r10496 = x;
        double r10497 = fma(r10494, r10495, r10496);
        double r10498 = fma(r10489, r10493, r10497);
        double r10499 = fma(r10487, r10488, r10498);
        return r10499;
}

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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)}\]
  3. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)\]

Reproduce

herbie shell --seed 2020043 +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)))