Math.Pow(-1, 2) == -1 in Windows 11 Insider build
1–10 of 142 posts
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#2Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#3(Comments blame it on UCRT, not .NET but… that doesn’t matter much to me.)
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#4Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#5As far as I remember from days when I used Windows, the version of your visual studio (which has the compiler and standard libraries) was not related to the build of your operating system
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#6One of the advantages of using proprietary packaged software is supposed to be a unified support and product.
In this case the maintainer redirects the issue to some other team and passes the ball as if it were an open source project with 50 dependencies with thin responsibilities "no, if there's an issue with a button, you should report it to GUI-button, we do GUI-form and we just pass the button generation to their library"
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#7“Both Math.Pow and std::pow invokes the pow function in UCRT, which is shipped with Windows. The issue should be reported to MSVC instead”
It’s not the job of a bug reporter to figure that out and to verify that nothing goes wrong in setting up stuff for invoking that function or in getting its output back into the C# world.
That’s even more true because the dynamic nature of .NET code makes it far from easy to verify by inspection that that function is just calling the pow function in UCRT. The C# compiler might do constant folding wrong and there might be several ways in which the runtime compiles the CLR code (fast compilation to start running it quickly, slower compilation that produces faster code later if it turns out to be called a lot, etc)
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#8I really want to know how this could have passed CI testing. (Comments blame it on UCRT, not .NET but… that doesn’t matter much to me.)
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#9Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#10This happens in both C# and C++ according to the report, but what's the link between OS and compiler here? As far as I remember from days when I used Windows, the version of your visual studio (which has the compiler and standard libraries) was not related to the build of your operating system