Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
[math]::pow([math]::e,3) -eq [math]::exp(3) - PowerShell Scripting Weblog
[go: Go Back, main page]

2007/07/23

これFalseなんですね。見た目はどちらもSysytem.Doubleの20.0855369231877なんですが、

[math]::pow([math]::e,3) - [math]::exp(3)

とすると-3.5527136788005E-15となって誤差が発生してることがわかります。きっと内部的には違ったロジックで計算してるんだろうなぁと思いました。

元記事:http://blogs.wankuma.com/mutaguchi/archive/2007/07/23/86545.aspx

古い記事へ | 新しい記事へ


プライバシーポリシー

Twitter

Books