lua-users home
lua-l archive

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


>> print(1e97 % 97)
> 3.0
>
> I don't think any of these are right.

The correct result is 10 because of Fermat's little theorem[1] since
97 is prime.

[1] https://en.wikipedia.org/wiki/Fermat%27s_little_theorem