Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

There a NaN Seats Available  RSS feed

 
Saloon Keeper
Posts: 2153
278
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was hoping to book some rail travel from Vancouver to Seattle, but sadly there were NaN reserveable coach seats available ...



 
Marshal
Posts: 67164
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Must be from Maine. "We don' put up with NaN of that nonsense up heeyar."
 
Marshal
Posts: 61756
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is worse than that; NaN people have already reserved seats.
 
Marshal
Posts: 6263
420
BSD
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought they introduced bug in calculations, hence got - "Not a Number".
 
author & internet detective
Posts: 38911
686
Eclipse IDE Java VI Editor
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:I thought they introduced bug in calculations, hence got - "Not a Number".


But it is funnier to make jokes
 
Ron McLeod
Saloon Keeper
Posts: 2153
278
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:I thought they introduced bug in calculations, hence got - "Not a Number".


Assuming that they are not selling tickets for for less an a whole seat, should the result of any calculation ever be a floating point value?
 
Campbell Ritchie
Marshal
Posts: 61756
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It't the number of people that is a floating‑point number, some of them not being all there.
 
Jeanne Boyarsky
author & internet detective
Posts: 38911
686
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ron McLeod wrote:

Liutauras Vilda wrote:I thought they introduced bug in calculations, hence got - "Not a Number".


Assuming that they are not selling tickets for for less an a whole seat, should the result of any calculation ever be a floating point value?


You can still try to divide an int by zero though. Doesn't that still give NaN?  
 
Liutauras Vilda
Marshal
Posts: 6263
420
BSD
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:You can still try to divide an int by zero though. Doesn't that still give NaN?


Nope, only floats. And in particular 0 / 0.0; changing first operand to positive > 0 gives infinity, to negative minus infinity. Maybe there are more cases for NaN though, don't know.

Ron McLeod wrote:Assuming that they are not selling tickets for for less an a whole seat, should the result of any calculation ever be a floating point value?


Since it is MD fora here, I'm free to assume what I want You might cannot buy half of a seat, but you can calculate how much it costs
 
Campbell Ritchie
Marshal
Posts: 61756
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NaN is defined as 0.0 ÷ 0.0. You can get NaN from various functions e.g. Math.sqrt(−1).
 
Bear Bibeault
Marshal
Posts: 67164
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every time I see this topic, it makes me hungry.

 
Campbell Ritchie
Marshal
Posts: 61756
193
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know weak puns are allowed on Fridays.
 
Jeanne Boyarsky
author & internet detective
Posts: 38911
686
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear: What is that? It doesn't look like pie?
 
Bear Bibeault
Marshal
Posts: 67164
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Naan, a flatbread that I usually associate with Indian food. And completely delicious!
 
Campbell Ritchie
Marshal
Posts: 61756
193
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you got for something like a Peshwari naan, you are better off with chapattis.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!