Average Error: 0.0 → 0.0
Time: 15.1s
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) - 0.5 \cdot y\right) + x \cdot y\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) - 0.5 \cdot y\right) + x \cdot y\right)
double f(double x, double y) {
        double r4263733 = x;
        double r4263734 = y;
        double r4263735 = 1.0;
        double r4263736 = r4263734 - r4263735;
        double r4263737 = r4263733 * r4263736;
        double r4263738 = 0.5;
        double r4263739 = r4263734 * r4263738;
        double r4263740 = r4263737 - r4263739;
        double r4263741 = 0.918938533204673;
        double r4263742 = r4263740 + r4263741;
        return r4263742;
}

double f(double x, double y) {
        double r4263743 = 0.918938533204673;
        double r4263744 = 1.0;
        double r4263745 = x;
        double r4263746 = -r4263745;
        double r4263747 = r4263744 * r4263746;
        double r4263748 = 0.5;
        double r4263749 = y;
        double r4263750 = r4263748 * r4263749;
        double r4263751 = r4263747 - r4263750;
        double r4263752 = r4263745 * r4263749;
        double r4263753 = r4263751 + r4263752;
        double r4263754 = r4263743 + r4263753;
        return r4263754;
}

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. Applied associate--l+0.0

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

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

Reproduce

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