Average Error: 0.0 → 0.0
Time: 5.7s
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\]
\[x + \mathsf{fma}\left(b, \left(y + t\right) - 2, \left(-\left(y - 1\right) \cdot z\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
x + \mathsf{fma}\left(b, \left(y + t\right) - 2, \left(-\left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r45215 = x;
        double r45216 = y;
        double r45217 = 1.0;
        double r45218 = r45216 - r45217;
        double r45219 = z;
        double r45220 = r45218 * r45219;
        double r45221 = r45215 - r45220;
        double r45222 = t;
        double r45223 = r45222 - r45217;
        double r45224 = a;
        double r45225 = r45223 * r45224;
        double r45226 = r45221 - r45225;
        double r45227 = r45216 + r45222;
        double r45228 = 2.0;
        double r45229 = r45227 - r45228;
        double r45230 = b;
        double r45231 = r45229 * r45230;
        double r45232 = r45226 + r45231;
        return r45232;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r45233 = x;
        double r45234 = b;
        double r45235 = y;
        double r45236 = t;
        double r45237 = r45235 + r45236;
        double r45238 = 2.0;
        double r45239 = r45237 - r45238;
        double r45240 = 1.0;
        double r45241 = r45235 - r45240;
        double r45242 = z;
        double r45243 = r45241 * r45242;
        double r45244 = -r45243;
        double r45245 = r45236 - r45240;
        double r45246 = a;
        double r45247 = r45245 * r45246;
        double r45248 = r45244 - r45247;
        double r45249 = fma(r45234, r45239, r45248);
        double r45250 = r45233 + r45249;
        return r45250;
}

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. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto \left(\color{blue}{\left(x + \left(-\left(y - 1\right) \cdot z\right)\right)} - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\]
  4. Applied associate--l+0.0

    \[\leadsto \color{blue}{\left(x + \left(\left(-\left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b\]
  5. Applied associate-+l+0.0

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

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

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

Reproduce

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