# Problem to Calculate Approximate "Terms" for Pi

Page 1 of 1

## 1 Replies - 4389 Views - Last Post: 23 August 2012 - 01:48 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=288673&amp;s=f09240664faceda22e6564e532bc5bb3&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 KirbyMisa

• New D.I.C Head

Reputation: 0
• Posts: 1
• Joined: 12-August 12

# Problem to Calculate Approximate "Terms" for Pi

Posted 12 August 2012 - 09:36 AM

I am trying to write a small program which calculates approximate "Term" for the Pi. For example, I want to find the term of 3.14 or 3.141, how many terms it would be? I got most of the code but can't figure out how to find exact value. Here is the code. Any help will be appreciated. Thanks

```Dim counter As Integer

position = 0
total = 1

While counter is odd
If term = 4 / position then
Total = total + term
Else
Total = Total - Term
Wend
End Sub
```

This post has been edited by Atli: 12 August 2012 - 10:52 AM
Reason for edit:: Fixed the [code] tags.

Is This A Good Question/Topic? 0

## Replies To: Problem to Calculate Approximate "Terms" for Pi

### #2 Aprone

• New D.I.C Head

Reputation: 2
• Posts: 11
• Joined: 07-May 12

## Re: Problem to Calculate Approximate "Terms" for Pi

Posted 23 August 2012 - 01:48 AM

Kirby, what do you mean by "Term"? In math, the meaning to the word "term", as I understand it, doesn't make much sense here. If you could give a little more of an explanation then it would help us help you I think.