This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
私は2つのdouble数を取得します-basicと pow、そして私は計算する必要がありますbasic^power。私の問題は、たとえば、が奇数/偶数のような分数であり、基本が負である場合のように、エラーをスローする必要がある場合があることです。powしたがって、エラーを意味するはずです。では、どうすればそのようなケースを検出できますか?basic=(-2)pow=0.75=(3\4)(-2)^3=-8root 4 of -8