Average Error: 0.0 → 0.0
Time: 3.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 r28238 = x;
        double r28239 = y;
        double r28240 = 1.0;
        double r28241 = r28239 - r28240;
        double r28242 = z;
        double r28243 = r28241 * r28242;
        double r28244 = r28238 - r28243;
        double r28245 = t;
        double r28246 = r28245 - r28240;
        double r28247 = a;
        double r28248 = r28246 * r28247;
        double r28249 = r28244 - r28248;
        double r28250 = r28239 + r28245;
        double r28251 = 2.0;
        double r28252 = r28250 - r28251;
        double r28253 = b;
        double r28254 = r28252 * r28253;
        double r28255 = r28249 + r28254;
        return r28255;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r28256 = 1.0;
        double r28257 = y;
        double r28258 = r28256 - r28257;
        double r28259 = z;
        double r28260 = b;
        double r28261 = t;
        double r28262 = r28257 + r28261;
        double r28263 = 2.0;
        double r28264 = r28262 - r28263;
        double r28265 = x;
        double r28266 = fma(r28260, r28264, r28265);
        double r28267 = r28261 - r28256;
        double r28268 = a;
        double r28269 = r28267 * r28268;
        double r28270 = r28266 - r28269;
        double r28271 = fma(r28258, r28259, r28270);
        return r28271;
}

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