Average Error: 0.0 → 0.0
Time: 12.8s
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 r52479 = x;
        double r52480 = y;
        double r52481 = 1.0;
        double r52482 = r52480 - r52481;
        double r52483 = z;
        double r52484 = r52482 * r52483;
        double r52485 = r52479 - r52484;
        double r52486 = t;
        double r52487 = r52486 - r52481;
        double r52488 = a;
        double r52489 = r52487 * r52488;
        double r52490 = r52485 - r52489;
        double r52491 = r52480 + r52486;
        double r52492 = 2.0;
        double r52493 = r52491 - r52492;
        double r52494 = b;
        double r52495 = r52493 * r52494;
        double r52496 = r52490 + r52495;
        return r52496;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r52497 = 1.0;
        double r52498 = y;
        double r52499 = r52497 - r52498;
        double r52500 = z;
        double r52501 = b;
        double r52502 = t;
        double r52503 = r52498 + r52502;
        double r52504 = 2.0;
        double r52505 = r52503 - r52504;
        double r52506 = x;
        double r52507 = fma(r52501, r52505, r52506);
        double r52508 = r52502 - r52497;
        double r52509 = a;
        double r52510 = r52508 * r52509;
        double r52511 = r52507 - r52510;
        double r52512 = fma(r52499, r52500, r52511);
        return r52512;
}

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