MathGroup Archive 2004

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

Search the Archive

Re: Min[], Max[]


Hi,

if you set up a recursive definition of Max[]

max[{}] := -Infinity
max[{a_, rest___}] := Module[{mr}, mr = Max[{rest}]; If[a > mr, a, mr]]


you see why the definition is usefull.

Regards
  Jens


Frank Brand wrote:
> 
> Dear newsgroup members,
> 
> can anyone explain me what´s the sense in the definition of
> 
> Min[{}]= Infinity and Max[{}]= -Infinity
> 
> Thanks in advance
> Frank
> 
> Prof. Dr. Frank Brand
> Budapester Str. 13
> 10787 Berlin
> 
> +49 (0)30 - 25 79 36 62
> 0179 - 215 58 04
> 
> frank.brand at t-online.de


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