Click here to Skip to main content
15,889,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Common controls and manifests Pin
Jochen Arndt31-Aug-12 6:22
professionalJochen Arndt31-Aug-12 6:22 
GeneralRe: Common controls and manifests Pin
David Crow31-Aug-12 6:54
David Crow31-Aug-12 6:54 
GeneralRe: Common controls and manifests Pin
Jochen Arndt1-Sep-12 1:22
professionalJochen Arndt1-Sep-12 1:22 
GeneralRe: Common controls and manifests Pin
David Crow1-Sep-12 6:43
David Crow1-Sep-12 6:43 
GeneralRe: Common controls and manifests Pin
Jochen Arndt1-Sep-12 21:18
professionalJochen Arndt1-Sep-12 21:18 
QuestionMove the slider to the position where user clicked the mouse. Pin
mbatra3130-Aug-12 22:53
mbatra3130-Aug-12 22:53 
QuestionVC2008 Windows Service Mouse Hook Pin
tianguangjiangary30-Aug-12 21:57
tianguangjiangary30-Aug-12 21:57 
QuestionHigher floating point precison in C++ Pin
afalco30-Aug-12 3:54
afalco30-Aug-12 3:54 
I wrote a numerical calculator engine in C++. It can do all the normal arithmetics, it has in-built and user defined variables and functions. The engine compiles with all the compilers I have: Visual Studio 2010 Ultimate and 2012 Ultimate RC, Embarcadero RAD Studio XE and gcc (both on linux and on Windows using mingw). But it does not give me the precision I would like to have.

Example:
Pi is defined in the program as:
3.1415926535897932384626433832795029L
When I convert it to string I got different results (the differences are in italics):

Visual Studio: 3.141592653589793 10000
Rad XE: 3.141592653589793238
gcc: 3.141592653589793238 512808959406186204433

I use long double as the data type, which for Visual Studio is the same as double that is 8 bytes long, for Rad XE it is 10 bytes (80 bits), while for gcc it is 12 bytes (where the last 2 is padding I think). The latter two compilers use the IEEE double sized numbers for long double which is 80 bits long. So the difference in accuracy is understandable.

But the calculator accessory in Windows gives
3.1415926535897932384626433832795
which is almost the same as the insanely large number of digits I entered. It misses the last 3 digits only. This means that
a) the calculator was not compiled with Microsoft compilers
b) or there is some trick which could be used to calculate with higher precision
c) or Microsoft was using some special high / arbitrary precision library

Can somebody help me to find either the tool or the method to achieve this high precision with the compilers I mentioned? Moreover I would like an open source solution, because I want to make the whole code to be open source.
AnswerRe: Higher floating point precison in C++ Pin
David Crow30-Aug-12 4:22
David Crow30-Aug-12 4:22 
GeneralRe: Higher floating point precison in C++ Pin
afalco30-Aug-12 20:59
afalco30-Aug-12 20:59 
GeneralRe: Higher floating point precison in C++ Pin
CPallini31-Aug-12 5:53
mveCPallini31-Aug-12 5:53 
GeneralRe: Higher floating point precison in C++ Pin
afalco2-Sep-12 21:32
afalco2-Sep-12 21:32 
QuestionHelp to find an excesive memory allocation in my application Pin
mklon2230-Aug-12 0:11
mklon2230-Aug-12 0:11 
AnswerRe: Help to find an excesive memory allocation in my application Pin
Alan Balkany30-Aug-12 7:47
Alan Balkany30-Aug-12 7:47 
AnswerRe: Help to find an excesive memory allocation in my application Pin
Rolf Kristensen30-Aug-12 7:55
Rolf Kristensen30-Aug-12 7:55 
AnswerRe: Help to find an excesive memory allocation in my application Pin
jschell30-Aug-12 8:35
jschell30-Aug-12 8:35 
QuestionMFC how to popup menu when i right click leaf node which is under the root node Pin
Member 934498629-Aug-12 23:24
Member 934498629-Aug-12 23:24 
AnswerRe: MFC how to popup menu when i right click leaf node which is under the root node Pin
Richard MacCutchan29-Aug-12 23:29
mveRichard MacCutchan29-Aug-12 23:29 
GeneralRe: MFC how to popup menu when i right click leaf node which is under the root node Pin
Member 934498630-Aug-12 22:12
Member 934498630-Aug-12 22:12 
QuestionHow to avoid message Queue on click event? Pin
Le@rner29-Aug-12 19:34
Le@rner29-Aug-12 19:34 
AnswerRe: How to avoid message Queue on click event? Pin
Jochen Arndt30-Aug-12 0:53
professionalJochen Arndt30-Aug-12 0:53 
GeneralRe: How to avoid message Queue on click event? Pin
Le@rner31-Aug-12 20:35
Le@rner31-Aug-12 20:35 
QuestionEnumFontFamiliesEx only returns one font -- SOLVED Pin
Alan Balkany29-Aug-12 8:49
Alan Balkany29-Aug-12 8:49 
AnswerRe: EnumFontFamiliesEx only returns one font -- SOLVED Pin
Alan Balkany29-Aug-12 8:53
Alan Balkany29-Aug-12 8:53 
Questionfunny with boost::tribool Pin
Robin Imrie29-Aug-12 6:44
professionalRobin Imrie29-Aug-12 6:44 

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.