Browse Source

Convert complex numbers to real numbers if imaginary part is floating-point 0.0.

This conversion worked only for rational imaginary parts.
master
Richard Kreckel 11 years ago
parent
commit
536a0ac50f
  1. 2
      src/complex/elem/cl_C_from_R_R_complex1.cc

2
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: // Methode:
// Falls b=0, nur a. sonst komplexe Zahl erzeugen. // Falls b=0, nur a. sonst komplexe Zahl erzeugen.
if (eq(b,0))
if (zerop(b))
return a; return a;
else else
return allocate_complex(a,b); return allocate_complex(a,b);

Loading…
Cancel
Save