diff liboctave/fCNDArray.cc @ 11130:7c573eb981eb

consistently give error for operator not applied to NaN values
author John W. Eaton <jwe@octave.org>
date Thu, 21 Oct 2010 16:12:13 -0400
parents 3622db30ff05
children 141b3fb5cef7
line wrap: on
line diff
--- a/liboctave/fCNDArray.cc
+++ b/liboctave/fCNDArray.cc
@@ -495,6 +495,9 @@
 boolNDArray
 FloatComplexNDArray::operator ! (void) const
 {
+  if (any_element_is_nan ())
+    gripe_nan_to_logical_conversion ();
+
   return do_mx_unary_op<bool, FloatComplex> (*this, mx_inline_not);
 }