summaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-08-28 12:36:58 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-08-28 12:36:58 -0300
commit5382a22e0eea878339c504b2a9a3b36bcd839fcc (patch)
treef4208ffe221d2f42920c751c3624f17d89b07079 /lparser.c
parent8c8a91f2ef7acccb99e3737913faad8d48b39571 (diff)
downloadlua-github-5382a22e0eea878339c504b2a9a3b36bcd839fcc.tar.gz
Corrections in the implementation of '%' for floats.
The multiplication (m*b) used to test whether 'm' is non-zero and 'm' and 'b' have different signs can underflow for very small numbers, giving a wrong result. The use of explicit comparisons solves this problem. This commit also adds several new tests for '%' (both for floats and for integers) to exercise more corner cases, such as very large and very small values.
Diffstat (limited to 'lparser.c')
0 files changed, 0 insertions, 0 deletions