Average Error: 0.0 → 0.0
Time: 7.5s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931\]
\[0.9189385332046730026078762421093415468931 + \left(\left(1 \cdot \left(-x\right) + x \cdot y\right) - y \cdot 0.5\right)\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931
0.9189385332046730026078762421093415468931 + \left(\left(1 \cdot \left(-x\right) + x \cdot y\right) - y \cdot 0.5\right)
double f(double x, double y) {
        double r49905 = x;
        double r49906 = y;
        double r49907 = 1.0;
        double r49908 = r49906 - r49907;
        double r49909 = r49905 * r49908;
        double r49910 = 0.5;
        double r49911 = r49906 * r49910;
        double r49912 = r49909 - r49911;
        double r49913 = 0.918938533204673;
        double r49914 = r49912 + r49913;
        return r49914;
}

double f(double x, double y) {
        double r49915 = 0.918938533204673;
        double r49916 = 1.0;
        double r49917 = x;
        double r49918 = -r49917;
        double r49919 = r49916 * r49918;
        double r49920 = y;
        double r49921 = r49917 * r49920;
        double r49922 = r49919 + r49921;
        double r49923 = 0.5;
        double r49924 = r49920 * r49923;
        double r49925 = r49922 - r49924;
        double r49926 = r49915 + r49925;
        return r49926;
}

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. Simplified0.0

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

    \[\leadsto 0.9189385332046730026078762421093415468931 + \left(\left(1 \cdot \left(-x\right) + x \cdot y\right) - y \cdot 0.5\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))