Average Error: 0.0 → 0.0
Time: 5.5s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\[\left(x \cdot y + \left(-\left(1 \cdot x + 0.5 \cdot y\right)\right)\right) + 0.918938533204673003\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003
\left(x \cdot y + \left(-\left(1 \cdot x + 0.5 \cdot y\right)\right)\right) + 0.918938533204673003
double f(double x, double y) {
        double r58219 = x;
        double r58220 = y;
        double r58221 = 1.0;
        double r58222 = r58220 - r58221;
        double r58223 = r58219 * r58222;
        double r58224 = 0.5;
        double r58225 = r58220 * r58224;
        double r58226 = r58223 - r58225;
        double r58227 = 0.918938533204673;
        double r58228 = r58226 + r58227;
        return r58228;
}

double f(double x, double y) {
        double r58229 = x;
        double r58230 = y;
        double r58231 = r58229 * r58230;
        double r58232 = 1.0;
        double r58233 = r58232 * r58229;
        double r58234 = 0.5;
        double r58235 = r58234 * r58230;
        double r58236 = r58233 + r58235;
        double r58237 = -r58236;
        double r58238 = r58231 + r58237;
        double r58239 = 0.918938533204673;
        double r58240 = r58238 + r58239;
        return r58240;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto \left(x \cdot \color{blue}{\left(y + \left(-1\right)\right)} - y \cdot 0.5\right) + 0.918938533204673003\]
  4. Applied distribute-lft-in0.0

    \[\leadsto \left(\color{blue}{\left(x \cdot y + x \cdot \left(-1\right)\right)} - y \cdot 0.5\right) + 0.918938533204673003\]
  5. Applied associate--l+0.0

    \[\leadsto \color{blue}{\left(x \cdot y + \left(x \cdot \left(-1\right) - y \cdot 0.5\right)\right)} + 0.918938533204673003\]
  6. Simplified0.0

    \[\leadsto \left(x \cdot y + \color{blue}{\left(-\left(1 \cdot x + 0.5 \cdot y\right)\right)}\right) + 0.918938533204673003\]
  7. Final simplification0.0

    \[\leadsto \left(x \cdot y + \left(-\left(1 \cdot x + 0.5 \cdot y\right)\right)\right) + 0.918938533204673003\]

Reproduce

herbie shell --seed 2020047 
(FPCore (x y)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (+ (- (* x (- y 1)) (* y 0.5)) 0.918938533204673))