[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: math.min, math.max
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 9 Apr 2014 10:32:50 +0200
The present specification says math.min(x,...) and math.max(x,...), so
that there must be at least one argument, which must be a number.
There are two ways of having a more general construction.
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.
2. If the arguments are constrained to be numbers, there is no reason
to insist on having at least one argument. math.min over an empty list
is math.huge, math.max over an empty list is -math.huge.