On 22/06/2005 09:29, Richard Bos wrote:
"go***********@ gmail.com" <go***********@ gmail.com> wrote:
I wonder what is the smallest positive double numbers in C in 32 bit
CPU?
I wonder... Actually a CPU could have no FPU at all, which happened on 8086,
80286 and 80386 at least, and probably on 68000. Second, it's perfectly
possible that a C compiler don't use the FPU, if there is one, and sometimes
it depends on how you run the compiler. So there are two different
questions: how does your C compiler handle double numbers, and how does your
CPU, if that makes sense. The first was already answered, the second is in
your CPU's manual. If you have not that manual, it's probably on the web:
there are PDF files for Pentium, PowerPC, 68000, Alpha and Sparc, at least.
You question is also tricky for another reason: usually a C compiler handles
float and double numbers, but the Pentium processor can work with extended
precision (that can be set by an asm instruction, maybe no accessible from
C, and certainly not in C standard). If you work with usual 64 bits IEEE754
doubles on a pentium, you may have different results in your computations
depending on which precision is used internally. There is the same kind of
problem on machines with fused-multiply-add (fma). So be aware that you
question is not only related to your compiler, it's also related to your
CPU. Both are off-topic anyway.