Average Error: 0.0 → 0.0
Time: 18.7s
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 r82123 = x;
        double r82124 = y;
        double r82125 = 1.0;
        double r82126 = r82124 - r82125;
        double r82127 = z;
        double r82128 = r82126 * r82127;
        double r82129 = r82123 - r82128;
        double r82130 = t;
        double r82131 = r82130 - r82125;
        double r82132 = a;
        double r82133 = r82131 * r82132;
        double r82134 = r82129 - r82133;
        double r82135 = r82124 + r82130;
        double r82136 = 2.0;
        double r82137 = r82135 - r82136;
        double r82138 = b;
        double r82139 = r82137 * r82138;
        double r82140 = r82134 + r82139;
        return r82140;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r82141 = 1.0;
        double r82142 = y;
        double r82143 = r82141 - r82142;
        double r82144 = z;
        double r82145 = b;
        double r82146 = t;
        double r82147 = r82142 + r82146;
        double r82148 = 2.0;
        double r82149 = r82147 - r82148;
        double r82150 = x;
        double r82151 = fma(r82145, r82149, r82150);
        double r82152 = r82146 - r82141;
        double r82153 = a;
        double r82154 = r82152 * r82153;
        double r82155 = r82151 - r82154;
        double r82156 = fma(r82143, r82144, r82155);
        return r82156;
}

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