fix bug after adding suffix code

This commit is contained in:
NunoSempere 2024-06-30 13:24:50 -04:00
parent 860e63b4be
commit 8b88beae88

View File

@ -62,7 +62,6 @@ func multiplyOrPassThroughError(a float64, b float64, err error) (float64, error
func ParseFloat(word string) (float64, error) {
// l = len(word) // assuming no UTF stuff
switch len(word) {
case 0:
return 0, errors.New("String to be parsed into float must not be the empty string")
@ -82,7 +81,7 @@ func ParseFloat(word string) (float64, error) {
case 'T':
return multiplyOrPassThroughError(1_000_000_000_000, f, err)
default:
return f, err
return strconv.ParseFloat(word, 64)
}
}