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\]
\[\left(0.9189385332046730026078762421093415468931 + y \cdot \left(x - 0.5\right)\right) - x \cdot 1\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931
\left(0.9189385332046730026078762421093415468931 + y \cdot \left(x - 0.5\right)\right) - x \cdot 1
double f(double x, double y) {
        double r33592 = x;
        double r33593 = y;
        double r33594 = 1.0;
        double r33595 = r33593 - r33594;
        double r33596 = r33592 * r33595;
        double r33597 = 0.5;
        double r33598 = r33593 * r33597;
        double r33599 = r33596 - r33598;
        double r33600 = 0.918938533204673;
        double r33601 = r33599 + r33600;
        return r33601;
}

double f(double x, double y) {
        double r33602 = 0.918938533204673;
        double r33603 = y;
        double r33604 = x;
        double r33605 = 0.5;
        double r33606 = r33604 - r33605;
        double r33607 = r33603 * r33606;
        double r33608 = r33602 + r33607;
        double r33609 = 1.0;
        double r33610 = r33604 * r33609;
        double r33611 = r33608 - r33610;
        return r33611;
}

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

Reproduce

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