Average Error: 0.0 → 0.0
Time: 4.1s
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 r56703 = x;
        double r56704 = y;
        double r56705 = 1.0;
        double r56706 = r56704 - r56705;
        double r56707 = r56703 * r56706;
        double r56708 = 0.5;
        double r56709 = r56704 * r56708;
        double r56710 = r56707 - r56709;
        double r56711 = 0.918938533204673;
        double r56712 = r56710 + r56711;
        return r56712;
}

double f(double x, double y) {
        double r56713 = y;
        double r56714 = x;
        double r56715 = r56713 * r56714;
        double r56716 = 1.0;
        double r56717 = -r56716;
        double r56718 = r56717 * r56714;
        double r56719 = r56715 + r56718;
        double r56720 = 0.5;
        double r56721 = r56713 * r56720;
        double r56722 = r56719 - r56721;
        double r56723 = 0.918938533204673;
        double r56724 = r56722 + r56723;
        return r56724;
}

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 2020047 
(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))