I've posted an answer to a java + math problem here : http://stackoverflow.com/a/11967112/880118
In my opinion i'm answering the question as the OP posted for a java exercise so it had precise requirements. But some disagreed with the mathematical part of the subject which IMO is not the point here. They said near 0 the answer won't be correct and I agree with that. They also said double near zero is full of rounding issues which I totally agree BUT I said it's not part of the java exercise.
I was waiting for someone to debate with me about that and instead duffymo kept coming at me with the rounding/bad formula for root issues. Shortly I was thinking around this problem : Should we give a better answer to a math problem when it's just a java exercise?
I would consider that meeting requirements for an application is the base for a good application, doing better is doing it wrong but hell no one cared and kept attacking me.
What should I say? For me it's inappropriate and non constructive as I'm just pissed off and still don't know what is the good answer for that.