Average Error: 0.0 → 0.0
Time: 9.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) + y \cdot x\right) - 0.5 \cdot y\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) + y \cdot x\right) - 0.5 \cdot y\right)
double f(double x, double y) {
        double r3236567 = x;
        double r3236568 = y;
        double r3236569 = 1.0;
        double r3236570 = r3236568 - r3236569;
        double r3236571 = r3236567 * r3236570;
        double r3236572 = 0.5;
        double r3236573 = r3236568 * r3236572;
        double r3236574 = r3236571 - r3236573;
        double r3236575 = 0.918938533204673;
        double r3236576 = r3236574 + r3236575;
        return r3236576;
}

double f(double x, double y) {
        double r3236577 = 0.918938533204673;
        double r3236578 = 1.0;
        double r3236579 = x;
        double r3236580 = -r3236579;
        double r3236581 = r3236578 * r3236580;
        double r3236582 = y;
        double r3236583 = r3236582 * r3236579;
        double r3236584 = r3236581 + r3236583;
        double r3236585 = 0.5;
        double r3236586 = r3236585 * r3236582;
        double r3236587 = r3236584 - r3236586;
        double r3236588 = r3236577 + r3236587;
        return r3236588;
}

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-rgt-in0.0

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

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

Reproduce

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