MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Min[], Max[]

  • To: mathgroup at
  • Subject: [mg48349] Re: Min[], Max[]
  • From: Marcus Stollsteimer <marcus314 at>
  • Date: Tue, 25 May 2004 07:17:16 -0400 (EDT)
  • References: <c8rutb$8nl$>
  • Sender: owner-wri-mathgroup at

Frank Brand wrote:
> can anyone explain me what´s the sense in the definition of
> Min[{}]= Infinity and Max[{}]= -Infinity


I'm only guessing here, but it seems the only reasonable way
to define it. It makes sure that the min/max of a union of lists
is the same as the min/max of the individual minimums/maximums,
even if one of the joined lists is empty.

In[1]:= mylist={1,2,3}; emptylist={};

In[3]:= Min[emptylist,mylist]

Out[3]= 1

In[4]:= Unprotect[Min]; Min[{}]=0;   (* why? *)

In[6]:= Min[emptylist,mylist]

Out[6]= 0
        ^^^  should be 1


What is life but a series of inspired follies? -- George Bernard Shaw

  • Prev by Date: Re: Min[], Max[]
  • Next by Date: Re: Min[], Max[]
  • Previous by thread: Re: Min[], Max[]
  • Next by thread: Re: Min[], Max[]