# Problem to Calculate Approximate "Terms" for Pi

Page 1 of 1

## 1 Replies - 6842 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=1a84897bbc90dd9c59220b104b998e2c&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 KirbyMisa

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

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.

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }