Average Error: 0.0 → 0.0
Time: 8.3s
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 r2529970 = x;
        double r2529971 = y;
        double r2529972 = 1.0;
        double r2529973 = r2529971 - r2529972;
        double r2529974 = r2529970 * r2529973;
        double r2529975 = 0.5;
        double r2529976 = r2529971 * r2529975;
        double r2529977 = r2529974 - r2529976;
        double r2529978 = 0.918938533204673;
        double r2529979 = r2529977 + r2529978;
        return r2529979;
}

double f(double x, double y) {
        double r2529980 = 0.918938533204673;
        double r2529981 = 1.0;
        double r2529982 = x;
        double r2529983 = -r2529982;
        double r2529984 = r2529981 * r2529983;
        double r2529985 = y;
        double r2529986 = r2529982 * r2529985;
        double r2529987 = r2529984 + r2529986;
        double r2529988 = 0.5;
        double r2529989 = r2529985 * r2529988;
        double r2529990 = r2529987 - r2529989;
        double r2529991 = r2529980 + r2529990;
        return r2529991;
}

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

Reproduce

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