builtin: fix f32.str() (#16391)

This commit is contained in:
yuyi 2022-11-11 19:56:45 +08:00 committed by GitHub
parent c1a44efc78
commit c9ce5f89c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -85,10 +85,10 @@ pub fn (x f32) str() string {
f: x
}
if f.u == strconv.single_minus_zero {
return '-0.'
return '-0.0'
}
if f.u == strconv.single_plus_zero {
return '0.'
return '0.0'
}
}
abs_x := f32_abs(x)