Comp Sci Maximum Digits and Bits for C++ unsigned long double

  • Thread starter Thread starter Deathfish
  • Start date Start date
  • Tags Tags
    C++
AI Thread Summary
In C++, there is no standard type called "unsigned long double," as it combines an integer type and a floating-point type incorrectly. The maximum sizes for "unsigned long" and "long double" vary based on the specific C++ implementation and compiler used. To determine the maximum sizes, the "limits.h" header file should be referenced, which provides information on the largest values for different data types. The operating system's architecture, whether 32-bit or 64-bit, can influence the sizes of these types but does not change the fundamental definitions. Understanding these distinctions is crucial for proper data type usage in C++.
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.
 
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...

Similar threads

Replies
2
Views
2K
Replies
1
Views
4K
Replies
10
Views
2K
Replies
2
Views
1K
Replies
7
Views
3K
Replies
2
Views
3K
Replies
5
Views
3K
Replies
17
Views
3K
Back
Top