I get 2 double numbers – basic and pow , and I have to calculate basic^power .
My problem is that there is cases should throw error – like if the pow is a fraction like odd/even and the basic is a negative – for example basic=(-2) and pow=0.75=(3\4) So it should be (-2)^3=-8 and then root 4 of -8 means error . so how can I detect such cases ?
I get 2 double numbers – basic and pow , and I have to
Share
From the man page of
pow():So check for this.