This content has been marked as final. Show 12 replies
SASPROGR wrote:We can tell you which numbers CAN be represented in 64-bit IEEE 754 floating point (Java double);
The reason being 4671.11 cannot be represented exactly in floating point.
Can anyone please tell me which are the other numbers in Java which cannot be represented as floating point numbers.
scalars up to 2 ^53^ and
fractions with a numerator up to 2 ^53^ and a denominator that is a power of 2.
yawmark wrote:Let J denote the set of numbers that CAN be represented in 64-bit IEEE 754 floating point (Java double),
It's pretty long!
then the answer to the original question is a simple complement; R [\|http://en.wikipedia.org/wiki/Set_%28mathematics%29#Complements] J
Do they think it's an abbreviation?Yep. Someone took a dozen posts of near incomprehensible broken English to ask what it stood for the other day. Probably not helped by the fact that Sun's stock ticker is JAVA all caps (I presume that'll go when Snoracle goes live).
Edited by: dcminter on 22-Dec-2009 14:33
SASPROGR wrote:For numbers that can be represented, google IEEE 754.
Can you please provide info over the list. Also, how you got to know these numbers .... if by computation or is it published.
For numbers that cannot be represented, please understand that since double is 64 bits, at most 2^64 distinct values can be represented, and also please understand that between any two values that can be represented, there are uncountably infinitely many that cannot.
For instance, between the numbers
there are infinitely many numbers, and not only infinitely many, but "more infinitely many" than there are integers from 0 to infinity.
0.0000000000000000000000000000000000000000_1_00000000000000000000000000000_0_ and 0.0000000000000000000000000000000000000000_1_00000000000000000000000000000_1_
Edited by: jverd on Dec 23, 2009 12:17 AM
SASPROGR wrote:Other than what I already conveyed in [reply #2|http://forums.sun.com/thread.jspa?messageID=10891841#10891841] and [reply #4|http://forums.sun.com/thread.jspa?messageID=10892004#10892004]?
Can you please provide info over the list.
Also, how you got to know these numbers .... if by computation or is it published.It can be determined from the IEEE 754 spec.