Revert "Revert "throws exception if root input is negative value (gives imaginary numbers)""

This reverts commit bd7000acbd93d71be1beca7274641cf6b28992f9.