Average Error: 0.0 → 0.0
Time: 2.9s
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 r17849 = x;
        double r17850 = y;
        double r17851 = 1.0;
        double r17852 = r17850 - r17851;
        double r17853 = z;
        double r17854 = r17852 * r17853;
        double r17855 = r17849 - r17854;
        double r17856 = t;
        double r17857 = r17856 - r17851;
        double r17858 = a;
        double r17859 = r17857 * r17858;
        double r17860 = r17855 - r17859;
        double r17861 = r17850 + r17856;
        double r17862 = 2.0;
        double r17863 = r17861 - r17862;
        double r17864 = b;
        double r17865 = r17863 * r17864;
        double r17866 = r17860 + r17865;
        return r17866;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r17867 = 1.0;
        double r17868 = y;
        double r17869 = r17867 - r17868;
        double r17870 = z;
        double r17871 = b;
        double r17872 = t;
        double r17873 = r17868 + r17872;
        double r17874 = 2.0;
        double r17875 = r17873 - r17874;
        double r17876 = x;
        double r17877 = fma(r17871, r17875, r17876);
        double r17878 = r17872 - r17867;
        double r17879 = a;
        double r17880 = r17878 * r17879;
        double r17881 = r17877 - r17880;
        double r17882 = fma(r17869, r17870, r17881);
        return r17882;
}

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