This person[1] was getting unexpected results when calling is_integer. According to the duplicate, the solution is that they should call is_integer... which is what they were doing. The original close voter commented 'sorry I didn't read your question properly before suggesting the dupe', but it remains closed.
The question was answered in the comments: this surprising result was due to floating point error and rounding done by the print function. However, it could not be posted as an answer, because the question was closed. I voted to reopen, but the vote failed.
[1]: https://stackoverflow.com/q/49847677/331041
EDIT: The share link I posted takes me to a different question when I'm logged in than it does when I open in an incognito window. WTF.
EDIT2: Apparently serving completely different pages to logged-in users and logged-out users is by design. https://meta.stackoverflow.com/q/271077/
Here's a link to question [1] that should work for everybody: https://stackoverflow.com/q/49847677/331041?noredirect=1
EDIT3: It doesn't work. Sorry. I tried my best, but only logged-in users will get the correct page from the links I posted.
It's lucky that the person who answered had enough carma to write comments. SO's job seems to be to prevent users from answering questions.
Before answering questions in future give them a bit of a Googling. Find the ones someone like yourself didnt spend time on, the ones that instantly got closed as off topic or duplicate or moderator was grumpy today so closed.
I get it, wealth of free information and that, sure. But these are the top results in Google. The top results, not a /new queue where you’re hiding. The pages that someone having this problem will visit.
From the visitor’s point of view, SO is a cesspool of power tripping mods who love to close questions.
The solution? SO should noindex closed questions and add canonical links for duplicates. Simple enough, tell the damn search engines things are closed/redirected as well as the user. It would improve the end user experience infinitely to stop arriving on what they perceive as unnecessarily closed questions.
In the absolute ideal these questions would be answered instead of closed as dupe but right now it just means following a trail of dupes and closures to maybe find the answer before giving up and going back to the search results.
Instead of that, give the user the wrong answer straight away so they can just back up one to the search to continue digging
Or the questions that are duplicate questions, but with an answer five years out of date that will never get updated because new people interested in the topic don't have enough magic beans to actually do anything.
I think the reason for that is you’re a web developer. The majority of the admins too. For less popular domain areas, the experience is very different. I run into the issue all the time. The experience became so disappointing that I stopped writing answers there. Here’s a couple examples where downvoters destroyed, or almost destroyed, good questions with my answers to them: https://stackoverflow.com/q/57323981/ https://stackoverflow.com/q/57064879/
I don't understand why it's a privilege in the first place. What's so dangerous about allowing me to read a 'bad' question?
Slashdot had this as well, it was called meta-mod.
Of course I have no hope that S.O. will change anything. When they started their "be nice" campaign I suggested the "CLOSED: This is a duplicate" message should be changed to "CONGRATS: This appears to be a duplicates so you win! There is already an answer [here]!"
In any case there are rules. One is "post the code you're having trouble with in the question, not a link offsite." The offsite link is useless if the code changes there or the offsite site goes offline. Some not insignificant percent of the time the question will just have a link to offsite code. I'll leave a comment saying effectively, "please add the code to the question" and then I vote to close, reason "missing code". The person never adds the code. Are they like you claiming S.O. is rude and unreasonable? Did they get their answer somewhere else and never come back to follow up? I have no idea.
Actually the rule is even more specific. "Make a minimal repo and post it the question itself". Almost no one makes a remotely minimal repo which is fine, but in general lots of people fail at the "repo" part period. In order to help them we'd need to download code, setup dev environments, make up test data, etc...."
What I do know is I often spend 30 to 240 minutes writing working examples for a single answer. I do that volunteerily for reasonable questions. When someone barfs out a "give me teh codez" question it can be very angering. They're basically asking for free labor. If that's not rude I don't know what is.
Here's a recent "give me free labor" question
https://stackoverflow.com/questions/58206647/removing-the-ba...
Here's a recent "teach me an entire CS course" question
https://stackoverflow.com/questions/58165198/how-to-process-...
And here's an answer I spent over 150 minutes on, trying to understand their code, trying to make a working sample, running into bugs, when I looked up 2.5 hours had passed.
https://stackoverflow.com/questions/58101753/drawing-a-torus...
And another more typical 30 minutes on this one
https://stackoverflow.com/questions/58111380/in-webgl-the-pe...
note I'm not trying to brag. I hear your complaint often. I just don't run into it myself. Instead I see lots of volunteers answering questions and only voting to close the bad ones and they are bad ones.