lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


(I'm not sure if this email has been received, nor if it must be sent here.)

In Lua 5.3.4 the following code raise an error
> =1//0
stdin:1: attempt to divide by zero
stack traceback:
    stdin:1: in main chunk
    [C]: in ?

But the following code works like division
> =1//0.0
inf

This seems inconsistent between division and floor division,
but it check the test... that describe it explicitely
See :
https://github.com/lua/tests/blob/master/math.lua#L137

I would suggest to make 1//0 returns inf as well



Guile