|
|
|
|
|
by acqq
2650 days ago
|
|
For the probably simplest solution to the given problem if summing doubles there is a hardware in every x86 CPU which allows the biggest number during the computation to be 1.18e4932 (using 80 bits internally, 15 from that for the exponent, vs. only 11 in the 64-bit double). By just activating it the sum can be done very fast, and no need for any modification: first sum, then divide, convert to double at the end. You should not use SSE for that however, but the old x87 "FPU" instructions. |
|