diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-01-03 09:12:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-01-03 09:12:17 -0300 |
commit | 8dd2c912d299b84566c6f6d659336edfa9b18e9b (patch) | |
tree | f4fda0bf84c1d52ceba86cbf8ecaeb42241ad6c0 /lmathlib.c | |
parent | 05ac2409ee9ea312124bf71dcc93711d652e265b (diff) | |
download | lua-8dd2c912d299b84566c6f6d659336edfa9b18e9b.tar.gz lua-8dd2c912d299b84566c6f6d659336edfa9b18e9b.tar.bz2 lua-8dd2c912d299b84566c6f6d659336edfa9b18e9b.zip |
Detail
Warnings with clang when using long double for Lua floats.
Diffstat (limited to '')
-rw-r--r-- | lmathlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -475,7 +475,7 @@ static lua_Number I2d (Rand64 x) { | |||
475 | 475 | ||
476 | /* 2^(-FIGS) = 1.0 / 2^30 / 2^3 / 2^(FIGS-33) */ | 476 | /* 2^(-FIGS) = 1.0 / 2^30 / 2^3 / 2^(FIGS-33) */ |
477 | #define scaleFIG \ | 477 | #define scaleFIG \ |
478 | ((lua_Number)1.0 / (UONE << 30) / 8.0 / (UONE << (FIGS - 33))) | 478 | (l_mathop(1.0) / (UONE << 30) / l_mathop(8.0) / (UONE << (FIGS - 33))) |
479 | 479 | ||
480 | /* | 480 | /* |
481 | ** use FIGS - 32 bits from lower half, throwing out the other | 481 | ** use FIGS - 32 bits from lower half, throwing out the other |
@@ -486,7 +486,7 @@ static lua_Number I2d (Rand64 x) { | |||
486 | /* | 486 | /* |
487 | ** higher 32 bits go after those (FIGS - 32) bits: shiftHI = 2^(FIGS - 32) | 487 | ** higher 32 bits go after those (FIGS - 32) bits: shiftHI = 2^(FIGS - 32) |
488 | */ | 488 | */ |
489 | #define shiftHI ((lua_Number)(UONE << (FIGS - 33)) * 2.0) | 489 | #define shiftHI ((lua_Number)(UONE << (FIGS - 33)) * l_mathop(2.0)) |
490 | 490 | ||
491 | 491 | ||
492 | static lua_Number I2d (Rand64 x) { | 492 | static lua_Number I2d (Rand64 x) { |