I 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.)
“Oh, I can see the test is failing. Let me fix this by adjusting the test to expect the currently returned value.” This is unfortunately an actual quote I got from Claude Code after having it write a unit test for me. It ended up mocking the entire method it was supposed to test, resulting in the unit test essentially only testing itself.
Math.Pow(-1, 2) == -1 in Windows 11 Insider build
71–80 of 142 posts
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#72I've heard people moan that software is getting exponentially worse. Maybe they're right after all /joke
You're joking but we went from the Ada "contracts and pre/post conditions" to the ReactJS monstrosities instead on improving the whole thing and being more strict.
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#73I disagree with the comment “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 mak…
What do you disagree with, exactly? The bug is in an underlying library, so it should be reported to that library. That all seems correct to me, I don't see what there is to disagree with there. The problem with the comment is it does not make ownership of the next steps clear. The maintainer should've either taken the ball ("I will report this to...") or made it clear that the reporter should hold the ball ("We can'…
How you choose to resolve it is up to you. You might implement a fix in your code to handle the bug case until the dependency is fixed.
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#74Earlier quoted context omitted.
What do you disagree with, exactly? The bug is in an underlying library, so it should be reported to that library. That all seems correct to me, I don't see what there is to disagree with there. The problem with the comment is it does not make ownership of the next steps clear. The maintainer should've either taken the ball ("I will report this to...") or made it clear that the reporter should hold the ball ("We can'…
Bro is a Microsoft employee. He should say "thank you for the bug report", and open a bug in the underlying library if that is the correct place. Bug reporter might not care that much and not bother opening another bug report, and this looks like a pretty bad bug.
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#75Earlier quoted context omitted.
What do you disagree with, exactly? The bug is in an underlying library, so it should be reported to that library. That all seems correct to me, I don't see what there is to disagree with there. The problem with the comment is it does not make ownership of the next steps clear. The maintainer should've either taken the ball ("I will report this to...") or made it clear that the reporter should hold the ball ("We can'…
It's going to be interpreted, and is probably meant, as saying that the person who filed the bug should close this report and open a new one in the right place.
It's going to be interpreted BY WHOM to say that? Other .NET developers? Yeah, maybe, at least some of them. By the submitter of the original bug? No idea, I can't read their mind.
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#76The good thing is, if (-1)^2=-1, we can prove anything! NP=P, every program halts, axiom of choice - math just becomes so much easier.
Joke aside, is there a field (or sub-fields) of mathematics that just... studies what breaking some axioms would do and where would it lead? This seems both completely stupid but also potentially fascinating at the same time.
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#77Earlier quoted context omitted.
What do you disagree with, exactly? The bug is in an underlying library, so it should be reported to that library. That all seems correct to me, I don't see what there is to disagree with there. The problem with the comment is it does not make ownership of the next steps clear. The maintainer should've either taken the ball ("I will report this to...") or made it clear that the reporter should hold the ball ("We can'…
Unless the documentation says that Math.Pow just returns the result of calling some other code (it doesn't do that), the bug is both in the Math.Pow and underlying library. It should be reported and tracked in both.
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#78Earlier quoted context omitted.
Microsoft is a many headed beast. Finding the right contact even for employees inside the beast is challenging and a skill all its own.
I'm more used to hear this kind of 'it's not our fault' crap from state bureaucracies not companies that want me to pay them...
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#79Earlier quoted context omitted.
What do you disagree with, exactly? The bug is in an underlying library, so it should be reported to that library. That all seems correct to me, I don't see what there is to disagree with there. The problem with the comment is it does not make ownership of the next steps clear. The maintainer should've either taken the ball ("I will report this to...") or made it clear that the reporter should hold the ball ("We can'…
If your software has a bug, it’s your bug. If the root cause of the bug in your software comes from a direct call into some dependency, that’s immaterial to the users of your software. Your software is incorrect, so your software has a bug. How you choose to resolve it is up to you. You might implement a fix in your code to handle the bug case until the dependency is fixed.
Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build
#80Earlier quoted context omitted.
Bro is a Microsoft employee. He should say "thank you for the bug report", and open a bug in the underlying library if that is the correct place. Bug reporter might not care that much and not bother opening another bug report, and this looks like a pretty bad bug.
I agree that's the ideal solution in a vacuum, but I don't know this person's responsibilities regarding the projects in question, so I don't want to make assumptions about what they can or should do.