Average Error: 0.0 → 0.0
Time: 1.6s
Precision: binary64
\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673\]
\[\left(x \cdot y + 0.918938533204673\right) - \left(y \cdot 0.5 + x \cdot 1\right)\]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673
\left(x \cdot y + 0.918938533204673\right) - \left(y \cdot 0.5 + x \cdot 1\right)
(FPCore (x y)
 :precision binary64
 (+ (- (* x (- y 1.0)) (* y 0.5)) 0.918938533204673))
(FPCore (x y)
 :precision binary64
 (- (+ (* x y) 0.918938533204673) (+ (* y 0.5) (* x 1.0))))
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) (x * y)) + 0.918938533204673)) - ((double) (((double) (y * 0.5)) + ((double) (x * 1.0))))));
}

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 Error: 0.0 bits

    \[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673\]
  2. Using strategy rm
  3. Applied sub-negError: 0.0 bits

    \[\leadsto \left(x \cdot \color{blue}{\left(y + \left(-1\right)\right)} - y \cdot 0.5\right) + 0.918938533204673\]
  4. Applied distribute-lft-inError: 0.0 bits

    \[\leadsto \left(\color{blue}{\left(x \cdot y + x \cdot \left(-1\right)\right)} - y \cdot 0.5\right) + 0.918938533204673\]
  5. Applied associate--l+Error: 0.0 bits

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

    \[\leadsto \color{blue}{x \cdot y + \left(\left(x \cdot \left(-1\right) - y \cdot 0.5\right) + 0.918938533204673\right)}\]
  7. SimplifiedError: 0.0 bits

    \[\leadsto x \cdot y + \color{blue}{\left(0.918938533204673 - \left(y \cdot 0.5 + x \cdot 1\right)\right)}\]
  8. Using strategy rm
  9. Applied associate-+r-Error: 0.0 bits

    \[\leadsto \color{blue}{\left(x \cdot y + 0.918938533204673\right) - \left(y \cdot 0.5 + x \cdot 1\right)}\]
  10. Final simplificationError: 0.0 bits

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

Reproduce

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