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 6998889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:28:09+00:00 2026-05-27T20:28:09+00:00

In java.lang.Double , there are the following constant declarations: public static final double MAX_VALUE

  • 0

In java.lang.Double, there are the following constant declarations:

public static final double MAX_VALUE = 0x1.fffffffffffffP+1023;
public static final double MIN_NORMAL = 0x1.0p-1022;

What is the P for? Is the difference in case important?

I am aware of the L, D and F used for Longs, Doubles and Floats, but have never seen a P before.

  • 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-05-27T20:28:09+00:00Added an answer on May 27, 2026 at 8:28 pm

    The P (or p) indicates a hexadecimal floating-point literal, where the significand is specified in hex.

    The p is used instead of the e. The d and f suffixes that you’ve seen are orthogonal to this: both 0x1.0p+2f and 0x1.0p+2d are valid literals (one is of type float and the other is of type double).

    At first glance it might seem that the 0x prefix is sufficient to identify a hex floating-point literal, so why have the Java designers chosen to change the letter from e to p? This has to do with e being a valid hex digit, so keeping it would give rise to parsing ambiguity. Consider:

    0x1e+2
    

    Is that a hex double or the sum of two integers, 0x1e and 2? When we change e to p, the ambiguity is resolved:

    0x1p+2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

import java.lang.Math; public class NewtonIteration { public static void main(String[] args) { System.out.print(rootNofX(2,9)); }
import java.lang.reflect.Array; public class PrimitiveArrayGeneric { static <T> T[] genericArrayNewInstance(Class<T> componentType) { return (T[])
The documentation for java.lang.Double.NaN says that it is A constant holding a Not-a-Number (NaN)
What is happening when a java.lang.Double object is initialized without using a call to
Consider MyClass.java: public class MyClass { public void firstfunction(double fwd[]) { fwd[0] = 42;
I have static java methods which I add to javascript with this method: public
During navigation of the java.lang.reflect.Method class I came across the method isBridge . Its
If you decompile the java.lang.Class class in java from the rt.jar library you will
JBOSS is throwing a: java.lang.NoSuchMethodError: org.w3c.dom.Document.getDocumentURI()Ljava/lang/String; Error when loading a wsdl. Can I configure
The JDK documentation for java.lang.String.hashCode() famously says: The hash code for a String object

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.