2007/07/23
[math]::pow([math]::e,3) -eq [math]::exp(3)
これ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プライバシーポリシー