Re: how compiler decide the range of real numbers in C...

Glynn Clements <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
RAM_LOCK wrote:

> Say 16 bit compiler (for ex Turbo C) uses 2's compliment to find the range of
> signed integer.
> Say for 16 bit n=16. Now applying 2's compliment equation : -2^(n-1)  to
> 2^(n-1) -1
> so for n=16 : The range is -32768 to 32767
> 
> This is ok. The question arises when it tell about real constant's range.
> For 16 bit compiler the range of real constant is : -3.4e38 to 3.4e38
> 
> How they arrived to this real constant range?
> 
> Can any one share the mathematical calculation behind it?

	http://en.wikipedia.org/wiki/IEEE_754-1985

-- 
Glynn Clements <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.