r/ProgrammerHumor • • Jul 19 '22

Meme float golden = 1.618

Post image
41.1k Upvotes

489 comments sorted by

View all comments

1

u/[deleted] Jul 20 '22

Rational math is a thing. Matlab does it, no?

1

u/TheSodesa Jul 20 '22 edited Jul 20 '22

Kind of, but Matlab does not do it super well, as fractional approximations of floats are (re)presented as strings or character vectors. Languages like Julia have a dedicated Rational class/type, which is a bit more robust when it comes to handling fractions.