Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
carlos13
Creator
Creator

How to formulate the "cube root negative"??

I have problems in calculating cube roots of negative numbers. For example pow (-27.1 / 3), should give -3, but fails. Any idea why?

1 Solution

Accepted Solutions
Not applicable

I am not sure about the reason. Since square root would return an imaginary number pow might have restricted the computation.

Alternatively you can try, sign(x)*pow(fabs(x),1/3).

Kiran.

View solution in original post

2 Replies
Not applicable

I am not sure about the reason. Since square root would return an imaginary number pow might have restricted the computation.

Alternatively you can try, sign(x)*pow(fabs(x),1/3).

Kiran.

Anonymous
Not applicable

What if I would like to return an imaginary number?