I get this output: 19 const via cout: 0.6931471805599453094 non-const via cout: 0.6931471805599453094 const via printf: 0.6931471805599453094 non-const via printf: 0.6931471805599453094 But i'm using long double literals instead of double literals: const long double constLog2 = 0.6931471805599453094172321214581765680755L; long double log2 = 0.6931471805599453094172321214581765680755L.
Yep, that's it! Thanks for the help. – Alex Reynolds Mar 26 '09 at 1:05.
There are some subtle issues relating to hardware platforms and compile options that might be of interest: network-theory.co.uk/docs/gccintro/gccin... 3.17.3 Intel 386 and AMD x86-64 Options (gcc-4.0.1) These `-m' options are defined for the i386 and x86-64 family of computers: -m96bit-long-double -m128bit-long-double These switches control the size of long double type. The i386 application binary interface specifies the size to be 96 bits, so -m96bit-long-double is the default in 32 bit mode. Modern architectures (Pentium and newer) would prefer long double to be aligned to an 8 or 16 byte boundary.In arrays or structures conforming to the ABI, this would not be possible.
So specifying a -m128bit-long-double will align long double to a 16 byte boundary by padding the long double with an additional 32 bit zero. In the x86-64 compiler, -m128bit-long-double is the default choice as its ABI specifies that long double is to be aligned on 16 byte boundary. Notice that neither of these options enable any extra precision over the x87 standard of 80 bits for a long double.
Warning: if you override the default value for your target ABI, the structures and arrays containing long double variables will change their size as well as function calling convention for function taking long double will be modified. Hence they will not be binary compatible with arrays or structures in code compiled without that switch.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.