andretenreiro
03-25-2010, 08:45 AM
#include <stdio.h>
int main()
{
char *str = "-0.096686035";
double value;
value = atof(str);
printf("The value is: %.10f \n", value);
}
The value is: -1.0000000000
How can I get the exactly value instead of the rounded value?
int main()
{
char *str = "-0.096686035";
double value;
value = atof(str);
printf("The value is: %.10f \n", value);
}
The value is: -1.0000000000
How can I get the exactly value instead of the rounded value?
