Click here to Skip to main content
15,887,361 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ Directory Functions Pin
gamefreak229120-Apr-09 18:16
gamefreak229120-Apr-09 18:16 
AnswerRe: C++ Directory Functions Pin
krmed21-Apr-09 3:03
krmed21-Apr-09 3:03 
QuestionWhat I should Use...bitset, vector &LT bool&GT, or bit_vector? Pin
JohnnyG20-Apr-09 13:51
JohnnyG20-Apr-09 13:51 
AnswerRe: What I should Use...bitset, vector &LT bool&GT, or bit_vector? Pin
Stuart Dootson20-Apr-09 20:07
professionalStuart Dootson20-Apr-09 20:07 
GeneralRe: What I should Use...bitset, vector &LT bool&GT, or bit_vector? Pin
JohnnyG21-Apr-09 11:18
JohnnyG21-Apr-09 11:18 
Questionsprintf and rounding issues [modified] Pin
Jim Crafton20-Apr-09 8:27
Jim Crafton20-Apr-09 8:27 
AnswerRe: sprintf and rounding issues Pin
Stuart Dootson20-Apr-09 8:57
professionalStuart Dootson20-Apr-09 8:57 
AnswerRe: sprintf and rounding issues Pin
Luc Pattyn20-Apr-09 9:20
sitebuilderLuc Pattyn20-Apr-09 9:20 
Hi,

Both your numbers look very regular to humans, using decimal notation.
None of these numbers get represented exactly in floating-point, so it happens one of them is slightly less, the other slightly more than the values you would hope. Of course it is the internal value that gets rounded, not the one you had in mind.

Check by printing more decimals, e.g. "%0.8f"

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in


AnswerRe: sprintf and rounding issues Pin
CPallini20-Apr-09 10:38
mveCPallini20-Apr-09 10:38 
QuestionText in OpenGL Pin
yousuf_227920-Apr-09 8:12
professionalyousuf_227920-Apr-09 8:12 
AnswerRe: Text in OpenGL Pin
Stuart Dootson20-Apr-09 8:24
professionalStuart Dootson20-Apr-09 8:24 
GeneralRe: Text in OpenGL Pin
yousuf_227920-Apr-09 8:31
professionalyousuf_227920-Apr-09 8:31 
GeneralRe: Text in OpenGL Pin
yousuf_227920-Apr-09 8:34
professionalyousuf_227920-Apr-09 8:34 
GeneralRe: Text in OpenGL Pin
Stuart Dootson20-Apr-09 8:43
professionalStuart Dootson20-Apr-09 8:43 
QuestionHeap Memory / COM Object Limits Pin
Steve Thresher20-Apr-09 6:50
Steve Thresher20-Apr-09 6:50 
QuestionExecuting Code on C++ API Exit Pin
turkmeistr120-Apr-09 5:53
turkmeistr120-Apr-09 5:53 
QuestionRe: Executing Code on C++ API Exit Pin
David Crow20-Apr-09 5:57
David Crow20-Apr-09 5:57 
AnswerRe: Executing Code on C++ API Exit Pin
turkmeistr120-Apr-09 6:23
turkmeistr120-Apr-09 6:23 
GeneralRe: Executing Code on C++ API Exit Pin
David Crow20-Apr-09 8:07
David Crow20-Apr-09 8:07 
GeneralRe: Executing Code on C++ API Exit Pin
turkmeistr120-Apr-09 9:07
turkmeistr120-Apr-09 9:07 
Questionchar array issues Pin
gamefreak229120-Apr-09 5:07
gamefreak229120-Apr-09 5:07 
QuestionRe: char array issues Pin
David Crow20-Apr-09 5:15
David Crow20-Apr-09 5:15 
AnswerRe: char array issues Pin
gamefreak229120-Apr-09 6:02
gamefreak229120-Apr-09 6:02 
GeneralRe: char array issues PinPopular
Maximilien20-Apr-09 6:51
Maximilien20-Apr-09 6:51 
AnswerRe: char array issues Pin
CPallini20-Apr-09 10:51
mveCPallini20-Apr-09 10:51 

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.