background preloader

Java

Facebook Twitter

Java performance

Debugging pearls. ShowCase. Spring. Aparapi. Java and JavaScript Programming, by Richard G Baldwin. Web services. Java Hangs When Converting 2.2250738585072012e-308 - Exploring Binary. Copyright © 2008-2014 Exploring Binary Konstantin Preißer made an interesting discovery, after reading my article “PHP Hangs On Numeric Value 2.2250738585072011e-308”: Java — both its runtime and compiler — go into an infinite loop when converting the decimal number 2.2250738585072012e-308 to double-precision binary floating-point.

Java Hangs When Converting 2.2250738585072012e-308 - Exploring Binary

This number is supposed to convert to 0x1p-1022, which is DBL_MIN; instead, Java gets stuck, oscillating between 0x1p-1022 and 0x0.fffffffffffffp-1022, the largest subnormal double-precision floating-point number. Send a Java Program Into An Infinite Loop.