Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cdss!culliton From: culliton@cdss.UUCP (Tom Culliton x2278) Newsgroups: comp.lang.c Subject: Re: Breadking 4 billion n Summary: Does The FAQ cover this issue (limits of char, short, int long, etc.) If not it should.... Keywords: int, 4 billion, C Message-ID: <12@cdss.UUCP> Date: 9 Aug 90 19:58:57 GMT References: <3271@stl.stc.co.uk> <4308@tahoe.unr.edu> Distribution: comp.lang.c Organization: ARINC Research Corp., Annapolis, MD, SRG Group Lines: 14 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.