View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
SteveDB1 SteveDB1 is offline
external usenet poster
 
Posts: 414
Default fibbonacci series, with time function

Hi Dana,
I thought about double, but decided on long instead. I'll try that-- thanks.

You're not understanding is partly my problem, as I'm not real sure on how
to describe it. I was trying to minimize my verbosity.

As stated, I want to do some population growth analysis.
For human population, a physically mature human can start having children
anywhere from 9 to 16 years of age.
I figured that 13 years would be a reasonable starting point.
So, if a two people get together and start having children, the maximum they
can have is approximately every nine months (and no, I wasn't going to count
twins, triplets, etc.... ).
Their offspring cannot start having children until age 13, and they can max
out at every nine months.
The offspring of the second generation would start at 13, and be a maximum
of every nine months..
Etcetera.......
I know that I'll need a max age for having children-- a cut off point.
I know that with the Fibbonacci series, it starts with 1, 1, which makes
two. The child born from the two make for 3.
It quickly grows in a seemingly exponential growth function. I've read that
an exponential growth function with a "Phi" function as a "divine" ratio is
used at a certain point due to the rapidity of growth, and complexity.
My over all goal is to find out how long it'd take to grow the population to
6 billion-- not counting natural disasters, wars, etc.... that would be used
to "thin" the population base.
If I understand it correctly, I think I'd need an array, but am sufficiently
unclear as to not be sure. It almost seems that I'd need an inifinitely (one
for each increasing member of the birth pool) nested do, or while loop.

If this still doesn't make sense, please let me know.
Thanks again for your initial response.
SteveB



"Dana DeLouis" wrote:


no problems....until I reach 1.84 billion.


Hi. If you change your Dim statements to Double, you will be able to
calculate a Fibbonacci number a little greater than 46.

I'm afraid I don't understand your question about Offset.

- - -
Dana DeLouis



SteveDB1 wrote:
Howdie all.
I've used some C# code to create my own fibbnoacci series macro.
-----------------------------------------------------------
Sub fibbonacci()
Dim i As Long
Dim j As Long
Dim N As Long
Dim fib As Long

i = -1
j = 1

While (fib <= 6000000000#)
fib = i + j
i = j
j = fib

Wend
MsgBox "The Fibbonacci # for this series is: " & fib

End Sub
-------------------------------------------------------------------
It works good, with no problems. Well, at least until I reach 1.84 billion.

What I want to do is to add a "time" function with a 9 month limiter. I.e.,
each iteration has an output with each 9 months of time, and a 13 to 17 year
start point for each subsequent iteration set.
E.g.,
the fibbonacci numbers are
1, 1, 2, 3, 5, 8, 13, 21,.......
So, my first set where 1 and 1 become 2, is at time = 9 months.
my next set where 2 becomes 3 is at least 9 months, and each subsequent 9
months ++
I then want to do an offshoot from that, essentially starting over with each
13 to 17 years.

My overall goal is a population growth analysis for personal purposes. Back
when I was taking my math classes, one of my professors told me that the
fibbonacci series was developed to analyze rabbit population growth.

I realize that this might be over the top of what is done here, but I wanted
to at least ask. So, if it is, please let me know.
Thank you for your helps.
Best,
SteveB.