Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why don't you code in assembly?

Name: Anonymous 2012-12-30 1:55

 

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-12-31 6:52

>>30
This is O(1):

 fld PHI
 fild d[esp+4]
 call pow
 fld PHI2
 fild d[esp+4]
 call pow
 fsub
 fld SQRT5
 fdiv
 fistp d[esp+4]
 mov eax, [esp+4]
 ret


(Implementation of pow and definition of the constants left as an exercise for the reader.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List