Average Error: 0.0 → 0.0
Time: 6.5s
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 r40836 = x;
        double r40837 = y;
        double r40838 = 1.0;
        double r40839 = r40837 - r40838;
        double r40840 = z;
        double r40841 = r40839 * r40840;
        double r40842 = r40836 - r40841;
        double r40843 = t;
        double r40844 = r40843 - r40838;
        double r40845 = a;
        double r40846 = r40844 * r40845;
        double r40847 = r40842 - r40846;
        double r40848 = r40837 + r40843;
        double r40849 = 2.0;
        double r40850 = r40848 - r40849;
        double r40851 = b;
        double r40852 = r40850 * r40851;
        double r40853 = r40847 + r40852;
        return r40853;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r40854 = 1.0;
        double r40855 = y;
        double r40856 = r40854 - r40855;
        double r40857 = z;
        double r40858 = b;
        double r40859 = t;
        double r40860 = r40855 + r40859;
        double r40861 = 2.0;
        double r40862 = r40860 - r40861;
        double r40863 = x;
        double r40864 = fma(r40858, r40862, r40863);
        double r40865 = r40859 - r40854;
        double r40866 = a;
        double r40867 = r40865 * r40866;
        double r40868 = r40864 - r40867;
        double r40869 = fma(r40856, r40857, r40868);
        return r40869;
}

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