C Programming - Floating Point Issues - Discussion

Discussion :: Floating Point Issues - General Questions (Q.No.4)


Which of the following range is a valid long double (Turbo C in 16 bit DOS OS) ?

[A]. 3.4E-4932 to 1.1E+4932
[B]. 3.4E-4932 to 3.4E+4932
[C]. 1.1E-4932 to 1.1E+4932
[D]. 1.7E-4932 to 1.7E+4932

Answer: Option A


The range of long double is 3.4E-4932 to 1.1E+4932

Bindhu said: (Nov 1, 2010)  
Very good.

Dee said: (Nov 2, 2010)  
Anyone explain this?

Kiran Chowdary said: (Apr 14, 2011)  
Can any one explain please?

Jitendra Jain said: (Apr 30, 2011)  
I explain it that it is a consatant and fixed size.

Suganya said: (Sep 2, 2011)  
Please give a more explanation?

Kirti said: (Oct 12, 2011)  
1.7E +/- 308 (15 digits) this answer is correct.

Pavan said: (Nov 3, 2011)  
What is significance of 4932?

Pawan said: (Feb 5, 2012)  
According to "Let us C" it is -1.7e4932 to 1.7e4932.

So please tell me which one is correct?

Sundar said: (Dec 2, 2012)  
long double (80 bits or 10 bytes) : 3.4 * (10^-4932) to 1.1 * (10^+4932)

In Turbo C: (16 bit DOS Operating system).

int main()
printf("long double size = %d", sizeof(long double));
return 0;

Output: 10

If you execute the same in IndiaBIX's Online compiler (32 bit Linux OS), the output will be 12.

Ritesh_IIIT said: (Jul 20, 2013)  

Yes friend you are absolutely correct but in books long double range is given as -1.7e4932 to +1.7e4932 and of the size of 10 bytes with format specifier as %Lf.

Geetha said: (Jun 22, 2014)  
If the OS different means the range of the datatype is also different?

Parag said: (Mar 8, 2015)  
I too think that it is -1.7e4932 to +1.7e4932.

Ishaan said: (Dec 28, 2015)  
Can someone explain how it comes 80 bits?

Is their any logic to find the value?

Long means 4 bytes.
Double means 8 bytes.

How long double 10 bytes?

Purni said: (Mar 5, 2016)  
The long double default range is same as the the double from 1.7E-308 to 1.7E+308.

But the long double data type is system(Processor, ABI, compiler)dependent and so its range varies accordingly.

You can also check the long double range with the function std::numeric_limits<long double>::min and std::numeric_limits<long double>::max.

Shivam said: (Jun 16, 2016)  
What is E stands for?

Nakul said: (May 31, 2017)  
Can anyone explain it properly?

Shivam said: (Feb 10, 2021)  
I think. -1.7e4932 is the right answer.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.