From 536a0ac50f6c90198982267943af4d551612a9d9 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Mon, 13 Jan 2014 21:49:04 +0000 Subject: [PATCH] Convert complex numbers to real numbers if imaginary part is floating-point 0.0. This conversion worked only for rational imaginary parts. --- src/complex/elem/cl_C_from_R_R_complex1.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/complex/elem/cl_C_from_R_R_complex1.cc b/src/complex/elem/cl_C_from_R_R_complex1.cc index c4ebe99..f7df240 100644 --- a/src/complex/elem/cl_C_from_R_R_complex1.cc +++ b/src/complex/elem/cl_C_from_R_R_complex1.cc @@ -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);