• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Wrapper class

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all


This code will compile & run fine

Result is true ,true,true

my doubt is

i can not understand return startment ( return(v != v == Double.isNaN(v)); )

anybody explain this line return(v != v == Double.isNaN(v))

Best & regards
venka

( [C0DE][/C0DE] tags added )
[ July 21, 2004: Message edited by: Barry Gaunt ]
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This will be calculated as ((v != v) == Double.isNaN(v))

So in first case : double d1 = Double.NaN;
true== true => true
case d2:
false == false => true

case d3:
false == false => true


Hope this clears.
 
venkataraman muthuvel
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
Sandeep Jindal

thanks for ur help

ok i understood.

Best & Regards

venkat
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic