Average Error: 0.0 → 0.0
Time: 6.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\]
\[\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 r40871 = x;
        double r40872 = y;
        double r40873 = 1.0;
        double r40874 = r40872 - r40873;
        double r40875 = z;
        double r40876 = r40874 * r40875;
        double r40877 = r40871 - r40876;
        double r40878 = t;
        double r40879 = r40878 - r40873;
        double r40880 = a;
        double r40881 = r40879 * r40880;
        double r40882 = r40877 - r40881;
        double r40883 = r40872 + r40878;
        double r40884 = 2.0;
        double r40885 = r40883 - r40884;
        double r40886 = b;
        double r40887 = r40885 * r40886;
        double r40888 = r40882 + r40887;
        return r40888;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r40889 = 1.0;
        double r40890 = y;
        double r40891 = r40889 - r40890;
        double r40892 = z;
        double r40893 = b;
        double r40894 = t;
        double r40895 = r40890 + r40894;
        double r40896 = 2.0;
        double r40897 = r40895 - r40896;
        double r40898 = x;
        double r40899 = fma(r40893, r40897, r40898);
        double r40900 = r40894 - r40889;
        double r40901 = a;
        double r40902 = r40900 * r40901;
        double r40903 = r40899 - r40902;
        double r40904 = fma(r40891, r40892, r40903);
        return r40904;
}

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