[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: math.min, math.max
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 9 Apr 2014 18:43:26 +0200
2014-04-09 17:56 GMT+02:00 Andrew Starks <andrew.starks@trms.com>:
> If huge or -(huge) were the result of (nil), I probably would not patch it
> and instead change the logic in my code to use the new result, but it
> doesn't sound like this would be correct.
>From the mathematical point of view, max() can only be defined if
(a) you know from what ordered set legal values come (b) that set
has a smallest element. The moment one allows max to accept any
ordered set, there is no useful value that max() can have — and nil
is designed for just that situation. But I would not like to distinguish
between max() and max(nil).
- References:
- math.min, math.max, Dirk Laurie
- Re: math.min, math.max, Oliver Kroth
- Re: math.min, math.max, Dirk Laurie
- Re: math.min, math.max, Hisham
- Re: math.min, math.max, Roberto Ierusalimschy
- Re: math.min, math.max, Andrew Starks