You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
528 B

// zerop().
// General includes.
#include "cl_sysdep.h"
// Specification.
#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
#include "cln/real.h"
namespace cln {
bool zerop (const cl_N& x)
{
if (realp(x)) {
DeclareType(cl_R,x);
return zerop(x);
} else {
DeclareType(cl_C,x);
// x komplex, teste ob Real- und Imaginärteil beide = 0 sind.
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
if (zerop(a))
if (zerop(b))
return true;
return false;
}
}
} // namespace cln