Average Error: 0.0 → 0.0
Time: 8.8s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931\]
\[0.9189385332046730026078762421093415468931 + \left(\left(\left(-y\right) \cdot 0.5 - x \cdot 1\right) + x \cdot y\right)\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931
0.9189385332046730026078762421093415468931 + \left(\left(\left(-y\right) \cdot 0.5 - x \cdot 1\right) + x \cdot y\right)
double f(double x, double y) {
        double r44456 = x;
        double r44457 = y;
        double r44458 = 1.0;
        double r44459 = r44457 - r44458;
        double r44460 = r44456 * r44459;
        double r44461 = 0.5;
        double r44462 = r44457 * r44461;
        double r44463 = r44460 - r44462;
        double r44464 = 0.918938533204673;
        double r44465 = r44463 + r44464;
        return r44465;
}

double f(double x, double y) {
        double r44466 = 0.918938533204673;
        double r44467 = y;
        double r44468 = -r44467;
        double r44469 = 0.5;
        double r44470 = r44468 * r44469;
        double r44471 = x;
        double r44472 = 1.0;
        double r44473 = r44471 * r44472;
        double r44474 = r44470 - r44473;
        double r44475 = r44471 * r44467;
        double r44476 = r44474 + r44475;
        double r44477 = r44466 + r44476;
        return r44477;
}

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.9189385332046730026078762421093415468931\]
  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.9189385332046730026078762421093415468931\]
  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.9189385332046730026078762421093415468931\]
  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.9189385332046730026078762421093415468931\]
  6. Simplified0.0

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

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

Reproduce

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