在 Windows 11 Insider Preview(27881.1000) Canary 通道上,C# 中的 Math.Pow(-1, 2) 返回 -1 而非预期的 1。
在 C++ 中使用 std::pow(-1, 2) 也会得到 -1,暗示可能是 Windows 层面的问题。
在 Python 中同样的运算返回正确值 1。
该问题在 .NET SDK 8.0.411 环境下出现。
目前尚无回归信息或已知解决方法。
Get notified when new stories are published for "🇨🇳 Hacker News 简体中文"