I just ran into a fun little thing I thought I ought to share with
people.

I am writing a program for calculating the standardised mortality rates
from various diseases, when I noticed that an unsigned int as well as
an unsigned long on 32-bit x86 architectures is simply not big enough.

On x86_32, both are 4 octets wide, while on x86_64, only int is 4
octets wide. That means they can store values up to 2**32-1 which is
about 4.3 billion which is NOT ENOUGH if you want to calculate
world-wide statistics!

And there I was, foolishly believing that unsigned int so BIG, that I
will never in my life really have to worry about its size. Oh, what a
fool I was.

-- 
   Fourth law of programming:
   Anything that can go wrong wi
sendmail: segmentation violation - core dumped
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to