Instead of having us guess at what you're confused about, tell us why you are confused by this answer. What is it about multiplying two negative numbers leads you to believe you'd get something other than a positive number? What in the specification have you seen that leads you to believe that multiplying infinity by a non-zero finite number would produce something other than an infinity of the appropriate sign?
When executed the following line of code will print
System.out.println(-1 * Double.NEGATIVE_INFINITY);
Why The Output Is (B)
Just Mind Ur Language................
I Was Having This Doubt So I Asked...........I Was Confused Why
Can't It Give "NaN" Itself Because NaN is Always Having
Some Different Properties like NaN Is Not Equal To Anything Including Itself.I Am Requesting You To Mind Your Way Of Answering...................
Because It Has Always Been Your Way.........Just Mend.
Better You Don't Answer.
Anyone Of Us Is Not Perfect.Please Be Some More Polite In Answering.
You are correct, and thank you.
I believe Steve only asked you the cause for your confusion...and he didnt chide you about not knowing the answer...It was plain ...
If you had been expecting some other answer...which seems to be what he is intending..i will believe he had put it rightly... There was no offence meant ...
I would suggest you're taking things far too personally. I don't remember ever having answered you before, so I have no idea about this history of repeated offense of which you speak. I intended no offense; similarly, you should consider toning down the sensitivity.
Yaa This Time May Be He Is Right But His And Only His Way Of Answering Has Offended Me Many Times That's Why I Quoted So.
I Think I Should Stop This Discussion Here cause You Are Making It As A Issue Like Posting A Kumar's View.I Must Stop Otherwise You Will Go Enen To Hague!
Thanks For Suggestion But Sorry You Are The Only Person Who Suggested Me But I Wantb Suggest You Cause You Definitely Won't Listen.
Okay, so he asked you to do more research. I asked you what you found confusing about the research you had done. I don't understand what you found so offensive, but it doesn't really matter at this point.
Yaa I Read Mr. Ernest's Post.He Is Suggesting Me To Have A Wider Review Of Some Topics..........And I Am Doing The Same.
Unfortunately, that doesn't make the meaning any more clear to me.
And In My Earlier Post In'Enen to Hague' Should Be 'Even To Hague'.
So, do you understand it now, or are you still confused? If you are still confused, please explain what you are confused about (remember that when you multiply two negative numbers, the result is positive, and when you multiply any non-zero finite number by infinity, the answer is infinity).
So I Raised The Question.
I hear what you're saying and I appreciate the input. My full length explanation would be, "The answer is (B) because multiplying two negatives make a positive and multiplying infinity by a non-zero finite number results in infinity." Honestly, I don't know how to be more complete than that, and that's pretty much what I covered in my first post.
Woudn't it be nice if you just could give a full length explaination if you wished otherwise there is always someone else to do it
I'm inclined to agree with you.
I'm inclined to think that there might be a cultural misunderstanding here.
I don't know the best way to address it either, but I think the article by Eric Raymond (particularly the cited passage) is apropos. Of course, JavaRanch is warmer and fuzzier place that some of the "Other Forums".
I don't know the best way to address this. But I do think we all need to be aware of these things, and somehow make allowances for these differences.
float or double division by zero results in NaN (rather than an ArithmeticException).
float or double division by zero ...
Originally posted by A Kumar:
... Its true that int division by zero gives you Arithmetic exception...
but float or double division by zero...
System.out.println(1.0/0.0 ); //Gives Infinity
System.out.println(0.0/0.0 ); //Gives NaN
System.out.println(Float.MAX_VALUE/0.0 ); //Gives Infinity
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earthhttps://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter