pesos / pesos.github.io

A new design for a new PES Open Source
https://pesos.github.io/
MIT License
2 stars 22 forks source link

Add blog post "0.1 + 0.2 is not 0.3..." #48

Closed tfidfwastaken closed 3 years ago

tfidfwastaken commented 3 years ago

Closes #47

I realized that given the length and formatting of my blog post, it would be really tricky to review it, so I have provided a slightly easier to read version here. The images won't load on it though, because they are located within the repo, so unfortunately you'll have to view the images separately by accessing /assets/images/floats/ on the github source browser.

Please give feedback when you can, thanks!

Assigning @Gituser143 for review, and cc @anihm136

Gituser143 commented 3 years ago

@tfidfwastaken I absolutely love the post! No changes I could think of though. Maybe have it reviewed by another set of eyes? In case I missed some spelling mistake or something xD

tfidfwastaken commented 3 years ago

Yeah I already found a bunch of spelling mistakes, and fixed them in that new commit.

@siddhantrao23, can you be the other set of eyes?

anihm136 commented 3 years ago

This is super unique and very readable despite the length! Just for information, the video I mentioned had another interesting solution to the problem by representing a float as a pair of integers - one representing the magnitude and the other a power of 10 to multiply.

tfidfwastaken commented 3 years ago

@anihm136 Yeah, given the length at which the post was going I decided to leave details like those out in my "further reading" section. The first link also discusses the drawbacks and advantages for the integer trick you mentioned.

My main objective was to just signal attention to the fact that floating point is far more nuanced than we are often made to believe.

tfidfwastaken commented 3 years ago

Okay it looks like you all are okay with the merge

Thanks!