Average Error: 0.0 → 0.0
Time: 13.9s
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 r3987727 = x;
        double r3987728 = y;
        double r3987729 = 1.0;
        double r3987730 = r3987728 - r3987729;
        double r3987731 = r3987727 * r3987730;
        double r3987732 = 0.5;
        double r3987733 = r3987728 * r3987732;
        double r3987734 = r3987731 - r3987733;
        double r3987735 = 0.918938533204673;
        double r3987736 = r3987734 + r3987735;
        return r3987736;
}

double f(double x, double y) {
        double r3987737 = 0.918938533204673;
        double r3987738 = 1.0;
        double r3987739 = x;
        double r3987740 = -r3987739;
        double r3987741 = r3987738 * r3987740;
        double r3987742 = 0.5;
        double r3987743 = y;
        double r3987744 = r3987742 * r3987743;
        double r3987745 = r3987741 - r3987744;
        double r3987746 = r3987739 * r3987743;
        double r3987747 = r3987745 + r3987746;
        double r3987748 = r3987737 + r3987747;
        return r3987748;
}

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