From: M Joshua Ryan Newsgroups: comp.os.msdos.djgpp Subject: Re: Pi Date: Fri, 23 Oct 1998 12:04:02 -0500 Organization: University of Missouri - St. Louis Lines: 36 Message-ID: References: <70mqm1$st1$1 AT otis DOT netspace DOT net DOT au> NNTP-Posting-Host: admiral.umsl.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <70mqm1$st1$1@otis.netspace.net.au> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Actually the word you mean is precision. This refers to the exactness of a number, generally, how many decimal places are displayed. Accuracy refers to the correctness of a number. If your program gives 12 as a result for PI, it is hopelessly inaccurate. In any case, as far as calculating PI in a test program, why not approximate it by selecting random numbers in a square and determining the proportion of them that lie in an arc of the radius of your square width. You could actually have an accuracy input to specify how many random numbers to generate for the calculation. I'm a stickler for grammar rules. ---------------------------------- | M Joshua Ryan | | ------------- | | Who am I, and why do you care? | ---------------------------------- On Thu, 22 Oct 1998, Mark Tsui wrote: > This is a program I tried to write for pi. > > for some reason, the program seem to display very poor accuracy. about 5-6 > decimal points. > > also, is there a way to clear the screen instead of \n? > > and I cannot make breakpoints in my program. I suspect that it is not > compiled with the -g switch, but I made sure that it is, and I still can't > get the break points to work > > any help will be appreciated. Thanks >