aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2025-08-09 15:08:53 -0300
committerRoberto I <roberto@inf.puc-rio.br>2025-08-09 15:08:53 -0300
commit5b179eaf6a78af5f000d76147af94669d04487b2 (patch)
treea3466ed22def25294ff1647d1af91cd4ef7fa567 /ltable.c
parent8fddca81e7d4137512e92f398ca638d61b935dbd (diff)
downloadlua-5b179eaf6a78af5f000d76147af94669d04487b2.tar.gz
lua-5b179eaf6a78af5f000d76147af94669d04487b2.tar.bz2
lua-5b179eaf6a78af5f000d76147af94669d04487b2.zip
Details
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ltable.c b/ltable.c
index 4017d8c7..b7f88f6f 100644
--- a/ltable.c
+++ b/ltable.c
@@ -156,7 +156,7 @@ static Node *hashint (const Table *t, lua_Integer i) {
156** The main computation should be just 156** The main computation should be just
157** n = frexp(n, &i); return (n * INT_MAX) + i 157** n = frexp(n, &i); return (n * INT_MAX) + i
158** but there are some numerical subtleties. 158** but there are some numerical subtleties.
159** In a two-complement representation, INT_MAX does not has an exact 159** In a two-complement representation, INT_MAX may not have an exact
160** representation as a float, but INT_MIN does; because the absolute 160** representation as a float, but INT_MIN does; because the absolute
161** value of 'frexp' is smaller than 1 (unless 'n' is inf/NaN), the 161** value of 'frexp' is smaller than 1 (unless 'n' is inf/NaN), the
162** absolute value of the product 'frexp * -INT_MIN' is smaller or equal 162** absolute value of the product 'frexp * -INT_MIN' is smaller or equal