Average Error: 0.0 → 0.0
Time: 13.6s
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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r41777 = x;
        double r41778 = y;
        double r41779 = 1.0;
        double r41780 = r41778 - r41779;
        double r41781 = z;
        double r41782 = r41780 * r41781;
        double r41783 = r41777 - r41782;
        double r41784 = t;
        double r41785 = r41784 - r41779;
        double r41786 = a;
        double r41787 = r41785 * r41786;
        double r41788 = r41783 - r41787;
        double r41789 = r41778 + r41784;
        double r41790 = 2.0;
        double r41791 = r41789 - r41790;
        double r41792 = b;
        double r41793 = r41791 * r41792;
        double r41794 = r41788 + r41793;
        return r41794;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r41795 = 1.0;
        double r41796 = t;
        double r41797 = r41795 - r41796;
        double r41798 = a;
        double r41799 = b;
        double r41800 = y;
        double r41801 = r41800 + r41796;
        double r41802 = 2.0;
        double r41803 = r41801 - r41802;
        double r41804 = r41795 - r41800;
        double r41805 = z;
        double r41806 = x;
        double r41807 = fma(r41804, r41805, r41806);
        double r41808 = fma(r41799, r41803, r41807);
        double r41809 = fma(r41797, r41798, r41808);
        return r41809;
}

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 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)}\]
  3. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(b, \left(y + t\right) - 2, \mathsf{fma}\left(1 - y, z, x\right)\right)\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)))