Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8503859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:52:15+00:00 2026-06-11T01:52:15+00:00

Alright, I’ve been programming in Java for the better part of three years, now,

  • 0

Alright, I’ve been programming in Java for the better part of three years, now, and consider myself very experienced. However, while looking over the Java SE source code, I ran into something I didn’t expect:

in class Double:

public static final double MIN_NORMAL = 0x1.0p-1022; // 2.2250738585072014E-308

public static final double MIN_VALUE = 0x0.0000000000001P-1022; // 4.9e-324

I did not expect this and can’t find out what it means. If you don’t know, I’m referring to the p and P that are after these numbers, before the subtraction operator. I know you can use suffixes to force a number to be a double, long, float, etc., but I’ve never encountered a p or P. I checked the Java API, but it doesn’t mention it. Is there a complete list of Java primitive number literal modifiers somewhere? Does anyone know them all?

For reference, below are the ones I’ve used or encountered, with the ones whose purposes elude me in bold with question marks (# represents any arbitrary number within respective limits):

Suffixes:

  • # = 32-bit integer int
  • #L = 64-bit integer long
  • #l = another 64-bit integer l?
  • #f = 32-bit floating-point float
  • #F = another 32-bit floating-point float?
  • #d = 64-bit floating-point double
  • #D = another 64-bit floating-point double?
  • #e# = scientific notation
  • #E# = another scientific notation?
  • #p = ?
  • #P = ?
  • Any more?

Prefixes:

  • 0b# = binary (base 2) literal
  • 0B# = another binary (base 2) literal?
  • 0# = octal (base 8) literal
  • # = decimal (base 10) literal
  • 0x# = hexadecimal (base 16) literal
  • 0X# = another hexadecimal (base 16) literal?
  • Any more?

Other (are there suffixes or prefixes for these?):

  • (byte)# = 8-bit integer byte
  • (short)# = 16-bit integer short
  • (char)# – 32-bit character char
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:52:17+00:00Added an answer on June 11, 2026 at 1:52 am

    P is the exponent. It does not matter if it’s capital or not.

    According to the Javadoc for toHextString (which we know is being used because it begins with 0x:

    public static String toHexString(double d) Returns a hexadecimal string representation of the double argument. All characters mentioned below are ASCII characters. If the argument is NaN, the result is the string "NaN". Otherwise, the result is a string that represents the sign and magnitude of the argument. If the sign is negative, the first character of the result is ‘-‘ (‘\u002D’); if the sign is positive, no sign character appears in the result. As for the magnitude m:

    • If m is infinity, it is represented by the string "Infinity"; thus, positive infinity produces the result "Infinity" and negative
      infinity produces the result "-Infinity".

    • If m is zero, it is represented by the string "0x0.0p0"; thus, negative zero produces the result "-0x0.0p0" and positive zero produces the result "0x0.0p0".

    • If m is a double value with a normalized representation, substrings are used to represent the significand and exponent fields. The significand is represented by the characters "0x1." followed by a lowercase hexadecimal representation of the rest of the significand as a fraction. Trailing zeros in the hexadecimal representation are removed unless all the digits are zero, in which case a single zero is used. Next, the exponent is represented by "p" followed by a decimal string of the unbiased exponent as if produced by a call to Integer.toString on the exponent value.

    • If m is a double value with a subnormal representation, the significand is represented by the characters "0x0." followed by a hexadecimal representation of the rest of the significand as a fraction. Trailing zeros in the hexadecimal representation are removed. Next, the exponent is represented by "p-1022". Note that there must be at least one nonzero digit in a subnormal significand.

    According to the JLS, the following pieces of grammar are accepted:

    3.10.1. Integer Literals

    IntegerTypeSuffix:

    • l
    • L

    OctalNumeral:

    • 0 OctalDigits
    • 0 Underscores OctalDigits

    HexNumeral:

    • 0 x HexDigits
    • 0 X HexDigits

    BinaryNumeral:

    • 0 b BinaryDigits
    • 0 B BinaryDigits

    3.10.2. Floating-Point Literals

    ExponentIndicator: one of

    • e
    • E

    FloatTypeSuffix: one of

    • f
    • F
    • d
    • D

    HexSignificand:

    • HexNumeral
    • HexNumeral .
    • 0 x HexDigitsopt . HexDigits
    • 0 X HexDigitsopt . HexDigits

    BinaryExponentIndicator: one of

    • p
    • P

    No other single character literals are specified for those purposes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, so I'm new to Android programming, so far my experience has been quite
Alright I'm pretty new to programming and stuff and I'm now trying to code
Alright, been at C++ for about 2 days now. Just done javascript before... I'm
Alright so I have been looking around (on SO and Google) to see if
Alright, I'm not the best with JOIN's and after all these years of working
Alright, so I've been trying to implement a simple binary search tree that uses
Alright, I'm extremely new to programming so odds are this is a really easy
Alright. This may be difficult but I have been struggling for quite a bit
Alright I've been debugging the whole day but can't figure out what the problem
Alright, I'm using form.target to open content in a new window. However, when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.