This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.

Hi Charlie, First look for your code with some changes:

The answer is:

Actually, no matter for number signal. As you can see, the jdk API say:

Returns the greater of two float values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. ...

Originally posted by Charlie Swanson: [B]Does anyone know what or how the below line in the below code works? Math.max(-0.0, +0,0) == Math.min(-0.0, +0,0) Math.max(-0.0, +0.0) = +0.0 Math.min(-0.0, +0.0) = -0.0 But -0.0 = +0.0 if u want to compare them hope this clears it

hi ------------------------------------------------------- "Positive zero and negative zero are considered equal. Therefore, -0.0==0.0 is true, for example." ------------------------------------------------------- this is a rule of the language and the above line is from the JLS hope that helps Samith.P.Nambiar ----------------------------- harder u try luckier u get

Charlie Swanson
Ranch Hand

Joined: Jan 29, 2001
Posts: 213

posted

0

Thank you all. I like the phrase "the harder you try the luckier you get". It seems like lately the harder I study the more confused I get.