Average Error: 0.0 → 0.0
Time: 5.0s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931\]
\[\left(\left(y \cdot x + x \cdot \left(-1\right)\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931
\left(\left(y \cdot x + x \cdot \left(-1\right)\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931
double f(double x, double y) {
        double r44049 = x;
        double r44050 = y;
        double r44051 = 1.0;
        double r44052 = r44050 - r44051;
        double r44053 = r44049 * r44052;
        double r44054 = 0.5;
        double r44055 = r44050 * r44054;
        double r44056 = r44053 - r44055;
        double r44057 = 0.918938533204673;
        double r44058 = r44056 + r44057;
        return r44058;
}

double f(double x, double y) {
        double r44059 = y;
        double r44060 = x;
        double r44061 = r44059 * r44060;
        double r44062 = 1.0;
        double r44063 = -r44062;
        double r44064 = r44060 * r44063;
        double r44065 = r44061 + r44064;
        double r44066 = 0.5;
        double r44067 = r44059 * r44066;
        double r44068 = r44065 - r44067;
        double r44069 = 0.918938533204673;
        double r44070 = r44068 + r44069;
        return r44070;
}

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(\color{blue}{y \cdot x} + x \cdot \left(-1\right)\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931\]
  6. Final simplification0.0

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

Reproduce

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