Average Error: 0.0 → 0.0
Time: 19.0s
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 r62505 = x;
        double r62506 = y;
        double r62507 = 1.0;
        double r62508 = r62506 - r62507;
        double r62509 = z;
        double r62510 = r62508 * r62509;
        double r62511 = r62505 - r62510;
        double r62512 = t;
        double r62513 = r62512 - r62507;
        double r62514 = a;
        double r62515 = r62513 * r62514;
        double r62516 = r62511 - r62515;
        double r62517 = r62506 + r62512;
        double r62518 = 2.0;
        double r62519 = r62517 - r62518;
        double r62520 = b;
        double r62521 = r62519 * r62520;
        double r62522 = r62516 + r62521;
        return r62522;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r62523 = 1.0;
        double r62524 = y;
        double r62525 = r62523 - r62524;
        double r62526 = z;
        double r62527 = b;
        double r62528 = t;
        double r62529 = r62524 + r62528;
        double r62530 = 2.0;
        double r62531 = r62529 - r62530;
        double r62532 = x;
        double r62533 = fma(r62527, r62531, r62532);
        double r62534 = r62528 - r62523;
        double r62535 = a;
        double r62536 = r62534 * r62535;
        double r62537 = r62533 - r62536;
        double r62538 = fma(r62525, r62526, r62537);
        return r62538;
}

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