Click here to Skip to main content
15,922,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Converting different data types from a class template. Pin
«_Superman_»27-Nov-09 17:19
professional«_Superman_»27-Nov-09 17:19 
QuestionOpen-With menu items for given file extension Pin
michalJ27-Nov-09 13:25
michalJ27-Nov-09 13:25 
AnswerRe: Open-With menu items for given file extension Pin
Rozis28-Nov-09 4:25
Rozis28-Nov-09 4:25 
QuestionUploading a file using CHttpFile Pin
msn9227-Nov-09 12:17
msn9227-Nov-09 12:17 
QuestionThread handle from thread ID [solved] Pin
PJ Arends27-Nov-09 10:40
professionalPJ Arends27-Nov-09 10:40 
AnswerRe: Thread handle from thread ID Pin
Garth J Lancaster27-Nov-09 11:28
professionalGarth J Lancaster27-Nov-09 11:28 
GeneralRe: Thread handle from thread ID Pin
PJ Arends27-Nov-09 17:01
professionalPJ Arends27-Nov-09 17:01 
Questionplease help : how to draw BSpline by using mouse ??? Pin
a04.lqd27-Nov-09 6:59
a04.lqd27-Nov-09 6:59 
AnswerRe: please help : how to draw BSpline by using mouse ??? Pin
Richard MacCutchan27-Nov-09 7:14
mveRichard MacCutchan27-Nov-09 7:14 
GeneralRe: please help : how to draw BSpline by using mouse ??? Pin
a04.lqd27-Nov-09 7:19
a04.lqd27-Nov-09 7:19 
GeneralRe: please help : how to draw BSpline by using mouse ??? Pin
Richard MacCutchan27-Nov-09 7:27
mveRichard MacCutchan27-Nov-09 7:27 
GeneralRe: please help : how to draw BSpline by using mouse ??? Pin
Cedric Moonen27-Nov-09 7:28
Cedric Moonen27-Nov-09 7:28 
GeneralRe: please help : how to draw BSpline by using mouse ??? Pin
CPallini27-Nov-09 7:26
mveCPallini27-Nov-09 7:26 
GeneralRe: please help : how to draw BSpline by using mouse ??? Pin
Richard MacCutchan27-Nov-09 7:28
mveRichard MacCutchan27-Nov-09 7:28 
AnswerRe: please help : how to draw BSpline by using mouse ??? Pin
«_Superman_»27-Nov-09 9:15
professional«_Superman_»27-Nov-09 9:15 
QuestionQuestion about double #INF and #NAN Pin
Jeff Archer27-Nov-09 5:02
Jeff Archer27-Nov-09 5:02 
QuestionRe: Question about double #INF and #NAN Pin
CPallini27-Nov-09 5:54
mveCPallini27-Nov-09 5:54 
AnswerRe: Question about double #INF and #NAN Pin
Jeff Archer27-Nov-09 7:08
Jeff Archer27-Nov-09 7:08 
GeneralRe: Question about double #INF and #NAN Pin
Richard MacCutchan27-Nov-09 7:17
mveRichard MacCutchan27-Nov-09 7:17 
GeneralRe: Question about double #INF and #NAN Pin
Jeff Archer27-Nov-09 7:51
Jeff Archer27-Nov-09 7:51 
GeneralRe: Question about double #INF and #NAN Pin
CPallini27-Nov-09 7:23
mveCPallini27-Nov-09 7:23 
GeneralRe: Question about double #INF and #NAN Pin
Jeff Archer27-Nov-09 7:50
Jeff Archer27-Nov-09 7:50 
GeneralRe: Question about double #INF and #NAN Pin
CPallini27-Nov-09 8:03
mveCPallini27-Nov-09 8:03 
GeneralRe: Question about double #INF and #NAN [modified] Pin
Jeff Archer27-Nov-09 8:39
Jeff Archer27-Nov-09 8:39 
Sorry, I guess I didn't present that very well.

NAN is an exponent of 0x7FF with a non-zero mantissa.
INF is an exponent of 0x7FF with a zero mantissa.

Here are the actual fuctions I am using...

bool IsInf (double d)
{
      const INT64 iInf = 0x7FF0000000000000;

      if ((*(INT64*)&d & 0x7FFFFFFFFFFFFFFF) == iInf)
            return true;
      return false;
}

bool IsNan (double d)
{
      INT64 exp = *(INT64*)&d & 0x7FF0000000000000;
      INT64 mantissa = *(INT64*)&d & 0x000FFFFFFFFFFFFF;
      if (exp == 0x7FF0000000000000 && mantissa != 0)
            return true;
      return false;
}

modified on Friday, November 27, 2009 3:04 PM

QuestionUsing COM Object Invalid Pointer Error Pin
Ash_VCPP27-Nov-09 1:18
Ash_VCPP27-Nov-09 1:18 

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.