Average Error: 0.0 → 0.0
Time: 19.5s
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(z, 1 - y, b \cdot \left(\left(t + y\right) - 2\right)\right) + \mathsf{fma}\left(a, 1 - t, x\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(z, 1 - y, b \cdot \left(\left(t + y\right) - 2\right)\right) + \mathsf{fma}\left(a, 1 - t, x\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r34253 = x;
        double r34254 = y;
        double r34255 = 1.0;
        double r34256 = r34254 - r34255;
        double r34257 = z;
        double r34258 = r34256 * r34257;
        double r34259 = r34253 - r34258;
        double r34260 = t;
        double r34261 = r34260 - r34255;
        double r34262 = a;
        double r34263 = r34261 * r34262;
        double r34264 = r34259 - r34263;
        double r34265 = r34254 + r34260;
        double r34266 = 2.0;
        double r34267 = r34265 - r34266;
        double r34268 = b;
        double r34269 = r34267 * r34268;
        double r34270 = r34264 + r34269;
        return r34270;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r34271 = z;
        double r34272 = 1.0;
        double r34273 = y;
        double r34274 = r34272 - r34273;
        double r34275 = b;
        double r34276 = t;
        double r34277 = r34276 + r34273;
        double r34278 = 2.0;
        double r34279 = r34277 - r34278;
        double r34280 = r34275 * r34279;
        double r34281 = fma(r34271, r34274, r34280);
        double r34282 = a;
        double r34283 = r34272 - r34276;
        double r34284 = x;
        double r34285 = fma(r34282, r34283, r34284);
        double r34286 = r34281 + r34285;
        return r34286;
}

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(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(a, 1 - t, x\right)\right)\right)}\]
  3. Using strategy rm
  4. Applied flip--15.6

    \[\leadsto \mathsf{fma}\left(b, \color{blue}{\frac{\left(y + t\right) \cdot \left(y + t\right) - 2 \cdot 2}{\left(y + t\right) + 2}}, \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(a, 1 - t, x\right)\right)\right)\]
  5. Simplified15.6

    \[\leadsto \mathsf{fma}\left(b, \frac{\left(y + t\right) \cdot \left(y + t\right) - 2 \cdot 2}{\color{blue}{2 + \left(t + y\right)}}, \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(a, 1 - t, x\right)\right)\right)\]
  6. Using strategy rm
  7. Applied fma-udef15.6

    \[\leadsto \color{blue}{b \cdot \frac{\left(y + t\right) \cdot \left(y + t\right) - 2 \cdot 2}{2 + \left(t + y\right)} + \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(a, 1 - t, x\right)\right)}\]
  8. Simplified0.1

    \[\leadsto \color{blue}{\frac{b}{\frac{1}{\left(t + y\right) - 2}}} + \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(a, 1 - t, x\right)\right)\]
  9. Using strategy rm
  10. Applied fma-udef0.1

    \[\leadsto \frac{b}{\frac{1}{\left(t + y\right) - 2}} + \color{blue}{\left(\left(1 - y\right) \cdot z + \mathsf{fma}\left(a, 1 - t, x\right)\right)}\]
  11. Applied associate-+r+0.1

    \[\leadsto \color{blue}{\left(\frac{b}{\frac{1}{\left(t + y\right) - 2}} + \left(1 - y\right) \cdot z\right) + \mathsf{fma}\left(a, 1 - t, x\right)}\]
  12. Simplified0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(z, 1 - y, b \cdot \left(\left(t + y\right) - 2\right)\right)} + \mathsf{fma}\left(a, 1 - t, x\right)\]
  13. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(z, 1 - y, b \cdot \left(\left(t + y\right) - 2\right)\right) + \mathsf{fma}\left(a, 1 - t, x\right)\]

Reproduce

herbie shell --seed 2019304 +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)))