[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31239] isequalwithnans(1, 2, 1) gives true in
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #31239] isequalwithnans(1, 2, 1) gives true instead of false (patch provided) |
Date: |
Mon, 04 Oct 2010 11:07:40 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 |
URL:
<http://savannah.gnu.org/bugs/?31239>
Summary: isequalwithnans(1,2,1) gives true instead of false
(patch provided)
Project: GNU Octave
Submitted by: None
Submitted on: Mon Oct 4 11:07:39 2010
Category: Libraries
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Iain Murray
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
When checking several arrays isequalwithnans currently only checks that the
last array matches the first. For example:
isequalwithequalnans(1,2,1)
returns true but shouldn't because 1!=2.
The cause is a bug in __isequal__ -- when the first argument to __isequal__
is 1 (to allow nans to be present) the function no longer returns as soon as
it notices an inequality not involving nans. As long as the last array to be
checked matches, the function forgets about previous inequalities.
I have attached a patch against the version of __isequal__.m I got by
checking out the Hg repository just now. I've attached the full version of the
patched function too.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon Oct 4 11:07:39 2010 Name: __isequal__.m.PATCH Size: 443B By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=21606>
-------------------------------------------------------
Date: Mon Oct 4 11:07:39 2010 Name: __isequal__.m Size: 5kB By: None
<http://savannah.gnu.org/bugs/download.php?file_id=21607>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31239>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #31239] isequalwithnans(1, 2, 1) gives true instead of false (patch provided),
anonymous <=