Click here to Skip to main content
15,912,082 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: What the NaN? Pin
Sander Rossel2-Oct-16 8:47
professionalSander Rossel2-Oct-16 8:47 
GeneralRe: What the NaN? Pin
Mladen Janković2-Oct-16 10:11
Mladen Janković2-Oct-16 10:11 
GeneralRe: What the NaN? Pin
BillWoodruff2-Oct-16 11:39
professionalBillWoodruff2-Oct-16 11:39 
GeneralRe: What the NaN? Pin
Nagy Vilmos2-Oct-16 7:10
professionalNagy Vilmos2-Oct-16 7:10 
GeneralRe: What the NaN? Pin
Cornelius Henning2-Oct-16 7:36
professionalCornelius Henning2-Oct-16 7:36 
GeneralRe: What the NaN? Pin
Sander Rossel2-Oct-16 8:49
professionalSander Rossel2-Oct-16 8:49 
GeneralRe: What the NaN? Pin
Jochen Arndt2-Oct-16 10:22
professionalJochen Arndt2-Oct-16 10:22 
GeneralRe: What the NaN? Pin
Sander Rossel2-Oct-16 10:33
professionalSander Rossel2-Oct-16 10:33 
So it's completely dependent on the internals of Min and Max.
Had Max checked if any values were smaller than the current then NaN would always be max and had Min checked if any values were greater than the current then NaN would never be min.
So change your implementation and NaN will behave differently, feels very random.
Read my (free) ebook Object-Oriented Programming in C# Succinctly.
Visit my blog at Sander's bits - Writing the code you need.
Or read my articles here on CodeProject.
Simplicity is prerequisite for reliability.
— Edsger W. Dijkstra
Regards,
Sander

GeneralRe: What the NaN? Pin
BillWoodruff2-Oct-16 12:23
professionalBillWoodruff2-Oct-16 12:23 
GeneralRe: What the NaN? Pin
Mladen Janković2-Oct-16 12:40
Mladen Janković2-Oct-16 12:40 
GeneralRe: What the NaN? Pin
BillWoodruff2-Oct-16 16:17
professionalBillWoodruff2-Oct-16 16:17 
GeneralRe: What the NaN? Pin
Sander Rossel2-Oct-16 20:34
professionalSander Rossel2-Oct-16 20:34 
GeneralRe: What the NaN? Pin
Jochen Arndt2-Oct-16 15:04
professionalJochen Arndt2-Oct-16 15:04 
GeneralRe: What the NaN? Pin
Sander Rossel2-Oct-16 20:36
professionalSander Rossel2-Oct-16 20:36 
GeneralRe: What the NaN? Pin
Jochen Arndt2-Oct-16 23:20
professionalJochen Arndt2-Oct-16 23:20 
GeneralRe: What the NaN? Pin
harold aptroot2-Oct-16 11:02
harold aptroot2-Oct-16 11:02 
GeneralRe: What the NaN? Pin
Mladen Janković2-Oct-16 11:04
Mladen Janković2-Oct-16 11:04 
GeneralRe: What the NaN? Pin
Sander Rossel2-Oct-16 11:13
professionalSander Rossel2-Oct-16 11:13 
GeneralRe: What the NaN? Pin
Sander Rossel2-Oct-16 11:19
professionalSander Rossel2-Oct-16 11:19 
NewsRe: What the NaN? Pin
Super Lloyd2-Oct-16 12:02
Super Lloyd2-Oct-16 12:02 
GeneralRe: What the NaN? Pin
BillWoodruff2-Oct-16 16:22
professionalBillWoodruff2-Oct-16 16:22 
GeneralRe: What the NaN? Pin
Super Lloyd2-Oct-16 19:28
Super Lloyd2-Oct-16 19:28 
GeneralRe: What the NaN? Pin
Sander Rossel2-Oct-16 20:38
professionalSander Rossel2-Oct-16 20:38 
GeneralRe: What the NaN? Pin
den2k882-Oct-16 20:59
professionalden2k882-Oct-16 20:59 
GeneralRe: What the NaN? Pin
BillWoodruff3-Oct-16 0:33
professionalBillWoodruff3-Oct-16 0:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.