I'd suggest this small patch as currently if I'm not mistaken values like ' -123.123' would be considered not double for purposes of is_double function.
Also I guess that doubles mostly consist of figures(numbers), so checking if the c[i] is a figure first is a bit more optimal =)
Also I guess that doubles mostly consist of figures(numbers), so checking if the c[i] is a figure first is a bit more optimal =)