Converts a string to a double, stopping at the first invalid character.
double atof(String str) { return strtod(str); }