A werid double calculating in VS2008
Recently I am working on a project and encounter a werid problem in
VS2008. In my project, some calculating is needed, but after the
calculating I get an illegal value ( -1.#IND000000000000).
For example:
double a,b,c,d;
And I want to get d by:
d=a*b+c*c;
But the result is -1.#IND000000000000.
However, if I calculat a*b first:
double e=a*b;
Then I get the right value of d by:
d=e+c*c;
I have worked on this problem for a long time and hope some hospital
friends could give me some suggestion! Thanks very much.
No comments:
Post a Comment