Average Error: 39.1 → 39.1
Time: 3.3s
Precision: binary64
\[\left(\left({2}^{x}\right) \bmod 1\right)\]
\[\left(\left({2}^{x}\right) \bmod 1\right)\]
\left(\left({2}^{x}\right) \bmod 1\right)
\left(\left({2}^{x}\right) \bmod 1\right)
double code(double x) {
	return ((double) fmod(((double) pow(2.0, x)), 1.0));
}
double code(double x) {
	return ((double) fmod(((double) pow(2.0, x)), 1.0));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 39.1

    \[\left(\left({2}^{x}\right) \bmod 1\right)\]
  2. Final simplification39.1

    \[\leadsto \left(\left({2}^{x}\right) \bmod 1\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x)
  :name "(fmod (pow 2 x) 1)"
  :precision binary64
  (fmod (pow 2.0 x) 1.0))