Average Error: 0.0 → 0.0
Time: 13.8s
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 r34193 = x;
        double r34194 = y;
        double r34195 = 1.0;
        double r34196 = r34194 - r34195;
        double r34197 = z;
        double r34198 = r34196 * r34197;
        double r34199 = r34193 - r34198;
        double r34200 = t;
        double r34201 = r34200 - r34195;
        double r34202 = a;
        double r34203 = r34201 * r34202;
        double r34204 = r34199 - r34203;
        double r34205 = r34194 + r34200;
        double r34206 = 2.0;
        double r34207 = r34205 - r34206;
        double r34208 = b;
        double r34209 = r34207 * r34208;
        double r34210 = r34204 + r34209;
        return r34210;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r34211 = 1.0;
        double r34212 = t;
        double r34213 = r34211 - r34212;
        double r34214 = a;
        double r34215 = b;
        double r34216 = y;
        double r34217 = r34216 + r34212;
        double r34218 = 2.0;
        double r34219 = r34217 - r34218;
        double r34220 = r34211 - r34216;
        double r34221 = z;
        double r34222 = x;
        double r34223 = fma(r34220, r34221, r34222);
        double r34224 = fma(r34215, r34219, r34223);
        double r34225 = fma(r34213, r34214, r34224);
        return r34225;
}

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