Average Error: 0.0 → 0.0
Time: 12.3s
Precision: 64
\[\left(x \cdot \left(y - 1.0\right) - y \cdot 0.5\right) + 0.918938533204673\]
\[0.918938533204673 + \left(\left(1.0 \cdot \left(-x\right) + x \cdot y\right) - y \cdot 0.5\right)\]
\left(x \cdot \left(y - 1.0\right) - y \cdot 0.5\right) + 0.918938533204673
0.918938533204673 + \left(\left(1.0 \cdot \left(-x\right) + x \cdot y\right) - y \cdot 0.5\right)
double f(double x, double y) {
        double r3486314 = x;
        double r3486315 = y;
        double r3486316 = 1.0;
        double r3486317 = r3486315 - r3486316;
        double r3486318 = r3486314 * r3486317;
        double r3486319 = 0.5;
        double r3486320 = r3486315 * r3486319;
        double r3486321 = r3486318 - r3486320;
        double r3486322 = 0.918938533204673;
        double r3486323 = r3486321 + r3486322;
        return r3486323;
}

double f(double x, double y) {
        double r3486324 = 0.918938533204673;
        double r3486325 = 1.0;
        double r3486326 = x;
        double r3486327 = -r3486326;
        double r3486328 = r3486325 * r3486327;
        double r3486329 = y;
        double r3486330 = r3486326 * r3486329;
        double r3486331 = r3486328 + r3486330;
        double r3486332 = 0.5;
        double r3486333 = r3486329 * r3486332;
        double r3486334 = r3486331 - r3486333;
        double r3486335 = r3486324 + r3486334;
        return r3486335;
}

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.0\right) - y \cdot 0.5\right) + 0.918938533204673\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto \left(x \cdot \color{blue}{\left(y + \left(-1.0\right)\right)} - y \cdot 0.5\right) + 0.918938533204673\]
  4. Applied distribute-lft-in0.0

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

    \[\leadsto 0.918938533204673 + \left(\left(1.0 \cdot \left(-x\right) + x \cdot y\right) - y \cdot 0.5\right)\]

Reproduce

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