Average Error: 0.0 → 0.0
Time: 16.7s
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) + y \cdot x\right) - 0.5 \cdot y\right)\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.9189385332046730026078762421093415468931
0.9189385332046730026078762421093415468931 + \left(\left(1 \cdot \left(-x\right) + y \cdot x\right) - 0.5 \cdot y\right)
double f(double x, double y) {
        double r2676467 = x;
        double r2676468 = y;
        double r2676469 = 1.0;
        double r2676470 = r2676468 - r2676469;
        double r2676471 = r2676467 * r2676470;
        double r2676472 = 0.5;
        double r2676473 = r2676468 * r2676472;
        double r2676474 = r2676471 - r2676473;
        double r2676475 = 0.918938533204673;
        double r2676476 = r2676474 + r2676475;
        return r2676476;
}

double f(double x, double y) {
        double r2676477 = 0.918938533204673;
        double r2676478 = 1.0;
        double r2676479 = x;
        double r2676480 = -r2676479;
        double r2676481 = r2676478 * r2676480;
        double r2676482 = y;
        double r2676483 = r2676482 * r2676479;
        double r2676484 = r2676481 + r2676483;
        double r2676485 = 0.5;
        double r2676486 = r2676485 * r2676482;
        double r2676487 = r2676484 - r2676486;
        double r2676488 = r2676477 + r2676487;
        return r2676488;
}

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-rgt-in0.0

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

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

Reproduce

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