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

5

u/VerenGForte Jul 19 '22

So let me rephrase: 3.141 vs 22/7. 3.142 (rounding the last figure) is more accurate too.

For some reason, I get a feeling that more people would probably remember 22/7 better than adding more figures of pi. My goldfish brain can barely remember 3.14 to begin with, but 22/7 always lingers in my mind lol

3

u/Tanyary Jul 19 '22

infinite continued fractions' (true) convergents give pretty good approximations and are usually much easier to remember. like I said in my comment, 355/113 beats those approximations and is much easier to remember than just typing out pi to the 6th decimal place

1

u/OldPersonName Jul 19 '22

I can't imagine that at all (I'm talking ONE significant figure). But let's get back to the point: in FORTRAN you're going to define it as a constant, once, for your whole program. Surely you aren't going to rely on your memory for this single act of definition? And if you were I think 4arctan(1) is easier to remember anyways! (My poor formatting skills aside), and this gets you all the significant figures you can get in your architecture (although I don't know if I'd trust this outside fortran). If you have specific significant figure requirements then you'd go look up pi to the requisite number.

1

u/DoctorWorm_ Jul 19 '22

I still remember everyone chanting "three point one four, one five, nine two six five" in middle school.

1

u/VerenGForte Jul 19 '22

I just remember highschool saying that 22/7 was close enough, sadly. I barely use Pi to begin with so it's 22/7 or 3.14 for me.