Average Error: 0.0 → 0.0
Time: 19.1s
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 r77207 = x;
        double r77208 = y;
        double r77209 = 1.0;
        double r77210 = r77208 - r77209;
        double r77211 = z;
        double r77212 = r77210 * r77211;
        double r77213 = r77207 - r77212;
        double r77214 = t;
        double r77215 = r77214 - r77209;
        double r77216 = a;
        double r77217 = r77215 * r77216;
        double r77218 = r77213 - r77217;
        double r77219 = r77208 + r77214;
        double r77220 = 2.0;
        double r77221 = r77219 - r77220;
        double r77222 = b;
        double r77223 = r77221 * r77222;
        double r77224 = r77218 + r77223;
        return r77224;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r77225 = 1.0;
        double r77226 = y;
        double r77227 = r77225 - r77226;
        double r77228 = z;
        double r77229 = b;
        double r77230 = t;
        double r77231 = r77226 + r77230;
        double r77232 = 2.0;
        double r77233 = r77231 - r77232;
        double r77234 = x;
        double r77235 = fma(r77229, r77233, r77234);
        double r77236 = r77230 - r77225;
        double r77237 = a;
        double r77238 = r77236 * r77237;
        double r77239 = r77235 - r77238;
        double r77240 = fma(r77227, r77228, r77239);
        return r77240;
}

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