Mail Archives: djgpp/1998/10/23/12:20:19
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
>
<code cut>
- Raw text -