Average Error: 0.0 → 0.0
Time: 14.0s
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 r4284854 = x;
        double r4284855 = y;
        double r4284856 = 1.0;
        double r4284857 = r4284855 - r4284856;
        double r4284858 = r4284854 * r4284857;
        double r4284859 = 0.5;
        double r4284860 = r4284855 * r4284859;
        double r4284861 = r4284858 - r4284860;
        double r4284862 = 0.918938533204673;
        double r4284863 = r4284861 + r4284862;
        return r4284863;
}

double f(double x, double y) {
        double r4284864 = 0.918938533204673;
        double r4284865 = 1.0;
        double r4284866 = x;
        double r4284867 = -r4284866;
        double r4284868 = r4284865 * r4284867;
        double r4284869 = y;
        double r4284870 = r4284866 * r4284869;
        double r4284871 = r4284868 + r4284870;
        double r4284872 = 0.5;
        double r4284873 = r4284869 * r4284872;
        double r4284874 = r4284871 - r4284873;
        double r4284875 = r4284864 + r4284874;
        return r4284875;
}

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 2019162 
(FPCore (x y)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, A"
  (+ (- (* x (- y 1.0)) (* y 0.5)) 0.918938533204673))