Average Error: 0 → 0
Time: 504.0ms
Precision: binary64
\[\left(x \bmod 2\right)\]
\[\left(x \bmod 2\right)\]
\left(x \bmod 2\right)
\left(x \bmod 2\right)
double code(double x) {
	return ((double) fmod(x, 2.0));
}
double code(double x) {
	return ((double) fmod(x, 2.0));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

    \[\left(x \bmod 2\right)\]
  2. Final simplification0

    \[\leadsto \left(x \bmod 2\right)\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x)
  :name "(fmod x 2)"
  :precision binary64
  (fmod x 2.0))