Average Error: 0.0 → 0.0
Time: 1.5s
Precision: binary64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\[\left(1 \cdot \left(x \cdot y - x\right) - y \cdot 0.5\right) + 0.918938533204673003\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673003
\left(1 \cdot \left(x \cdot y - x\right) - y \cdot 0.5\right) + 0.918938533204673003
double code(double x, double y) {
	return ((double) (((double) (((double) (x * ((double) (y - 1.0)))) - ((double) (y * 0.5)))) + 0.918938533204673));
}
double code(double x, double y) {
	return ((double) (((double) (((double) (1.0 * ((double) (((double) (x * y)) - x)))) - ((double) (y * 0.5)))) + 0.918938533204673));
}

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 flip--11.4

    \[\leadsto \left(x \cdot \color{blue}{\frac{y \cdot y - 1 \cdot 1}{y + 1}} - y \cdot 0.5\right) + 0.918938533204673003\]
  4. Applied associate-*r/13.6

    \[\leadsto \left(\color{blue}{\frac{x \cdot \left(y \cdot y - 1 \cdot 1\right)}{y + 1}} - y \cdot 0.5\right) + 0.918938533204673003\]
  5. Taylor expanded around 0 0.0

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

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

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

Reproduce

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