Average Error: 0.0 → 0.0
Time: 1.9s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\[\left(0.918938533204673003 - 1 \cdot x\right) + y \cdot \left(x - 0.5\right)\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003
\left(0.918938533204673003 - 1 \cdot x\right) + y \cdot \left(x - 0.5\right)
double f(double x, double y) {
        double r56609 = x;
        double r56610 = y;
        double r56611 = 1.0;
        double r56612 = r56610 - r56611;
        double r56613 = r56609 * r56612;
        double r56614 = 0.5;
        double r56615 = r56610 * r56614;
        double r56616 = r56613 - r56615;
        double r56617 = 0.918938533204673;
        double r56618 = r56616 + r56617;
        return r56618;
}

double f(double x, double y) {
        double r56619 = 0.918938533204673;
        double r56620 = 1.0;
        double r56621 = x;
        double r56622 = r56620 * r56621;
        double r56623 = r56619 - r56622;
        double r56624 = y;
        double r56625 = 0.5;
        double r56626 = r56621 - r56625;
        double r56627 = r56624 * r56626;
        double r56628 = r56623 + r56627;
        return r56628;
}

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.918938533204673003\]
  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.918938533204673003\]
  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.918938533204673003\]
  5. Using strategy rm
  6. Applied *-un-lft-identity0.0

    \[\leadsto \left(\left(x \cdot y + x \cdot \left(-1\right)\right) - y \cdot 0.5\right) + \color{blue}{1 \cdot 0.918938533204673003}\]
  7. Applied *-un-lft-identity0.0

    \[\leadsto \color{blue}{1 \cdot \left(\left(x \cdot y + x \cdot \left(-1\right)\right) - y \cdot 0.5\right)} + 1 \cdot 0.918938533204673003\]
  8. Applied distribute-lft-out0.0

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

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

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

Reproduce

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