Fix bug #31239 in isequalwithequalnans.m
author |
Rik <octave@nomad.inbox5.com> |
date |
Wed, 20 Oct 2010 21:13:58 -0700 |
parents |
e79f59d31a74 |
children |
304b0ed4ca56 |
files |
scripts/ChangeLog scripts/general/private/__isequal__.m |
diffstat |
2 files changed, 9 insertions(+), 4 deletions(-)
[+]
|
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-20 Iain Murray <murray@cs.toronto.edu>
+
+ * general/private/__isequal__.m: Fix bug #31239 where
+ isequalwithequalnans is incorrect.
+
2010-10-20 Rik <octave@nomad.inbox5.com>
* polynomial/conv.m: Remove redundant test.
--- a/scripts/general/private/__isequal__.m
+++ b/scripts/general/private/__isequal__.m
@@ -159,12 +159,12 @@
m = (x == y);
t = all (m);
- if (!t)
- if (nans_compare_equal)
+ if (!t) && (nans_compare_equal)
t = isnan (x(!m)) && isnan (y(!m));
- else
+ endif
+
+ if (!t)
return;
- endif
endif
endfor