Click here to Skip to main content
16,005,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Getting rid of the following warnings.. Pin
toxcct4-Jun-08 21:11
toxcct4-Jun-08 21:11 
Questionstatic Lib gives Link Error - Migrating to VC 2005 from VC 2003 Pin
zameer.kh4-Jun-08 18:45
zameer.kh4-Jun-08 18:45 
AnswerRe: static Lib gives Link Error - Migrating to VC 2005 from VC 2003 Pin
toxcct4-Jun-08 21:05
toxcct4-Jun-08 21:05 
GeneralRe: static Lib gives Link Error - Migrating to VC 2005 from VC 2003 Pin
zameer.kh5-Jun-08 4:38
zameer.kh5-Jun-08 4:38 
QuestionQuestion about painting and scrolling in wxWidgets!! Pin
Rohde4-Jun-08 12:36
Rohde4-Jun-08 12:36 
AnswerRe: Question about painting and scrolling in wxWidgets!! Pin
Rohde4-Jun-08 12:45
Rohde4-Jun-08 12:45 
QuestionHelp! Need source code for _isnan and _finite Pin
Jesse Evans4-Jun-08 12:26
Jesse Evans4-Jun-08 12:26 
AnswerRe: Help! Need source code for _isnan and _finite Pin
Saurabh.Garg4-Jun-08 16:31
Saurabh.Garg4-Jun-08 16:31 
I am pretty sure you can resolve conflict by not using you own functions. But I have those functions handy so I will give it anyway.

typedef __int64 Int64;


//! Check if a number is infinite.
inline bool isInfinite(double A)
{
	// Representation of infinity for double precision number.
	static const Int64 _kInfAsInt = 0x7FF0000000000000;
	
	// An infinity has an exponent of 1023 (shift left 52 positions) and
	// a zero mantissa. There are two infinities - positive and negative.
	if ((*(Int64*)&A & 0x7FFFFFFFFFFFFFFF) == _kInfAsInt)
	{
		return true;
	}
	else
	{
		return false;
	}
}


//! Check if a number is Not-a-Number.
inline bool isNan(double A)
{
	// A NAN has an exponent of 1023 (shifted left 52 positions) and
	// a non-zero mantissa. There are two Nan's - positive and negative.
	Int64 _exp      = *(Int64*)&A & 0x7FF0000000000000;
	Int64 _mantissa = *(Int64*)&A & 0xFFFFFFFFFFFFF;
	
	if(_exp == 0x7FF0000000000000 && _mantissa != 0)
	{
		return true;
	}
	else
	{
		return false;
	}
}


-Saurabh
GeneralRe: Help! Need source code for _isnan and _finite Pin
Jesse Evans5-Jun-08 6:33
Jesse Evans5-Jun-08 6:33 
GeneralRe: Help! Need source code for _isnan and _finite Pin
Saurabh.Garg5-Jun-08 16:54
Saurabh.Garg5-Jun-08 16:54 
AnswerRe: Help! Need source code for _isnan and _finite Pin
Jijo.Raj4-Jun-08 20:16
Jijo.Raj4-Jun-08 20:16 
GeneralRe: Help! Need source code for _isnan and _finite Pin
Jesse Evans5-Jun-08 6:34
Jesse Evans5-Jun-08 6:34 
AnswerRe: Help! Need source code for _isnan and _finite Pin
toxcct4-Jun-08 20:58
toxcct4-Jun-08 20:58 
GeneralRe: Help! Need source code for _isnan and _finite Pin
Jesse Evans5-Jun-08 6:19
Jesse Evans5-Jun-08 6:19 
GeneralRe: Help! Need source code for _isnan and _finite Pin
toxcct5-Jun-08 6:29
toxcct5-Jun-08 6:29 
GeneralRe: Help! Need source code for _isnan and _finite Pin
Jesse Evans5-Jun-08 6:39
Jesse Evans5-Jun-08 6:39 
QuestionBlock Printer Pin
zoiomon4-Jun-08 10:42
zoiomon4-Jun-08 10:42 
QuestionRe: Block Printer Pin
David Crow5-Jun-08 3:12
David Crow5-Jun-08 3:12 
QuestionMultilanguage support [modified] Pin
Nelek4-Jun-08 7:44
protectorNelek4-Jun-08 7:44 
AnswerRe: Multilanguage support Pin
Maximilien4-Jun-08 8:19
Maximilien4-Jun-08 8:19 
GeneralRe: Multilanguage support Pin
Nelek4-Jun-08 12:55
protectorNelek4-Jun-08 12:55 
GeneralRe: Multilanguage support Pin
Nelek4-Jun-08 13:50
protectorNelek4-Jun-08 13:50 
AnswerRe: Multilanguage support Pin
Nemanja Trifunovic4-Jun-08 10:27
Nemanja Trifunovic4-Jun-08 10:27 
QuestionPathRemoveFileSpec function removes the last part even if it's not a file ?! Pin
sashoalm4-Jun-08 6:17
sashoalm4-Jun-08 6:17 
AnswerRe: PathRemoveFileSpec function removes the last part even if it's not a file ?! Pin
James R. Twine4-Jun-08 6:44
James R. Twine4-Jun-08 6:44 

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.