Average Error: 0.0 → 0.0
Time: 5.2s
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 r34052 = x;
        double r34053 = y;
        double r34054 = 1.0;
        double r34055 = r34053 - r34054;
        double r34056 = z;
        double r34057 = r34055 * r34056;
        double r34058 = r34052 - r34057;
        double r34059 = t;
        double r34060 = r34059 - r34054;
        double r34061 = a;
        double r34062 = r34060 * r34061;
        double r34063 = r34058 - r34062;
        double r34064 = r34053 + r34059;
        double r34065 = 2.0;
        double r34066 = r34064 - r34065;
        double r34067 = b;
        double r34068 = r34066 * r34067;
        double r34069 = r34063 + r34068;
        return r34069;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r34070 = 1.0;
        double r34071 = y;
        double r34072 = r34070 - r34071;
        double r34073 = z;
        double r34074 = b;
        double r34075 = t;
        double r34076 = r34071 + r34075;
        double r34077 = 2.0;
        double r34078 = r34076 - r34077;
        double r34079 = x;
        double r34080 = fma(r34074, r34078, r34079);
        double r34081 = r34075 - r34070;
        double r34082 = a;
        double r34083 = r34081 * r34082;
        double r34084 = r34080 - r34083;
        double r34085 = fma(r34072, r34073, r34084);
        return r34085;
}

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