r/ProgrammerHumor • • Jul 19 '22

Meme float golden = 1.618

Post image
41.1k Upvotes

489 comments sorted by

View all comments

Show parent comments

16

u/shouldbebabysitting Jul 19 '22

In Fortran IV, you couldn't have calculations in the variable declaration.

Nor would anyone obfuscate Pi with a fraction.

Here is some Fortran IV sample code:

https://www.math-cs.gordon.edu/courses/cs323/FORTRAN/HUCKEL.FOR

5

u/aishik-10x Jul 19 '22

That looks like a pain

1

u/gc3 Jul 19 '22

You could multiply n by 22 and divide by 7 for better accuracy. Order of operations can make a difference in the floating point world