Average Error: 0.0 → 0.0
Time: 6.9s
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 r60709 = x;
        double r60710 = y;
        double r60711 = 1.0;
        double r60712 = r60710 - r60711;
        double r60713 = r60709 * r60712;
        double r60714 = 0.5;
        double r60715 = r60710 * r60714;
        double r60716 = r60713 - r60715;
        double r60717 = 0.918938533204673;
        double r60718 = r60716 + r60717;
        return r60718;
}

double f(double x, double y) {
        double r60719 = y;
        double r60720 = x;
        double r60721 = r60719 * r60720;
        double r60722 = 1.0;
        double r60723 = -r60722;
        double r60724 = r60723 * r60720;
        double r60725 = r60721 + r60724;
        double r60726 = 0.5;
        double r60727 = r60719 * r60726;
        double r60728 = r60725 - r60727;
        double r60729 = 0.918938533204673;
        double r60730 = r60728 + r60729;
        return r60730;
}

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