lua-users home
lua-l archive

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


On 4 May 2015 at 10:45, Dirk Laurie <> wrote:
> Lua 5.3, for better or words, has a syntactic convention that "1" is
> an exact integer whereas "1." is a (by coincidence exact) approximation
> to it. In  Lua 5.3, when approximations are preferred one should always
> code "1.", and in a situation where exactness is needed, one should
> always code "1". Even computer users who are not computer scientists
> can surely be trained to do that. Heck, even some pure mathematicians
> have been known to grasp this point.

Time for a quick Scheme REPL:

11:38 $ gsi
Gambit v4.7.5

> (exact? 1)
> (exact? 1.)

The different obviously being that Scheme exact numbers are unbounded.