Average Error: 0.0 → 0.0
Time: 5.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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r22860 = x;
        double r22861 = y;
        double r22862 = 1.0;
        double r22863 = r22861 - r22862;
        double r22864 = z;
        double r22865 = r22863 * r22864;
        double r22866 = r22860 - r22865;
        double r22867 = t;
        double r22868 = r22867 - r22862;
        double r22869 = a;
        double r22870 = r22868 * r22869;
        double r22871 = r22866 - r22870;
        double r22872 = r22861 + r22867;
        double r22873 = 2.0;
        double r22874 = r22872 - r22873;
        double r22875 = b;
        double r22876 = r22874 * r22875;
        double r22877 = r22871 + r22876;
        return r22877;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r22878 = 1.0;
        double r22879 = t;
        double r22880 = r22878 - r22879;
        double r22881 = a;
        double r22882 = b;
        double r22883 = y;
        double r22884 = r22883 + r22879;
        double r22885 = 2.0;
        double r22886 = r22884 - r22885;
        double r22887 = r22878 - r22883;
        double r22888 = z;
        double r22889 = x;
        double r22890 = fma(r22887, r22888, r22889);
        double r22891 = fma(r22882, r22886, r22890);
        double r22892 = fma(r22880, r22881, r22891);
        return r22892;
}

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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)}\]
  3. Final simplification0.0

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

Reproduce

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