[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: math.min, math.max
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 9 Apr 2014 12:42:46 -0300
> Dirk Laurie <dirk.laurie@gmail.com> wrote:
> > 1. If the argument list always has a first element, there is no reason to
> > stay with numbers. Anything for which less-than is defined can work.
>
> This could be useful! Actually, if you asked me if this was already
> the behavior, I wouldn't know it for sure.
This is how it is implemented now (for the next work version). The
main motivation is for working correctly with integers, too:
> math.max(4611686018427387901, 461168601842738790) --> 4611686018427387901
The original version would lose precision in that case.
-- Roberto