ieee754 « float « Java Data Type Q&A





1. Can java floats be sorted by their byte representations?    stackoverflow.com

I'm working in Hadoop, and I need to provide a comparator to sort objects as raw network order byte arrays. This is easy for me to do with integers -- I ...

2. IBM to IEEE floating point conv    stackoverflow.com

Is there any standard method in java to convert IBM 370(in the form of bytes) to IEEE format.?Any algorithm for the conversion would help.. I tried writing a java code..But i fail ...

3. Java - Convert hex to IEEE-754 64-bit float - double precision    stackoverflow.com

I'm trying to convert the following hex string: "41630D54FFF68872" to 9988776.0 (float-64). With a single precision float-32 I would do: int intBits = Long.valueOf("hexFloat32", 16).intValue(); float floatValue = Float.intBitsToFloat(intBits); but this throws a: java.lang.NumberFormatException: Infinite ...

4. Java float to double - upper and lower bounds?    stackoverflow.com

As most here will know, double -> float incurs a loss in precision. This means, multiple double values may be mapped to the same float value. But how do I go the ...