Index: src/java/org/apache/commons/math/complex/Complex.java
===================================================================
--- src/java/org/apache/commons/math/complex/Complex.java	(revision 785117)
+++ src/java/org/apache/commons/math/complex/Complex.java	(working copy)
@@ -76,6 +76,16 @@
     private final double real;
     
     /**
+     * Record whether this complex number is equal to NaN
+     */
+    private final boolean isNaN;
+    
+    /**
+     * Record whether this complex number is infinite
+     */
+    private final boolean isInfinite;
+    
+    /**
      * Create a complex number given the real and imaginary parts.
      *
      * @param real the real part
@@ -85,6 +95,10 @@
         super();
         this.real = real;
         this.imaginary = imaginary;
+        
+        isNaN = Double.isNaN(real) || Double.isNaN(imaginary);
+        isInfinite = !isNaN &&
+        (Double.isInfinite(real) || Double.isInfinite(imaginary));
     }
 
     /**
@@ -318,7 +332,7 @@
      * false otherwise
      */
     public boolean isNaN() {
-        return Double.isNaN(real) || Double.isNaN(imaginary);        
+        return isNaN;        
     }
     
     /**
@@ -331,8 +345,7 @@
      * and neither part is <code>NaN</code>
      */
     public boolean isInfinite() {
-        return !isNaN() && 
-        (Double.isInfinite(real) || Double.isInfinite(imaginary));        
+        return isInfinite;        
     }
     
     /**
