Average Error: 0.0 → 0.0
Time: 2.4s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\[\left(\left(y \cdot x + \left(-1\right) \cdot x\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003
\left(\left(y \cdot x + \left(-1\right) \cdot x\right) - y \cdot 0.5\right) + 0.918938533204673003
double f(double x, double y) {
        double r52692 = x;
        double r52693 = y;
        double r52694 = 1.0;
        double r52695 = r52693 - r52694;
        double r52696 = r52692 * r52695;
        double r52697 = 0.5;
        double r52698 = r52693 * r52697;
        double r52699 = r52696 - r52698;
        double r52700 = 0.918938533204673;
        double r52701 = r52699 + r52700;
        return r52701;
}

double f(double x, double y) {
        double r52702 = y;
        double r52703 = x;
        double r52704 = r52702 * r52703;
        double r52705 = 1.0;
        double r52706 = -r52705;
        double r52707 = r52706 * r52703;
        double r52708 = r52704 + r52707;
        double r52709 = 0.5;
        double r52710 = r52702 * r52709;
        double r52711 = r52708 - r52710;
        double r52712 = 0.918938533204673;
        double r52713 = r52711 + r52712;
        return r52713;
}

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. Simplified0.0

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

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

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

Reproduce

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