Maximum Digits and Bits for C++ unsigned long double

  • Context: Comp Sci 
  • Thread starter Thread starter Deathfish
  • Start date Start date
  • Tags Tags
    C++
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
3 replies · 10K views
Deathfish
Messages
80
Reaction score
0
in C++, how many digits and how many bits is the maximum allocated for unsigned long double?
 
Physics news on Phys.org
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.
 
ok so what's the maximum then...

and how does having a 32-bit or 64-bit OS affect this?
 
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.