octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sort error when NaN and NA are both present


From: Jordi Gutiérrez Hermoso
Subject: Re: sort error when NaN and NA are both present
Date: Tue, 17 Jan 2012 15:46:00 -0500

On 17 January 2012 12:22, Mark Messer <address@hidden> wrote:
> I am not sure if this is worth a bug report or not. These ought to have the
> same answer.
>
> I am using 32 bit Windows Vista, and Octave 3.4.3.
>
>
> octave:713> sort([NaN,NA,inf,1,-inf])
> ans =
>
>   -Inf     1   Inf   NaN    NA
>
> octave:714> sort([NA,NaN,inf,1,-inf])
>
> ans =
>
>   -Inf     1   Inf    NA   NaN

Every comparison with NaN is false. NA is just another name for NaN in
Octave. So NaN are unsorted. This is part of the IEEE 754 standard.

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]