[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
max() and min() of nan/inf
From: |
Joao Cardoso |
Subject: |
max() and min() of nan/inf |
Date: |
Thu, 16 Sep 1999 20:01:24 +0100 |
Hi,
Is this a correct behaviour?
max() or min() return nan is a nan is one of its arguments? max() or
min() considering +/-Inf looks OK.
Is there any rationale for this? arithmetic or comparition operations
are of course not defined on nans...
I'm using octave 2.2.14 on sco-unix.
Thanks,
Joao
octave:26> max([inf [] 1 3 5 nan])
ans = NaN
??
octave:27> min([inf [] 1 3 5 nan])
ans = NaN
??
octave:28> min([inf [] 1 3 5 ])
ans = 1
OK
octave:29> max([inf [] 1 3 5 ])
ans = Inf
OK
octave:34> min([nan [] 1 3 5 ])
ans = NaN
??
octave:35> max([nan [] 1 3 5 ])
ans = NaN
??
octave:37> min([nan [] 1 3 5 -inf])
ans = NaN
??
octave:38> min([inf [] 1 3 5 -inf])
ans = -Inf
OK
---
U.N. FORCES TO DILI, IMMEDIATELY
FREEDOM TO EAST TIMOR - TIMOR LOROSAE
------------------------------------------------------------
Joao Cardoso | e-mail: address@hidden
INESC, R. Jose Falcao 110 | tel: + 351 2 2094322
4050 Porto, Portugal | fax: + 351 2 2008487
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------
- max() and min() of nan/inf,
Joao Cardoso <=
- Re: max() and min() of nan/inf, Olli Saarela, 1999/09/21
- Re: max() and min() of nan/inf, Joao Cardoso, 1999/09/22
- Re: max() and min() of nan/inf, Olli Saarela, 1999/09/23
- Re: max() and min() of nan/inf, Mirek Kwasniak, 1999/09/23
- Re: max() and min() of nan/inf, Mike Miller, 1999/09/23
- Re: max() and min() of nan/inf, John W. Eaton, 1999/09/23
- Re: max() and min() of nan/inf, Thomas Walter, 1999/09/24
- Re: max() and min() of nan/inf, Joao Cardoso, 1999/09/23
Re: max() and min() of nan/inf, Jonathan King, 1999/09/23