![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
1. I want to perform an operation, say division, on a number that is a constant. 2. I want to take the result and add it to another number that is also a constant. 3. Then I want to add to or subtract from (by, for example, 0.01) the number in step 1 and add this result to the result in step 2. 4. I want to repeat this operation a number of times that is determined by the difference between two numbers, one a constant and the other a variable, divided by the number in step three (in this case, 0.01). So if the two numbers were 100 and 90, the process would be repeated 10/0.01 or 100 times. Here's an example: Start with: 1/t = x x + C = C2 t = 100 C = 95 1. 1/100 = 0.01 2. 0.01 + 95 = 95.01 3. 1/100 + 0.01 = 1/100.01 4. 1/100.01 = 0.01 5. 0.01 + 95.01 = 95.02 6. Repeat until t = 101 7. Result should be 98.31 Is it possible to do this kind of calculation with Filemaker. If so, how? Thanks. |
#3
| |||
| |||
|
|
Set Field [ x ; 1 / T ] Loop Set Field [ c2 ; c + x ] Set Field [ t ; t + x ] Exit Loop If [ T = 101 ] End Loop |
#4
| |||
| |||
|
|
1. I want to perform an operation, say division, on a number that is a constant. 2. I want to take the result and add it to another number that is also a constant. 3. Then I want to add to or subtract from (by, for example, 0.01) the number in step 1 and add this result to the result in step 2. 4. I want to repeat this operation a number of times that is determined by the difference between two numbers, one a constant and the other a variable, divided by the number in step three (in this case, 0.01). So if the two numbers were 100 and 90, the process would be repeated 10/0.01 or 100 times. Here's an example: Start with: 1/t = x x + C = C2 t = 100 C = 95 1. 1/100 = 0.01 2. 0.01 + 95 = 95.01 3. 1/100 + 0.01 = 1/100.01 4. 1/100.01 = 0.01 5. 0.01 + 95.01 = 95.02 6. Repeat until t = 101 7. Result should be 98.31 Is it possible to do this kind of calculation with Filemaker. If so, how? |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Thanks for the help! Sorry about the errors. There should be parentheses: 1/(100 + 0.01); the numbers are rounded to nearest 100th; 90 should be 101. And there's a missing, irrelevant, step. Without this step, the answer should be 95.99 (rounded), not 98.31. |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
C = 95 (not 101) t = 100 101 is T (not C; it's the final value of t after adding 100 * 0.01 in this example) Each time I add (or subtract) 0.01 from t, I want to add a value equal to the new value of 1/t to C. So if we start at C = 95, adding the appropriate amount for each iteration of 1/t to C, we should end up with 95.99 after 100 iterations. In the example, although 1 is added to t (100), only 0.99 (rounded) is added to C (95). |
![]() |
| Thread Tools | |
| Display Modes | |
| |