Average Error: 0.0 → 0.0
Time: 16.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 r56003 = x;
        double r56004 = y;
        double r56005 = 1.0;
        double r56006 = r56004 - r56005;
        double r56007 = z;
        double r56008 = r56006 * r56007;
        double r56009 = r56003 - r56008;
        double r56010 = t;
        double r56011 = r56010 - r56005;
        double r56012 = a;
        double r56013 = r56011 * r56012;
        double r56014 = r56009 - r56013;
        double r56015 = r56004 + r56010;
        double r56016 = 2.0;
        double r56017 = r56015 - r56016;
        double r56018 = b;
        double r56019 = r56017 * r56018;
        double r56020 = r56014 + r56019;
        return r56020;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r56021 = 1.0;
        double r56022 = y;
        double r56023 = r56021 - r56022;
        double r56024 = z;
        double r56025 = b;
        double r56026 = t;
        double r56027 = r56022 + r56026;
        double r56028 = 2.0;
        double r56029 = r56027 - r56028;
        double r56030 = x;
        double r56031 = fma(r56025, r56029, r56030);
        double r56032 = r56026 - r56021;
        double r56033 = a;
        double r56034 = r56032 * r56033;
        double r56035 = r56031 - r56034;
        double r56036 = fma(r56023, r56024, r56035);
        return r56036;
}

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