mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
strconv: fix on ftoa string decimal aproximation, 'nan' string fix
This commit is contained in:
@ -165,4 +165,8 @@ fn test_float_to_str(){
|
||||
//println(b)
|
||||
assert b.len == exp + 2
|
||||
}
|
||||
|
||||
// test rounding str conversion
|
||||
assert f64_to_str(0.3456789123456, 4)=="3.4568e-01"
|
||||
assert f32_to_str(0.345678, 3)=="3.457e-01"
|
||||
}
|
||||
|
Reference in New Issue
Block a user