lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Re: [ANN] Lua 5.4.0 (work2) now available
From
: Egor Skriptunoff <egor.skriptunoff@
...
>
Date
: Sun, 26 Aug 2018 06:29:37 +0300
On Sat, Aug 25, 2018 at 8:28 PM, Egor Skriptunoff wrote:
Correct modulo operation is not very simple
I should clarify what is the "correct modulo".
Rounding errors are inevitable, so instead of exact result
a%b
you are allowed to return
approx( approx(a) % approx(b) )
Each approx() might modify low bits (bits beyond FP precision).
You are not allowed to return arbitrary garbage (such as negative value for positive b).
In other words, you must return a value which belongs to possible result range according to interval arithmetic.
Of course, the same requirement applies to all math operations and functions, not only modulo.
Follow-Ups
:
Re: [ANN] Lua 5.4.0 (work2) now available
,
Dirk Laurie
References
:
Re: [ANN] Lua 5.4.0 (work2) now available
,
Hugo Musso Gualandi
Re: [ANN] Lua 5.4.0 (work2) now available
,
Roberto Ierusalimschy
Re: [ANN] Lua 5.4.0 (work2) now available
,
Roberto Ierusalimschy
Re: [ANN] Lua 5.4.0 (work2) now available
,
Egor Skriptunoff
Prev by Date:
Re: [ANN] Lua 5.4.0 (work2) now available
Next by Date:
Re: [ANN] Lua 5.4.0 (work2) now available
Previous by thread:
Re: [ANN] Lua 5.4.0 (work2) now available
Next by thread:
Re: [ANN] Lua 5.4.0 (work2) now available
Index(es):
Date
Thread