Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: min / max and empty intervals (was: Friendly amendment to Motion 25)



On 2011-06-06 21:06:32 +0100, John Pryce wrote:
> BTW Arnold points out they should allow any number of arguments, as in Fortran. I have included this in the current draft v03.2 out shortly.
> 
> This is nothing to do with handling lists of intervals. It simply means max represents an (in principle infinite) family of functions
>    max(x1,x2), max(x1,x2,x3), max(x1,x2,x3,x4), ...
> each being of fixed arity known at compile time. No big deal.

IMHO, the arity doesn't matter, even a variable arity (i.e. min/max
on a list of numbers) would not be a problem, as long as Empty has
the traditional meaning: a set with no values in it.

But it seems that some people want to support lists of variable length
via lists with a fixed length, and they would want to use Empty for
arguments to be ignored, so that there would be 2 possible meanings
for Empty in a list:
  1. A set (interval) with no values in it.
  2. Some form of argument to be ignored.

The problem is that (1) and (2) are contradictory, and since (1) is
supported for the other functions, it must still be supported here.

Moreover if I is a subset of J, then f(I) should be a subset of f(J),
even in the case where I is empty. This would no longer be true with
(2). For instance, min(sqrt(X),[3,4]) with:
  * X = [-2,-1]  -> result = [3,4]
  * X = [-2,0]   -> result = [0,0]

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)