Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: C++ unsigned long double

  1. Jul 29, 2010 #1
    in C++, how many digits and how many bits is the maximum allocated for unsigned long double?
  2. jcsd
  3. Jul 29, 2010 #2

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    None. There is no such thing as an unsigned long double, at least not in the standard. If you have such a beast you are using a non-compliant C++ compiler.
  4. Jul 29, 2010 #3
    ok so what's the maximum then...

    and how does having a 32-bit or 64-bit OS affect this?
  5. Jul 29, 2010 #4


    Staff: Mentor

    What's the maximum of what? I think that you are confusing two different types: unsigned long (or unsigned long int) and long double.

    The first is an integer type and the second is a floating point type. The sizes of these types depends on your particular C++ implementation. You should have a header file named "limits.h" that will indicate the largest sizes of ints, long ints, floats, doubles, and so on.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook