Mathematical Functions for complex

The complex class defines a set of mathematical, trigonometric, magnitude, and conversion functions as friend functions of complex objects. They are:

Because these functions are friend functions rather than member functions, you cannot use the dot or arrow operators. For example:

complex a,b,*c;
a=exp(b); // correct - exp() is a friend function of complex
a=b.exp(); // error - exp() is not a member function of complex
a=c->exp(); // error - exp() is not a member function of complex