diff options
-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 | } |