Average Error: 0.0 → 0.0
Time: 7.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 r38810 = x;
        double r38811 = y;
        double r38812 = 1.0;
        double r38813 = r38811 - r38812;
        double r38814 = z;
        double r38815 = r38813 * r38814;
        double r38816 = r38810 - r38815;
        double r38817 = t;
        double r38818 = r38817 - r38812;
        double r38819 = a;
        double r38820 = r38818 * r38819;
        double r38821 = r38816 - r38820;
        double r38822 = r38811 + r38817;
        double r38823 = 2.0;
        double r38824 = r38822 - r38823;
        double r38825 = b;
        double r38826 = r38824 * r38825;
        double r38827 = r38821 + r38826;
        return r38827;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r38828 = 1.0;
        double r38829 = y;
        double r38830 = r38828 - r38829;
        double r38831 = z;
        double r38832 = b;
        double r38833 = t;
        double r38834 = r38829 + r38833;
        double r38835 = 2.0;
        double r38836 = r38834 - r38835;
        double r38837 = x;
        double r38838 = fma(r38832, r38836, r38837);
        double r38839 = r38833 - r38828;
        double r38840 = a;
        double r38841 = r38839 * r38840;
        double r38842 = r38838 - r38841;
        double r38843 = fma(r38830, r38831, r38842);
        return r38843;
}

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