Average Error: 29.2 → 29.3
Time: 18.8s
Precision: 64
\[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.764470499998\right) \cdot y + 230661.510616000014\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\]
\[\left(\left(1 \cdot \left(y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.764470499998\right)\right) + 230661.510616000014\right) \cdot y + t\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right) \cdot 1}\]
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.764470499998\right) \cdot y + 230661.510616000014\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\left(\left(1 \cdot \left(y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.764470499998\right)\right) + 230661.510616000014\right) \cdot y + t\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right) \cdot 1}
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r236 = x;
        double r237 = y;
        double r238 = r236 * r237;
        double r239 = z;
        double r240 = r238 + r239;
        double r241 = r240 * r237;
        double r242 = 27464.7644705;
        double r243 = r241 + r242;
        double r244 = r243 * r237;
        double r245 = 230661.510616;
        double r246 = r244 + r245;
        double r247 = r246 * r237;
        double r248 = t;
        double r249 = r247 + r248;
        double r250 = a;
        double r251 = r237 + r250;
        double r252 = r251 * r237;
        double r253 = b;
        double r254 = r252 + r253;
        double r255 = r254 * r237;
        double r256 = c;
        double r257 = r255 + r256;
        double r258 = r257 * r237;
        double r259 = i;
        double r260 = r258 + r259;
        double r261 = r249 / r260;
        return r261;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r262 = 1.0;
        double r263 = y;
        double r264 = x;
        double r265 = z;
        double r266 = fma(r264, r263, r265);
        double r267 = 27464.7644705;
        double r268 = fma(r266, r263, r267);
        double r269 = r263 * r268;
        double r270 = r262 * r269;
        double r271 = 230661.510616;
        double r272 = r270 + r271;
        double r273 = r272 * r263;
        double r274 = t;
        double r275 = r273 + r274;
        double r276 = a;
        double r277 = r263 + r276;
        double r278 = b;
        double r279 = fma(r277, r263, r278);
        double r280 = c;
        double r281 = fma(r279, r263, r280);
        double r282 = i;
        double r283 = fma(r281, r263, r282);
        double r284 = r283 * r262;
        double r285 = r262 / r284;
        double r286 = r275 * r285;
        return r286;
}

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

Bits error versus c

Bits error versus i

Derivation

  1. Initial program 29.2

    \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.764470499998\right) \cdot y + 230661.510616000014\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\]
  2. Using strategy rm
  3. Applied div-inv29.3

    \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.764470499998\right) \cdot y + 230661.510616000014\right) \cdot y + t\right) \cdot \frac{1}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}}\]
  4. Simplified29.3

    \[\leadsto \left(\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.764470499998\right) \cdot y + 230661.510616000014\right) \cdot y + t\right) \cdot \color{blue}{\frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right) \cdot 1}}\]
  5. Using strategy rm
  6. Applied *-un-lft-identity29.3

    \[\leadsto \left(\left(\color{blue}{\left(1 \cdot \left(\left(x \cdot y + z\right) \cdot y + 27464.764470499998\right)\right)} \cdot y + 230661.510616000014\right) \cdot y + t\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right) \cdot 1}\]
  7. Applied associate-*l*29.3

    \[\leadsto \left(\left(\color{blue}{1 \cdot \left(\left(\left(x \cdot y + z\right) \cdot y + 27464.764470499998\right) \cdot y\right)} + 230661.510616000014\right) \cdot y + t\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right) \cdot 1}\]
  8. Simplified29.3

    \[\leadsto \left(\left(1 \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.764470499998\right)\right)} + 230661.510616000014\right) \cdot y + t\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right) \cdot 1}\]
  9. Final simplification29.3

    \[\leadsto \left(\left(1 \cdot \left(y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.764470499998\right)\right) + 230661.510616000014\right) \cdot y + t\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right) \cdot 1}\]

Reproduce

herbie shell --seed 2020025 +o rules:numerics
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
  :precision binary64
  (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))