Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
Questionmystery NaN Pin
stegzzz30-Nov-11 22:46
stegzzz30-Nov-11 22:46 
AnswerRe: mystery NaN Pin
Pete O'Hanlon30-Nov-11 23:00
mvePete O'Hanlon30-Nov-11 23:00 
GeneralRe: mystery NaN Pin
stegzzz30-Nov-11 23:17
stegzzz30-Nov-11 23:17 
GeneralRe: mystery NaN Pin
Pete O'Hanlon30-Nov-11 23:55
mvePete O'Hanlon30-Nov-11 23:55 
GeneralRe: mystery NaN Pin
stegzzz1-Dec-11 0:09
stegzzz1-Dec-11 0:09 
GeneralRe: mystery NaN Pin
Pete O'Hanlon1-Dec-11 0:47
mvePete O'Hanlon1-Dec-11 0:47 
GeneralRe: mystery NaN Pin
harold aptroot1-Dec-11 0:48
harold aptroot1-Dec-11 0:48 
GeneralRe: mystery NaN Pin
stegzzz1-Dec-11 5:25
stegzzz1-Dec-11 5:25 
The debugger stops on the return, right after checking IsNaN(S)

double S =(NC / (Math.Pow(NX, (double)0.5) * Math.Pow(NY, (double)0.5)));
if (double.IsNaN(S))
return 0;

And the debugger values for NC, NX, and NY are 1,2, and 2, respectively, so as suggested there is something wrong with the values being shown in the debugger.

Any ideas how to find out what the real values are that go into the calculation of S?

The code works fine when tested alone, in isolation from the rest of the program.

Thanks, stegzzz
GeneralRe: mystery NaN Pin
harold aptroot1-Dec-11 5:33
harold aptroot1-Dec-11 5:33 
QuestionAsp.Net nested Accordion menu Pin
Balakrishnan Dhinakaran30-Nov-11 19:31
professionalBalakrishnan Dhinakaran30-Nov-11 19:31 
AnswerRe: Asp.Net nested Accordion menu Pin
Richard MacCutchan30-Nov-11 22:34
mveRichard MacCutchan30-Nov-11 22:34 
AnswerRe: Asp.Net nested Accordion menu Pin
#realJSOP1-Dec-11 1:59
professional#realJSOP1-Dec-11 1:59 
Questionhow to make a web page? Pin
nik_utm30-Nov-11 15:54
nik_utm30-Nov-11 15:54 
AnswerRe: how to make a web page? Pin
Richard MacCutchan30-Nov-11 22:35
mveRichard MacCutchan30-Nov-11 22:35 
GeneralRe: how to make a web page? Pin
nik_utm1-Dec-11 14:47
nik_utm1-Dec-11 14:47 
QuestionC# remoting server and client problem Pin
kornkimhour30-Nov-11 15:13
kornkimhour30-Nov-11 15:13 
AnswerRe: C# remoting server and client problem Pin
Richard MacCutchan30-Nov-11 22:32
mveRichard MacCutchan30-Nov-11 22:32 
QuestionSQL Server and C# Pin
john john mackey30-Nov-11 10:42
john john mackey30-Nov-11 10:42 
AnswerRe: SQL Server and C# Pin
PIEBALDconsult30-Nov-11 10:55
mvePIEBALDconsult30-Nov-11 10:55 
GeneralRe: SQL Server and C# Pin
john john mackey30-Nov-11 12:28
john john mackey30-Nov-11 12:28 
GeneralRe: SQL Server and C# Pin
PIEBALDconsult30-Nov-11 14:56
mvePIEBALDconsult30-Nov-11 14:56 
AnswerRe: SQL Server and C# Pin
Mycroft Holmes30-Nov-11 17:01
professionalMycroft Holmes30-Nov-11 17:01 
GeneralRe: SQL Server and C# Pin
john john mackey1-Dec-11 11:01
john john mackey1-Dec-11 11:01 
AnswerRe: SQL Server and C# Pin
BobJanova1-Dec-11 1:46
BobJanova1-Dec-11 1:46 
GeneralRe: SQL Server and C# Pin
john john mackey1-Dec-11 11:23
john john mackey1-Dec-11 11:23 

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.