Average Error: 0.0 → 0.0
Time: 5.7s
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) + x \cdot y\right) - y \cdot 0.5\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) + x \cdot y\right) - y \cdot 0.5\right)
double f(double x, double y) {
        double r2448767 = x;
        double r2448768 = y;
        double r2448769 = 1.0;
        double r2448770 = r2448768 - r2448769;
        double r2448771 = r2448767 * r2448770;
        double r2448772 = 0.5;
        double r2448773 = r2448768 * r2448772;
        double r2448774 = r2448771 - r2448773;
        double r2448775 = 0.918938533204673;
        double r2448776 = r2448774 + r2448775;
        return r2448776;
}

double f(double x, double y) {
        double r2448777 = 0.918938533204673;
        double r2448778 = 1.0;
        double r2448779 = x;
        double r2448780 = -r2448779;
        double r2448781 = r2448778 * r2448780;
        double r2448782 = y;
        double r2448783 = r2448779 * r2448782;
        double r2448784 = r2448781 + r2448783;
        double r2448785 = 0.5;
        double r2448786 = r2448782 * r2448785;
        double r2448787 = r2448784 - r2448786;
        double r2448788 = r2448777 + r2448787;
        return r2448788;
}

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. Final simplification0.0

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

Reproduce

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