Click here to Skip to main content
15,895,471 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDouble value precision Pin
mutpan6-Dec-11 18:54
mutpan6-Dec-11 18:54 
AnswerRe: Double value precision Pin
Chandrasekharan P6-Dec-11 19:27
Chandrasekharan P6-Dec-11 19:27 
GeneralRe: Double value precision Pin
mutpan6-Dec-11 19:35
mutpan6-Dec-11 19:35 
GeneralRe: Double value precision Pin
Chandrasekharan P6-Dec-11 20:33
Chandrasekharan P6-Dec-11 20:33 
AnswerRe: Double value precision Pin
CPallini6-Dec-11 22:13
mveCPallini6-Dec-11 22:13 
GeneralRe: Double value precision Pin
Albert Holguin7-Dec-11 3:24
professionalAlbert Holguin7-Dec-11 3:24 
AnswerRe: Double value precision Pin
tssutha036-Dec-11 22:30
tssutha036-Dec-11 22:30 
AnswerRe: Double value precision Pin
Chuck O'Toole7-Dec-11 5:03
Chuck O'Toole7-Dec-11 5:03 
File this away for future reference:

The "imprecision" is in producing the OUTPUT, the conversion of the binary / computer representation of the number into the string of characters that you display. This is true regardless of whether it is you printing the value or the debugger displaying it for you. Both processes need to take the binary value and convert it to a string of characters for your eyes.

If you a computing a value and wish to use it in other compututations then always carry the binary value around, don't convert it to a string and then reconvert it to binary. The binary value is as precise as you are going to get, converting it back and forth only adds "imprecision"

Computer binary representations (Base 2) and printed represetnations (in Base 10) are inherently incompatible and can only be approximated. You control the approximation with the format specifier for how many digits you want to see.
AnswerRe: Double value precision Pin
JackDingler9-Dec-11 9:30
JackDingler9-Dec-11 9:30 
AnswerRe: Double value precision Pin
Chuck O'Toole9-Dec-11 10:38
Chuck O'Toole9-Dec-11 10:38 
GeneralRe: Double value precision Pin
JackDingler9-Dec-11 10:42
JackDingler9-Dec-11 10:42 
AnswerRe: Double value precision Pin
Chuck O'Toole9-Dec-11 16:52
Chuck O'Toole9-Dec-11 16:52 
QuestionAccess ODBC issue/question in MFC Application CDatabase Class Pin
MacRaider46-Dec-11 9:06
MacRaider46-Dec-11 9:06 
QuestionRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
David Crow7-Dec-11 6:17
David Crow7-Dec-11 6:17 
AnswerRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
MacRaider47-Dec-11 6:47
MacRaider47-Dec-11 6:47 
AnswerRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
MacRaider47-Dec-11 7:27
MacRaider47-Dec-11 7:27 
AnswerRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
jkirkerx7-Dec-11 8:38
professionaljkirkerx7-Dec-11 8:38 
GeneralRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
MacRaider47-Dec-11 9:24
MacRaider47-Dec-11 9:24 
GeneralRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
jkirkerx7-Dec-11 10:49
professionaljkirkerx7-Dec-11 10:49 
GeneralRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
MacRaider48-Dec-11 1:09
MacRaider48-Dec-11 1:09 
GeneralRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
jkirkerx9-Dec-11 11:29
professionaljkirkerx9-Dec-11 11:29 
GeneralRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
MacRaider412-Dec-11 1:32
MacRaider412-Dec-11 1:32 
GeneralRe: Access ODBC issue/question in MFC Application CDatabase Class Pin
jkirkerx12-Dec-11 4:20
professionaljkirkerx12-Dec-11 4:20 
QuestionTextOut/DrawText is too slow Pin
Joe Smith IX6-Dec-11 6:32
Joe Smith IX6-Dec-11 6:32 
AnswerRe: TextOut/DrawText is too slow Pin
Chris Losinger6-Dec-11 8:45
professionalChris Losinger6-Dec-11 8:45 

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.