Click here to Skip to main content
15,919,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionReliable way to convert float to a double? Pin
Member 9612-Feb-03 7:40
Member 9612-Feb-03 7:40 
AnswerRe: Reliable way to convert float to a double? Pin
Chris Losinger12-Feb-03 7:51
professionalChris Losinger12-Feb-03 7:51 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 8:10
Member 9612-Feb-03 8:10 
GeneralRe: Reliable way to convert float to a double? Pin
Chris Losinger12-Feb-03 8:20
professionalChris Losinger12-Feb-03 8:20 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 8:30
Member 9612-Feb-03 8:30 
GeneralRe: Reliable way to convert float to a double? Pin
Alvaro Mendez12-Feb-03 9:01
Alvaro Mendez12-Feb-03 9:01 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 8:41
Member 9612-Feb-03 8:41 
AnswerRe: Reliable way to convert float to a double? Pin
Tim Smith12-Feb-03 7:52
Tim Smith12-Feb-03 7:52 
The problem is that you don't have a 2.7 to begin with.

Instead of trying to represent 2.7 in a double, you are trying to extend a float value which is close to 2.7 to a double. In other words, there is a huge range of double values which come close to a float value of 2.7 while only one is actually a double value of 2.7.


Tim Smith

I'm going to patent thought. I have yet to see any prior art.
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 7:55
Member 9612-Feb-03 7:55 
GeneralRe: Reliable way to convert float to a double? Pin
Stuart Dootson12-Feb-03 8:29
professionalStuart Dootson12-Feb-03 8:29 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 8:37
Member 9612-Feb-03 8:37 
GeneralRe: Reliable way to convert float to a double? Pin
Stuart Dootson12-Feb-03 21:55
professionalStuart Dootson12-Feb-03 21:55 
AnswerThis will work, while ugly... Pin
Abin12-Feb-03 16:58
Abin12-Feb-03 16:58 
Generalmodeless dlg question Pin
ns12-Feb-03 7:17
ns12-Feb-03 7:17 
Generalnevermind...thanks Pin
ns12-Feb-03 7:44
ns12-Feb-03 7:44 
GeneralRe: nevermind...thanks Pin
Joan M12-Feb-03 20:12
professionalJoan M12-Feb-03 20:12 
Generalthanks! Pin
ns13-Feb-03 1:43
ns13-Feb-03 1:43 
Generalcatching file changes Pin
Joao Vaz12-Feb-03 6:41
Joao Vaz12-Feb-03 6:41 
GeneralRe: catching file changes Pin
AlexO12-Feb-03 6:54
AlexO12-Feb-03 6:54 
GeneralRe: catching file changes Pin
Joao Vaz12-Feb-03 7:07
Joao Vaz12-Feb-03 7:07 
GeneralDeriving a template class? Please help. Pin
clintsinger12-Feb-03 6:28
clintsinger12-Feb-03 6:28 
GeneralSolved it! Pin
clintsinger12-Feb-03 6:34
clintsinger12-Feb-03 6:34 
GeneralCString and \r question Pin
LukeV12-Feb-03 6:18
LukeV12-Feb-03 6:18 
GeneralRe: CString and \r question Pin
Alvaro Mendez12-Feb-03 6:44
Alvaro Mendez12-Feb-03 6:44 
GeneralRe: CString and \r question Pin
Mike Nordell12-Feb-03 6:55
Mike Nordell12-Feb-03 6:55 

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.