The code now defines _USE_MATH_DEFINES before including <cmath> so that M_PI is available.
Added test for unary - operator.