Average Error: 0.0 → 0.0
Time: 14.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 - 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 r52568 = x;
        double r52569 = y;
        double r52570 = 1.0;
        double r52571 = r52569 - r52570;
        double r52572 = z;
        double r52573 = r52571 * r52572;
        double r52574 = r52568 - r52573;
        double r52575 = t;
        double r52576 = r52575 - r52570;
        double r52577 = a;
        double r52578 = r52576 * r52577;
        double r52579 = r52574 - r52578;
        double r52580 = r52569 + r52575;
        double r52581 = 2.0;
        double r52582 = r52580 - r52581;
        double r52583 = b;
        double r52584 = r52582 * r52583;
        double r52585 = r52579 + r52584;
        return r52585;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r52586 = 1.0;
        double r52587 = t;
        double r52588 = r52586 - r52587;
        double r52589 = a;
        double r52590 = b;
        double r52591 = y;
        double r52592 = r52591 + r52587;
        double r52593 = 2.0;
        double r52594 = r52592 - r52593;
        double r52595 = r52586 - r52591;
        double r52596 = z;
        double r52597 = x;
        double r52598 = fma(r52595, r52596, r52597);
        double r52599 = fma(r52590, r52594, r52598);
        double r52600 = fma(r52588, r52589, r52599);
        return r52600;
}

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