Code:int main() { double big_number; big_number = (1/61601) * sqrt((61602*61599)/61603); printf("%f",big_number); }
i get the error
???Code:warning C4307: '*' : integral constant overflow
Code:int main() { double big_number; big_number = (1/61601) * sqrt((61602*61599)/61603); printf("%f",big_number); }
i get the error
???Code:warning C4307: '*' : integral constant overflow
Something to do with this statement (1/61601) is my guess
is it because my variable is too small ?
3794621598Originally Posted by paperbox005
This -- 1/61601 -- is zero, BTW.
[edit]Code:#include <stdio.h> #include <math.h> int main() { double big_number; big_number = (1.0/61601.0) * sqrt((61602.0*61599.0)/61603.0); printf("INT_MAX = %d\n", INT_MAX); printf("%f\n",big_number); return 0; } /* my output INT_MAX = 2147483647 0.004029 */
Last edited by Dave_Sinkula; 05-06-2005 at 09:53 PM.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*