Average Error: 0.0 → 0.0
Time: 10.1s
Precision: 64
\[\left(x \cdot \left(y - 1.0\right) - y \cdot 0.5\right) + 0.918938533204673\]
\[\left(0.918938533204673 - 0.5 \cdot y\right) + \left(y - 1.0\right) \cdot x\]
\left(x \cdot \left(y - 1.0\right) - y \cdot 0.5\right) + 0.918938533204673
\left(0.918938533204673 - 0.5 \cdot y\right) + \left(y - 1.0\right) \cdot x
double f(double x, double y) {
        double r2714973 = x;
        double r2714974 = y;
        double r2714975 = 1.0;
        double r2714976 = r2714974 - r2714975;
        double r2714977 = r2714973 * r2714976;
        double r2714978 = 0.5;
        double r2714979 = r2714974 * r2714978;
        double r2714980 = r2714977 - r2714979;
        double r2714981 = 0.918938533204673;
        double r2714982 = r2714980 + r2714981;
        return r2714982;
}

double f(double x, double y) {
        double r2714983 = 0.918938533204673;
        double r2714984 = 0.5;
        double r2714985 = y;
        double r2714986 = r2714984 * r2714985;
        double r2714987 = r2714983 - r2714986;
        double r2714988 = 1.0;
        double r2714989 = r2714985 - r2714988;
        double r2714990 = x;
        double r2714991 = r2714989 * r2714990;
        double r2714992 = r2714987 + r2714991;
        return r2714992;
}

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 \color{blue}{\left(x \cdot \left(y - 1.0\right) + \left(-y \cdot 0.5\right)\right)} + 0.918938533204673\]
  4. Applied associate-+l+0.0

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

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

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

Reproduce

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