Average Error: 0.0 → 0.0
Time: 1.6s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931\]
\[\left(\frac{8277062471433911}{9007199254740992} + y \cdot \left(x - \frac{1}{2}\right)\right) - x \cdot 1\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931
\left(\frac{8277062471433911}{9007199254740992} + y \cdot \left(x - \frac{1}{2}\right)\right) - x \cdot 1
double f(double x, double y) {
        double r36836 = x;
        double r36837 = y;
        double r36838 = 1.0;
        double r36839 = r36837 - r36838;
        double r36840 = r36836 * r36839;
        double r36841 = 0.5;
        double r36842 = r36837 * r36841;
        double r36843 = r36840 - r36842;
        double r36844 = 0.918938533204673;
        double r36845 = r36843 + r36844;
        return r36845;
}

double f(double x, double y) {
        double r36846 = 8277062471433911.0;
        double r36847 = 9007199254740992.0;
        double r36848 = r36846 / r36847;
        double r36849 = y;
        double r36850 = x;
        double r36851 = 1.0;
        double r36852 = 2.0;
        double r36853 = r36851 / r36852;
        double r36854 = r36850 - r36853;
        double r36855 = r36849 * r36854;
        double r36856 = r36848 + r36855;
        double r36857 = r36850 * r36851;
        double r36858 = r36856 - r36857;
        return r36858;
}

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. Final simplification0.0

    \[\leadsto \left(\frac{8277062471433911}{9007199254740992} + y \cdot \left(x - \frac{1}{2}\right)\right) - x \cdot 1\]

Reproduce

herbie shell --seed 2019304 
(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))