help-octave
[Top][All Lists]
Advanced

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

Re: bug in a(a<3)?


From: John W. Eaton
Subject: Re: bug in a(a<3)?
Date: Mon, 6 Sep 1999 10:59:18 -0500 (CDT)

On  6-Sep-1999, address@hidden <address@hidden> wrote:

| If you look at (a<3) it comes out all ones, while (a<0.4) with a high
| probability comes out with at least one zero.  Octave can in the latter
| case deduce that you want to select items, but in the first case it
| is ambiguous and the result depends on how you've set a certain built-in
| variable (another reply to your query gives the name of the variable).
| Your default setting obviously treats [1 1 1] as three copies of '1'
| and not as three cases of "yes, include me."

FWIW, this is fixed in 2.1.x by introducing a new boolean type.

Results of comparisons are boolean, so even if the result is all
`true' values (sill represented by an integer value of 1, but now with
the additional information that it is a boolean value) there is no
ambiguity.

jwe



---------------------------------------------------------------------
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
---------------------------------------------------------------------



reply via email to

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