e mai "precisa"
double atof(char * s) {
double rez = 0, dec = 1;
int pct = 0, minus = 0;
if ( * s == '-') {
s++;
minus = 1;
}
while ( * s) {
if (pct) {
dec = dec / 10;
rez = rez + ( * s - '0') * dec;
}
else {
if ( * s == '.')
pct++;
else
rez = rez * 10.0 + ( * s - '0');
}
s++;
}
if (minus)
return -rez;
else
return rez;
}