| Author |
When will we get the value [B]NaN[/B].
|
pradeep singh
Ranch Hand
Joined: Oct 23, 2007
Posts: 339
|
|
Hi to all, When will we get the value NaN.Please explain me with examples?
|
SCJP 5.0(75%), SCWCD 5.0(88%)
|
 |
pradeep singh
Ranch Hand
Joined: Oct 23, 2007
Posts: 339
|
|
|
Please anyone give your valuable thoughts about above
|
 |
Thirugnanam Saravanan
Ranch Hand
Joined: Dec 13, 2007
Posts: 81
|
|
"NaN" stands for "Not a Number". "NaN" is produced if a floating point operation has some input parameters that cause the operation to produce some undefined result. For example, 0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a negative number is also undefined. 0.0 / 0.0 -> NaN Math.sqrt(-2.0) -> NaN Refer The following example:
|
Saravanan
SCJP 5.0(98%), SCWCD 5.0 (100%), OCA
|
 |
pradeep singh
Ranch Hand
Joined: Oct 23, 2007
Posts: 339
|
|
Thanks a lot,Mr.Thirugnanam Saravanan Now i am well understood. Thanks again.
|
 |
 |
|
|
subject: When will we get the value [B]NaN[/B].
|
|
|