底数为负的幂 [英] Exponentiation with negative base
本文介绍了底数为负的幂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
因此,R表达式及其输出如下:
So, the R expression and its output is as follows:
> (4-7)^1.3
[1] NaN
有什么想法如何在R中解决这个问题吗?
Any ideas how to solve this in R?
推荐答案
答案是一个复数,因此您需要给它一个复杂的参数:
The answer is a complex number, so you need to give it a complex argument:
> (4-7+0i)^1.3
[1] -2.451751-3.374545i
但是请记住,这只是一个根...
but remember this is only one root...
这篇关于底数为负的幂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文