]> www.ginac.de Git - cln.git/commitdiff
Convert complex numbers to real numbers if imaginary part is floating-point 0.0.
authorRichard Kreckel <kreckel@ginac.de>
Mon, 13 Jan 2014 21:49:04 +0000 (21:49 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 13 Jan 2014 21:49:04 +0000 (21:49 +0000)
This conversion worked only for rational imaginary parts.

src/complex/elem/cl_C_from_R_R_complex1.cc

index c4ebe9909ca89bf53b6522f396f99d5aedd2bb5c..f7df2409e03366ab06966a72bcc2c9fa25bad7d0 100644 (file)
@@ -17,7 +17,7 @@ const cl_N complex (const cl_R& a, const cl_R& b)
 {
 // Methode:
 // Falls b=0, nur a. sonst komplexe Zahl erzeugen.
-       if (eq(b,0))
+       if (zerop(b))
                return a;
        else
                return allocate_complex(a,b);