diff liboctave/fCNDArray.cc @ 9825:7483fe200fab

narrow complex values with negative zero imaginary parts
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 13 Nov 2009 12:34:46 +0100
parents f80c566bc751
children c15a5ed0da58
line wrap: on
line diff
--- a/liboctave/fCNDArray.cc
+++ b/liboctave/fCNDArray.cc
@@ -533,17 +533,7 @@
 bool
 FloatComplexNDArray::all_elements_are_real (void) const
 {
-  octave_idx_type nel = nelem ();
-
-  for (octave_idx_type i = 0; i < nel; i++)
-    {
-      float ip = std::imag (elem (i));
-
-      if (ip != 0.0 || lo_ieee_signbit (ip))
-	return false;
-    }
-
-  return true;
+  return mx_inline_all_real (numel (), data ());
 }
 
 // Return nonzero if any element of CM has a non-integer real or