Live data from Hacker News

Math.Pow(-1, 2) == -1 in Windows 11 Insider build

github.com

61–70 of 142 posts

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#61
post #18

Earlier quoted context omitted.

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...

When a company has its street named after themselves and a fleet of buses to carry employees to the company, one can start considering Microsoft as a state with all the necessary bureaucracy.

Bureaucracy sets in before statehood.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#62
post #52

Earlier 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.

This. And that's how it should work whether or not it's a Microsoft application. Users report bugs to the team working on the user application. If the bug is actually in a component that application uses, then it's that team's responsibility to report it upstream, not the user's.

In theory and definitely how it should be for commercially backed projects. For volunteer OSS though (and commercially backed) maintainers are frequently not going to do that in my experience.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#63

How does the OS still function with a basic bug like this?

I don’t think there is much systems code that needs an exponent of -1, maybe none that needs exponents at all (aside from 2^n, which has opcodes, not C functions)

The bug is for an exponent of 2. The base is -1.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#65
post #2

I'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

#66

The 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.

Paraconsistent logic looks into logical systems that allow contradictions.

A lot of set-theory research is looking into the consequences of various axiomatic assumptions.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#67
post #52

Earlier quoted context omitted.

This. And that's how it should work whether or not it's a Microsoft application. Users report bugs to the team working on the user application. If the bug is actually in a component that application uses, then it's that team's responsibility to report it upstream, not the user's.

In theory and definitely how it should be for commercially backed projects. For volunteer OSS though (and commercially backed) maintainers are frequently not going to do that in my experience.

I don't think being commercial or volunteer affects this. The end user shouldn't report it upstream, not just because that's putting more burden on the user than is called for, but because the end user likely doesn't know enough about how the component is used in order to make a good bug report or answer questions the upstream component may have.

That some OSS devs don't work that way isn't really important in terms of this point. If the project isn't going to address the bug, they should just say so without implying the user did something incorrectly.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#68
post #58

Earlier quoted context omitted.

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.

Yes. Prominent example is the axiom of choice. There was a LOT of discussion about it by mathematicians. https://plato.stanford.edu/entries/axiom-choice/ For instance, with it, you can double the volume of a body by looking at it from a weird angle.

That's a very misleading description of Banach-Tarski. You need to break up the body into a few (very weird) pieces and maneuver them (via only rigid motions - rotations and translations).

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#69

> If you need to contact us better, joining the osu! Discord server would be best I really dislike how Discord is slowly eating up the web and being used as the primary channel for communication, when most of the community resources resides in their Discord, it makes it hard for me to find relevant information through the web thanks to Discords lock-in

Discord also has a kind of culture I don't love connecting to for misc environments. I'm sure most are fine, but I've joined software related discords where people are having oddly NSFW chats. They've always been in different channels, but why does this software project need a NSFW channel?

I think it's _too_ social for bug reports and questions. I'd prefer a forum or GitHub issues for that kind of thing.

Or maybe I'm just getting old.

Re: Math.Pow(-1, 2) == -1 in Windows 11 Insider build

#70
post #3

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.)

I would definitely expect some kind of test like -1^2 == 1 for such an important SDK, even more if it impacts C++ too. Well, they hopefully have now written this test.
Post reply on HN