Average Error: 0.0 → 0.0
Time: 5.3s
Precision: 64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\[x \cdot y + \left(0.918938533204673003 - \left(1 \cdot x + 0.5 \cdot y\right)\right)\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003
x \cdot y + \left(0.918938533204673003 - \left(1 \cdot x + 0.5 \cdot y\right)\right)
double f(double x, double y) {
        double r86383 = x;
        double r86384 = y;
        double r86385 = 1.0;
        double r86386 = r86384 - r86385;
        double r86387 = r86383 * r86386;
        double r86388 = 0.5;
        double r86389 = r86384 * r86388;
        double r86390 = r86387 - r86389;
        double r86391 = 0.918938533204673;
        double r86392 = r86390 + r86391;
        return r86392;
}

double f(double x, double y) {
        double r86393 = x;
        double r86394 = y;
        double r86395 = r86393 * r86394;
        double r86396 = 0.918938533204673;
        double r86397 = 1.0;
        double r86398 = r86397 * r86393;
        double r86399 = 0.5;
        double r86400 = r86399 * r86394;
        double r86401 = r86398 + r86400;
        double r86402 = r86396 - r86401;
        double r86403 = r86395 + r86402;
        return r86403;
}

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. Applied associate--l+0.0

    \[\leadsto \color{blue}{\left(x \cdot y + \left(x \cdot \left(-1\right) - y \cdot 0.5\right)\right)} + 0.918938533204673003\]
  6. Applied associate-+l+0.0

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

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

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

Reproduce

herbie shell --seed 2020042 
(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))