Average Error: 0.0 → 0.0
Time: 6.1s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931\]
\[\left(x \cdot y + 0.9189385332046730026078762421093415468931\right) - \left(1 \cdot x + 0.5 \cdot y\right)\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931
\left(x \cdot y + 0.9189385332046730026078762421093415468931\right) - \left(1 \cdot x + 0.5 \cdot y\right)
double f(double x, double y) {
        double r45471 = x;
        double r45472 = y;
        double r45473 = 1.0;
        double r45474 = r45472 - r45473;
        double r45475 = r45471 * r45474;
        double r45476 = 0.5;
        double r45477 = r45472 * r45476;
        double r45478 = r45475 - r45477;
        double r45479 = 0.918938533204673;
        double r45480 = r45478 + r45479;
        return r45480;
}

double f(double x, double y) {
        double r45481 = x;
        double r45482 = y;
        double r45483 = r45481 * r45482;
        double r45484 = 0.918938533204673;
        double r45485 = r45483 + r45484;
        double r45486 = 1.0;
        double r45487 = r45486 * r45481;
        double r45488 = 0.5;
        double r45489 = r45488 * r45482;
        double r45490 = r45487 + r45489;
        double r45491 = r45485 - r45490;
        return r45491;
}

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. Applied associate--l+0.0

    \[\leadsto \color{blue}{\left(x \cdot y + \left(x \cdot \left(-1\right) - y \cdot 0.5\right)\right)} + 0.9189385332046730026078762421093415468931\]
  6. Applied associate-+l+0.0

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

    \[\leadsto x \cdot y + \color{blue}{\left(0.9189385332046730026078762421093415468931 - \left(1 \cdot x + 0.5 \cdot y\right)\right)}\]
  8. Using strategy rm
  9. Applied associate-+r-0.0

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

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

Reproduce

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