Does the problem solve when u keep try it with a smaller number ?

say a number between -32767 to +32767 ?

I think u need to use some other float datatype something that supports larger numbers.

Not sure though.



----- Original Message ----- 
From: Vertical rains <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 8:04 PM
Subject: [ilugd]: trivial C problem


> hello everyone
> 
>         i have the following program
> 
> ///////////////////////////////////
> 
> #include <stdio.h>
> #include <iostream.h>
> void main ()
> {
>   float x = 1073741855;
> 
>   printf ("%f\n", x);
>   cout << x;
> }
> 
> //////////////////////////////////
> 
> and the out put on running is as follows
> 
> 1073741824.000000
> 1.07374e+09
> 
> What i want to know is that why am i not 
> getting
> the o/p as  1073741855 .There is a difference 
> of 31.What am i doing wrong?
> 
> Thanks everybody.
> Regards
> Virindera
> 
> 
> -- 
> 
> _______________________________________________
> Win a ski trip!
> 
>http://ad.doubleclick.net/clk;3840379;4478627;x?http://www.nowcode.com/register.asp?affiliate=1net2phone3a
> 
> 
>           ================================================
> To subscribe, send email to [EMAIL PROTECTED] with subscribe in subject header
> To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject 
>header
> Archives are available at http://www.mail-archive.com/ilugd%40wpaa.org
>           =================================================
> 

          ================================================
To subscribe, send email to [EMAIL PROTECTED] with subscribe in subject header
To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject header
Archives are available at http://www.mail-archive.com/ilugd%40wpaa.org
          =================================================

Reply via email to