JDK-4896828 : Request to support hexadecimal floating-point literals
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Affected Version: 5.0
  • Priority: P5
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-07-26
  • Updated: 2017-05-16
  • Resolved: 2007-01-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
5.0 rcFixed
Related Reports
Relates :  
With the addition of library support for hexadecimal floating-point strings (bug 4826774) it would be convenient if those strings could also be used as floating-point literals in the Java source language, as is possible in C99.

A Java-style EBNF grammar for hexadecimal strings is available as part of the 4826774 work.

Having hexadecimal floating-point literal support would allow a precise way to specify floating-point constants that could then be propagated as constants by the compiler.

EVALUATION Specified in JLS 3ed 3.10.2.

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger

WORK AROUND Use the library methods; e.g. double d = Double.parseDouble("0x1.0p0"); instead of double d = 0x1.0p0; However, in the former case d will not be treated as a constant expression by the javac compiler.

EVALUATION A reasonable idea. ###@###.### 2003-07-27 This has already passed CCC and the compiler work is proceeding nicely. ###@###.### 2003-09-09