Click here to Skip to main content
15,868,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to tell when a view loses focus when the user has the right mouse button down and moves out of the view? Pin
Code-o-mat15-Nov-10 21:33
Code-o-mat15-Nov-10 21:33 
Question_unresolved external symbol error?? Pin
AmbiguousName15-Nov-10 9:20
AmbiguousName15-Nov-10 9:20 
AnswerRe: _unresolved external symbol error?? Pin
«_Superman_»15-Nov-10 9:26
professional«_Superman_»15-Nov-10 9:26 
AnswerRe: _unresolved external symbol error?? Pin
Stephen Hewitt15-Nov-10 18:34
Stephen Hewitt15-Nov-10 18:34 
GeneralRe: _unresolved external symbol error?? Pin
AmbiguousName16-Nov-10 2:12
AmbiguousName16-Nov-10 2:12 
QuestionFloat value Pin
john563215-Nov-10 4:44
john563215-Nov-10 4:44 
AnswerRe: Float value Pin
Cedric Moonen15-Nov-10 4:57
Cedric Moonen15-Nov-10 4:57 
AnswerRe: Float value Pin
Dr.Walt Fair, PE15-Nov-10 5:14
professionalDr.Walt Fair, PE15-Nov-10 5:14 
Welcome to floating point math! Your result is typical and is why the #1 rule on doing floating point math is to never depend on the value being exact. You will need to compensate or use a higher precision number type, depending on what you are trying to accomplish.

In most situations the difference in calculated values is not significant, but sometimes it is. The worst resolution problems usually occur when you subtract 2 numbers that are close, then do further manipulations. If you are checking the value with if statements, for example, then you need to check that the value is within a reasonable tolerance.

Search around using Google and Bing for "floating point precision" and you should find lots of information.
CQ de W5ALT

Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software


AnswerRe: Float value Pin
David Crow15-Nov-10 5:41
David Crow15-Nov-10 5:41 
GeneralRe: Float value Pin
Sauro Viti15-Nov-10 9:12
professionalSauro Viti15-Nov-10 9:12 
AnswerRe: Float value Pin
Rick York17-Nov-10 7:36
mveRick York17-Nov-10 7:36 
QuestionProblem with HtmlHelp API Pin
msr_codeproject15-Nov-10 0:03
msr_codeproject15-Nov-10 0:03 
AnswerRe: Problem with HtmlHelp API Pin
Randor 15-Nov-10 2:28
professional Randor 15-Nov-10 2:28 
QuestionCompilation Error Pin
john563214-Nov-10 20:24
john563214-Nov-10 20:24 
AnswerRe: Compilation Error Pin
Cedric Moonen14-Nov-10 20:45
Cedric Moonen14-Nov-10 20:45 
GeneralRe: Compilation Error Pin
CPallini14-Nov-10 21:17
mveCPallini14-Nov-10 21:17 
GeneralRe: Compilation Error Pin
Cedric Moonen14-Nov-10 21:20
Cedric Moonen14-Nov-10 21:20 
AnswerRe: Compilation Error Pin
Richard MacCutchan14-Nov-10 23:07
mveRichard MacCutchan14-Nov-10 23:07 
QuestionHow can access the same port by diffreant threads at same time? Pin
Le@rner14-Nov-10 20:12
Le@rner14-Nov-10 20:12 
AnswerRe: How can access the same port by diffreant threads at same time? Pin
Cedric Moonen14-Nov-10 20:49
Cedric Moonen14-Nov-10 20:49 
GeneralRe: How can access the same port by diffreant threads at same time? Pin
Le@rner14-Nov-10 21:22
Le@rner14-Nov-10 21:22 
GeneralRe: How can access the same port by diffreant threads at same time? Pin
Cedric Moonen14-Nov-10 21:31
Cedric Moonen14-Nov-10 21:31 
GeneralRe: How can access the same port by diffreant threads at same time? Pin
Le@rner14-Nov-10 21:33
Le@rner14-Nov-10 21:33 
GeneralRe: How can access the same port by diffreant threads at same time? Pin
CPallini14-Nov-10 21:53
mveCPallini14-Nov-10 21:53 
GeneralRe: How can access the same port by diffreant threads at same time? Pin
Cedric Moonen14-Nov-10 21:59
Cedric Moonen14-Nov-10 21:59 

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.