8

I have originally closed this question "Round off to the nearest 0.05 C++" as duplicate of "Round a float to a given precision" with my ability to short cut close duplicates.

The OP started a long and lamenting rant in comments in turn, that the Q&A mentioned as the dupe, don't address their concerns, don't work, etc. But without any real improvement of the question (not even in the comments), towards what's actually their problem.

Being massively annoyed by the OP's comments (that also had some ad hominem tendencies), I finally decided to retract my duplicate close vote, and summarized up an answer from what I understood from OP's question, and how this would be solved by the given code from the dupe.

My question is:
Should I have better left this question closed?

I did't see an alternative way, to make it clear for the OP, their question actually is a duplicate of the other one (comments don't fit very well for this), and I also disliked to be left abandoned with this critique.

If anyone else also thinks, the post in question is a dupe, don't hesitate to close it please!


Finally @juanchopanza (Cheeers!!) showed mercy, and drew the curtain over that little Punch & Judy show!

6
  • 6
    That user's got a real great attitude: "Explain me now....Now you are responsible" Commented Sep 23, 2014 at 20:43
  • @ThisSuitIsBlackNot May be that's a big failure, but if s.o. calls me responsible, I tend to feel being so ;-) ... Commented Sep 23, 2014 at 20:47
  • 1
    @ThisSuitIsBlackNot "Now you are responsible" is a common misuse of "to be" and misunderstanding of "responsible" in non-native English speakers I've seen quite a lot. It's probably not attitude, he/she just doesn't quite know the right words.
    – Izkata
    Commented Sep 24, 2014 at 18:31
  • 3
    @Izkata Sorry, don't buy it. I've seen this attitude with plenty of native English speakers as well. The comment thread is now deleted, but there was a clear, consistent tone of "You must serve me." No please, no thank you, only "do it, because I said so." Commented Sep 24, 2014 at 18:49
  • @ThisSuitIsBlackNot I should have been saving a screenshot :P ... Commented Sep 25, 2014 at 3:34
  • 2
    It's not like it would make any more sense or be any less rude if you replaced it with "to be": "Explain me now...Now you are to be"
    – Cody Gray Mod
    Commented Sep 26, 2014 at 3:40

2 Answers 2

14

Your answer is:

Yes!

2
  • Actually I couldn't see a better way to make the OP aware that their question really is a duplicate. Comments don't format well for this, and I didn't want to just let it begone. Commented Sep 23, 2014 at 20:10
  • 1
    Uh, anyone else dare to (re-)close that question now?
    – Jongware
    Commented Sep 23, 2014 at 20:15
-2

Yes to the question body, No to the question title... Sorta

The question titles are not duplicates of each other, but what is described in the question bodies are.

For example, rounding 11.2125 to the nearest 0.05 is actually 11.20, not 11.21 or 11.22. However, the examples given in the body do not show this behavior.

The problem is that "precision" is a slightly different concept. If you were rounding 11.2125 to a precision of 2 decimals, then you'd get 11.21 or 11.22, depending if you rounded up or down.

So reading the one it's marked a duplicate of - I think that question has the wrong title. The accepted answer over there also doesn't explain it very well, but just sticks a hardcoded 5 in their round function, making it easy to miss (as I did initially).

2
  • 8
    The titles don't necessarily need to match, to identify duplicate questions IMHO. Commented Sep 24, 2014 at 18:53
  • @πάνταῥεῖ I agree (and the header added says "already has an answer", so it's rather explicit), I'm just trying to point out why it might not be easy to see. It took me the 10 minutes to type this up, going back and forth to ensure I wasn't missing something, before I even noticed that the accepted answer does answer what's in the new question's title. You have to understand what that one is doing before seeing it is a duplicate, because nothing is actually explained on it.
    – Izkata
    Commented Sep 24, 2014 at 19:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .