Hasanov was kind enough to contribute study questions the other day. Many thanks to you!
Here is something that caught my attention:
double d = 1/0.0;
byte b = (byte)d; //OK, b=-1
byte b = (byte)Double.NaN; //OK, b=0
Why is this? In d above d = NaN. Why does it get translated into -1 in one instance and 0 in the other?
I have read the Math API, I've gone to the JLS
http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html#9208 I have looked at the Double API.
Please no requests to "look it up".
Any assistance would be greatly appreciated.
Pres
Those who don't <want to help by providing an answer>, <should not post>.