avoid #8231, bitwise move to mul,div (#15070)

* avoid #8231, bitwise move to mul,div

* add test for #8231

* fix bitwise move when div result is float

* bitwise move depends on typ.size
This commit is contained in:
Bung 2020-08-25 15:58:32 +08:00 • committed by GitHub
commit 7cee63bba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

3
tests/js/t8231.nim Normal file
View file

@ -0,0 +1,3 @@
import strutils
doAssert formatSize(2462056448, '.', bpIEC, false) == "2.293GiB"