Average Error: 0.0 → 0.0
Time: 7.2s
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, b \cdot \left(\left(y + t\right) - 2\right) + \left(x - \left(t - 1\right) \cdot a\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 - y, z, b \cdot \left(\left(y + t\right) - 2\right) + \left(x - \left(t - 1\right) \cdot a\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r47484 = x;
        double r47485 = y;
        double r47486 = 1.0;
        double r47487 = r47485 - r47486;
        double r47488 = z;
        double r47489 = r47487 * r47488;
        double r47490 = r47484 - r47489;
        double r47491 = t;
        double r47492 = r47491 - r47486;
        double r47493 = a;
        double r47494 = r47492 * r47493;
        double r47495 = r47490 - r47494;
        double r47496 = r47485 + r47491;
        double r47497 = 2.0;
        double r47498 = r47496 - r47497;
        double r47499 = b;
        double r47500 = r47498 * r47499;
        double r47501 = r47495 + r47500;
        return r47501;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r47502 = 1.0;
        double r47503 = y;
        double r47504 = r47502 - r47503;
        double r47505 = z;
        double r47506 = b;
        double r47507 = t;
        double r47508 = r47503 + r47507;
        double r47509 = 2.0;
        double r47510 = r47508 - r47509;
        double r47511 = r47506 * r47510;
        double r47512 = x;
        double r47513 = r47507 - r47502;
        double r47514 = a;
        double r47515 = r47513 * r47514;
        double r47516 = r47512 - r47515;
        double r47517 = r47511 + r47516;
        double r47518 = fma(r47504, r47505, r47517);
        return r47518;
}

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. Using strategy rm
  4. Applied fma-udef0.0

    \[\leadsto \mathsf{fma}\left(1 - y, z, \color{blue}{\left(b \cdot \left(\left(y + t\right) - 2\right) + x\right)} - \left(t - 1\right) \cdot a\right)\]
  5. Applied associate--l+0.0

    \[\leadsto \mathsf{fma}\left(1 - y, z, \color{blue}{b \cdot \left(\left(y + t\right) - 2\right) + \left(x - \left(t - 1\right) \cdot a\right)}\right)\]
  6. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(1 - y, z, b \cdot \left(\left(y + t\right) - 2\right) + \left(x - \left(t - 1\right) \cdot a\right)\right)\]

Reproduce

herbie shell --seed 2020064 +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)))