Average Error: 0.0 → 0.0
Time: 5.4s
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 r37785 = x;
        double r37786 = y;
        double r37787 = 1.0;
        double r37788 = r37786 - r37787;
        double r37789 = z;
        double r37790 = r37788 * r37789;
        double r37791 = r37785 - r37790;
        double r37792 = t;
        double r37793 = r37792 - r37787;
        double r37794 = a;
        double r37795 = r37793 * r37794;
        double r37796 = r37791 - r37795;
        double r37797 = r37786 + r37792;
        double r37798 = 2.0;
        double r37799 = r37797 - r37798;
        double r37800 = b;
        double r37801 = r37799 * r37800;
        double r37802 = r37796 + r37801;
        return r37802;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r37803 = 1.0;
        double r37804 = y;
        double r37805 = r37803 - r37804;
        double r37806 = z;
        double r37807 = b;
        double r37808 = t;
        double r37809 = r37804 + r37808;
        double r37810 = 2.0;
        double r37811 = r37809 - r37810;
        double r37812 = x;
        double r37813 = fma(r37807, r37811, r37812);
        double r37814 = r37808 - r37803;
        double r37815 = a;
        double r37816 = r37814 * r37815;
        double r37817 = r37813 - r37816;
        double r37818 = fma(r37805, r37806, r37817);
        return r37818;
}

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