Average Error: 0.0 → 0.0
Time: 3.5s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\[\left(\left(y \cdot x + \left(-1\right) \cdot x\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003
\left(\left(y \cdot x + \left(-1\right) \cdot x\right) - y \cdot 0.5\right) + 0.918938533204673003
double f(double x, double y) {
        double r64114 = x;
        double r64115 = y;
        double r64116 = 1.0;
        double r64117 = r64115 - r64116;
        double r64118 = r64114 * r64117;
        double r64119 = 0.5;
        double r64120 = r64115 * r64119;
        double r64121 = r64118 - r64120;
        double r64122 = 0.918938533204673;
        double r64123 = r64121 + r64122;
        return r64123;
}

double f(double x, double y) {
        double r64124 = y;
        double r64125 = x;
        double r64126 = r64124 * r64125;
        double r64127 = 1.0;
        double r64128 = -r64127;
        double r64129 = r64128 * r64125;
        double r64130 = r64126 + r64129;
        double r64131 = 0.5;
        double r64132 = r64124 * r64131;
        double r64133 = r64130 - r64132;
        double r64134 = 0.918938533204673;
        double r64135 = r64133 + r64134;
        return r64135;
}

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\right) - y \cdot 0.5\right) + 0.918938533204673003\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto \left(x \cdot \color{blue}{\left(y + \left(-1\right)\right)} - y \cdot 0.5\right) + 0.918938533204673003\]
  4. Applied distribute-lft-in0.0

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

    \[\leadsto \left(\left(\color{blue}{y \cdot x} + x \cdot \left(-1\right)\right) - y \cdot 0.5\right) + 0.918938533204673003\]
  6. Simplified0.0

    \[\leadsto \left(\left(y \cdot x + \color{blue}{\left(-1\right) \cdot x}\right) - y \cdot 0.5\right) + 0.918938533204673003\]
  7. Final simplification0.0

    \[\leadsto \left(\left(y \cdot x + \left(-1\right) \cdot x\right) - y \cdot 0.5\right) + 0.918938533204673003\]

Reproduce

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