diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-02-07 14:17:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-02-07 14:17:03 -0300 |
commit | 8b83417de982d068bd92e0428a42ca0cdd909789 (patch) | |
tree | cd9d0be41e457fd3b5b26d10568a505941d1046a | |
parent | e288c5a91883793d14ed9e9d93464f6ee0b08915 (diff) | |
download | lua-8b83417de982d068bd92e0428a42ca0cdd909789.tar.gz lua-8b83417de982d068bd92e0428a42ca0cdd909789.tar.bz2 lua-8b83417de982d068bd92e0428a42ca0cdd909789.zip |
Avoids a warning when lua_Number is 'float'
-rw-r--r-- | lmathlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -352,7 +352,7 @@ static lua_Number I2d (Rand64 x) { | |||
352 | SRand64 sx = (SRand64)(trim64(x) >> shift64_FIG); | 352 | SRand64 sx = (SRand64)(trim64(x) >> shift64_FIG); |
353 | lua_Number res = (lua_Number)(sx) * scaleFIG; | 353 | lua_Number res = (lua_Number)(sx) * scaleFIG; |
354 | if (sx < 0) | 354 | if (sx < 0) |
355 | res += 1.0; /* correct the two's complement if negative */ | 355 | res += l_mathop(1.0); /* correct the two's complement if negative */ |
356 | lua_assert(0 <= res && res < 1); | 356 | lua_assert(0 <= res && res < 1); |
357 | return res; | 357 | return res; |
358 | } | 358 | } |