8
88888 Dihedral
Jens Thoms Toerringæ–¼ 2011å¹´12月30日星期五UTC+8上åˆ3時38分38秒寫é“:
A float can fit in 32 bits. The lifting of two floats into doubles of 64 or
80 bits either does not increase the precisions of the two sources at all
in any math operations but can save the result better than a float.
Well, there are sume subtle differences between C and C++
and when you write C++ (i.e. use a C++ compiler, your program
won't compile with a C compiler) then it's typically better
to ask in the correct group - it may safe you a lot of time
and grieve. And sometimes there are also more elegant so-
lutions to a problem in C++.
All calculations are done in double anyway (even if you
use floats - and on quite a number of architectures even
with an even wider representation than double, i.e. on
x86 you often have 64 bit doubles but computation are all
done with 80 bit) and if you assign to a float the value
will be converted to a float without any cast.
A float can fit in 32 bits. The lifting of two floats into doubles of 64 or
80 bits either does not increase the precisions of the two sources at all
in any math operations but can save the result better than a float.