Breadking 4 billion n

Tom Culliton x2278 culliton at cdss.UUCP
Fri Aug 10 05:58:57 AEST 1990


Don't you hate new programmers, don't you wish someone would take them
aside and hand them a copy of the FAQ before turning them loose on the
net? Don't you wish you had never done anything this embarassing
yourself? (I know I have...)

The quick answer is that of course you can't go beyond 2^32 in an
integeral type on a 32 bit machine.  (Yes there are ways around it, but
not using the native types in C) Integer math in most programming
languages has finite limits.  (Just like a hand held calculator or a
slide rule) And the best thing that can be said about floating point or
"real" math is that its a matter of approximations within finite limits
of precision.  (again like a calculator or slide rule)  Plum's "Learning
to Program in C" (Plum Hall, 1983 ISBN 0-911537-00-7) has a decent
introduction to computer math.



More information about the Comp.lang.c mailing list