Click here to Skip to main content
15,913,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MS-ACCESS......few problems!!! Pin
Michael P Butler1-Aug-04 22:49
Michael P Butler1-Aug-04 22:49 
Generalproblem getting size of file Pin
Archer2821-Aug-04 20:12
Archer2821-Aug-04 20:12 
GeneralRe: problem getting size of file Pin
David Crow2-Aug-04 3:57
David Crow2-Aug-04 3:57 
Generalatof question Pin
User 5838521-Aug-04 20:09
User 5838521-Aug-04 20:09 
GeneralRe: atof question Pin
Archer2821-Aug-04 20:35
Archer2821-Aug-04 20:35 
GeneralRe: atof question Pin
Rick York1-Aug-04 21:06
mveRick York1-Aug-04 21:06 
GeneralRe: atof question Pin
User 5838522-Aug-04 1:05
User 5838522-Aug-04 1:05 
GeneralRe: atof question Pin
ssiegel2-Aug-04 17:52
ssiegel2-Aug-04 17:52 
As previously mentioned you should not expect an exact comparision when working with floating point numbers. To check equality you need to compare the differnce to epsilon. If the difference is < or = epsilon then the numbers are equal. Otherwise they are not.

This is done as follows: take the absolute value of the difference of the absolute values of the two floating point numbers and compare the result to epsilon. If the difference is less than or equal epsilon then the numbers are equal.


if( FLT_EPSILON =< fabsf( fabsf(f1) - fabsf(f2) ) )
printf( "numbers are equal\n" );
else
printf( "numbers are not equal\n" );

NOTE: there are double precision variants of epsilon and fabsf.

Sam

Sam
GeneralClashes of numbers in Resource.h files Pin
PrashantJ1-Aug-04 19:51
PrashantJ1-Aug-04 19:51 
GeneralRe: Clashes of numbers in Resource.h files Pin
Jaime Stuardo2-Aug-04 4:46
Jaime Stuardo2-Aug-04 4:46 
GeneralRe: Clashes of numbers in Resource.h files Pin
PrashantJ2-Aug-04 18:31
PrashantJ2-Aug-04 18:31 
GeneralRe: Clashes of numbers in Resource.h files Pin
Jaime Stuardo3-Aug-04 1:27
Jaime Stuardo3-Aug-04 1:27 
GeneralHelp with Compiling Error Pin
arunforce1-Aug-04 18:43
arunforce1-Aug-04 18:43 
GeneralRe: Help with Compiling Error Pin
Michael Dunn1-Aug-04 19:23
sitebuilderMichael Dunn1-Aug-04 19:23 
GeneralSQL Commands Pin
Zero_One_ADO1-Aug-04 17:43
Zero_One_ADO1-Aug-04 17:43 
GeneralRe: SQL Commands Pin
Anonymous1-Aug-04 19:52
Anonymous1-Aug-04 19:52 
Generalfiles and folders Pin
Tyrus1821-Aug-04 17:02
Tyrus1821-Aug-04 17:02 
GeneralRe: files and folders Pin
Ravi Bhavnani1-Aug-04 17:37
professionalRavi Bhavnani1-Aug-04 17:37 
Generaloy ! Pin
bikram singh1-Aug-04 18:11
bikram singh1-Aug-04 18:11 
GeneralRe: oy ! Pin
Ravi Bhavnani2-Aug-04 2:26
professionalRavi Bhavnani2-Aug-04 2:26 
GeneralRe: oy ! Pin
bikram singh2-Aug-04 3:28
bikram singh2-Aug-04 3:28 
QuestionNeed Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
baboguru1-Aug-04 15:41
baboguru1-Aug-04 15:41 
AnswerRe: Need Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
Ryan Binns1-Aug-04 18:31
Ryan Binns1-Aug-04 18:31 
GeneralRe: Need Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
baboguru1-Aug-04 22:45
baboguru1-Aug-04 22:45 
GeneralRe: Need Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
Ryan Binns1-Aug-04 23:07
Ryan Binns1-Aug-04 23:07 

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.