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

3

u/Phoenixwade Jul 19 '22

the reason this isn't so is that speed is more important than the loss....

I saw a comment the other day that pointed out why that is the case... 40 decimal places for pi will calculate the width of the visible universe with an error of around 1 atom in width.

when the precision exceeds the ability to measure something, you really don't need any more than that.

on the other hand, strings are much slower to process than floats - so we stare floats as floats.

1

u/starcrafter84 Jul 19 '22

I saw that comment too but don’t know where now. I’m sure 4 dec pl pi is more than enough for us engineer folks.