Average Error: 0.0 → 0.0
Time: 6.1s
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 r24796 = x;
        double r24797 = y;
        double r24798 = 1.0;
        double r24799 = r24797 - r24798;
        double r24800 = z;
        double r24801 = r24799 * r24800;
        double r24802 = r24796 - r24801;
        double r24803 = t;
        double r24804 = r24803 - r24798;
        double r24805 = a;
        double r24806 = r24804 * r24805;
        double r24807 = r24802 - r24806;
        double r24808 = r24797 + r24803;
        double r24809 = 2.0;
        double r24810 = r24808 - r24809;
        double r24811 = b;
        double r24812 = r24810 * r24811;
        double r24813 = r24807 + r24812;
        return r24813;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r24814 = 1.0;
        double r24815 = y;
        double r24816 = r24814 - r24815;
        double r24817 = z;
        double r24818 = b;
        double r24819 = t;
        double r24820 = r24815 + r24819;
        double r24821 = 2.0;
        double r24822 = r24820 - r24821;
        double r24823 = x;
        double r24824 = fma(r24818, r24822, r24823);
        double r24825 = r24819 - r24814;
        double r24826 = a;
        double r24827 = r24825 * r24826;
        double r24828 = r24824 - r24827;
        double r24829 = fma(r24816, r24817, r24828);
        return r24829;
}

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