I have found somewhere a pretty weird number declaration in Java.
double x = 0xap-001;
I am curious why the value of x is 5.0
p indicates a binary exponentiation. So you have hex 0xa == 10, with a binary exponent of -1 - in other words a shift right or div 2. The result is 10/2 = 5.