This doesn't work for real numbers. And I think the special handling for `=` here isn't appropriate - if there's an equals sign, it's not a number.

If you want to do it this way, you can use `strtod` or wrap the argument in `istringstream` and try reading a `double` out of it, but really, I don't think we need to be this clever - just use the original check for staring with `-[0-9]`.