Fix conversion from float/double to unsigned int
signed int can't represent all the values of unsigned int, so we need to do the conversion to signed long, and use the lower 32 bits as the result.
This commit is contained in:
parent
d41d91ddd8
commit
d6c9669c3c
2 changed files with 7 additions and 2 deletions
|
@ -92,7 +92,7 @@ function l $dtol(d %f) {
|
|||
# 0xdcf5fbe299d0148aull, 0xffffffff00000000ull, -1 };
|
||||
#
|
||||
# double fin[] = { 0.17346516197824458, 442.0760005466251, 4342856.879893436,
|
||||
# 98547543006.49626, 236003043787688.3, 9.499222733527032e+18,
|
||||
# 4294967295.0, 98547543006.49626, 236003043787688.3, 9.499222733527032e+18,
|
||||
# 1.1936266170755652e+19 };
|
||||
#
|
||||
# int main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue