lua-users home
lua-l archive

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


During that time : I have found the same thing with modulo %

> Obviously because normal division is always returning a float, whereas
> floor division between integers returns an integer.

I am not a Lua expert but I tested this :
> =10.0//3
3.0

Does that show floor division can return a float ? (as the manual says I think)


On Wed, Feb 14, 2018 at 12:07 PM, Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
>>>>> "Guislain" == Guislain Duthieuw <guislain.duthieuw@gmail.com> writes:

 Guislain> This seems inconsistent between division and floor division,

Obviously because normal division is always returning a float, whereas
floor division between integers returns an integer.

--
Andrew.