Click here to Skip to main content
15,905,419 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 10:33
professionalSander Rossel2-Oct-16 10:33 
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 
I don't saw Mladen's reply when I wrote mine (late in the night) but it explains what happens here.

But that implementation produces predictible results:
If an element is NaN, it is the smallest number and returned.

How should it be treated else?
The only other option from my point of view would be throwing an execption (e.g. by using signaling NaNs instead of quite NaNs).
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 
GeneralRe: What the NaN? Pin
den2k883-Oct-16 1:53
professionalden2k883-Oct-16 1:53 
GeneralRe: What the NaN? Pin
Sander Rossel3-Oct-16 6:02
professionalSander Rossel3-Oct-16 6:02 
GeneralRe: What the NaN? Pin
den2k883-Oct-16 11:31
professionalden2k883-Oct-16 11:31 
GeneralRe: What the NaN? Pin
Daniel Pfeffer4-Oct-16 11:13
professionalDaniel Pfeffer4-Oct-16 11:13 
GeneralI was sent this... Pin
OriginalGriff2-Oct-16 5:01
mveOriginalGriff2-Oct-16 5:01 
GeneralRe: I was sent this... Pin
glennPattonWork32-Oct-16 6:11
professionalglennPattonWork32-Oct-16 6:11 
GeneralRe: I was sent this... Pin
OriginalGriff2-Oct-16 6:12
mveOriginalGriff2-Oct-16 6:12 

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.