### Author Topic: Fibonacci numbers: the nature's numbers...  (Read 286 times)

#### felipe

• Member
• Posts: 867
• Eagles are just great!
##### Re: Fibonacci numbers: the nature's numbers...
« Reply #15 on: July 22, 2018, 08:42:58 AM »
Nice siekmanski  . But i find the name of the instruction a little misleading since what it supposed to do is:

Quote
Temporary = Source + Destination;
Source = Destination;
Destination = Temporary;

So maybe a good name for the instruction will be: "add and exchange".

If we exchange and then we add we have eax=1 forever...

Code: [Select]
`temporary=destination;destination=source;source=temporary;destination=source+destination;`
Should we report this to intel?

What do you think?
Felipe.

#### Siekmanski

• Member
• Posts: 1553
##### Re: Fibonacci numbers: the nature's numbers...
« Reply #16 on: July 22, 2018, 07:59:32 PM »
I think, the operation goes like this:

Temp = Source
Source = Destination    ; Exchange
Destination = Destination + Temp ; Add

Creative coders use backward thinking techniques as their strategy.

#### daydreamer

• Member
• Posts: 471
##### Re: Fibonacci numbers: the nature's numbers...
« Reply #17 on: Today at 05:14:54 AM »
This fibonnaci numbers, task seems to be used often in programming classes,so this thread would be a gem for students felipe
Curious why you got the idea to start program fibonnaci?, earlier experience from school,or just randomly picked project?
Wonder if it's possible to use two or more calculations, first calculate starts from the very beginning in one part of xmm register second one in second part of xmm reg starts with big fibonnaci number about in the middle of 32bit integer range?

Quote from Flashdance
Nick  :  When you give up your dream, you die.
*wears a flameproof asbestos suit*