Fix big_int_to_f64

This commit is contained in:
gingerBill
2020-05-30 16:45:49 +01:00
parent 5eaef091e2
commit d8bc2030e6
2 changed files with 56 additions and 6 deletions

View File

@@ -281,6 +281,11 @@ ExactValue exact_value_float_from_string(String string) {
}
}
if (!string_contains_char(string, '.') && !string_contains_char(string, '-')) {
// NOTE(bill): treat as integer
return exact_value_integer_from_string(string);
}
f64 f = float_from_string(string);
return exact_value_float(f);
}