Explore >> Select a destination


You are here

blog.m-ou.se
| | clemenswinter.com
12.2 parsecs away

Travel
| | I recently implemented a small program to visualize the inner workings of a scheme that compresses floating point timeseries by XORing subsequent values. The resulting visualizations are quite neat and made it much easier for me to understand this beautiful algorithm than any of the explanations that I had previously encountered. Hacker News (280 points,...
| | orlp.net
10.6 parsecs away

Travel
| |
| | www.yosoygames.com.ar
17.8 parsecs away

Travel
| |
| | sintraworks.github.io
74.3 parsecs away

Travel
| Sometimes, using floating point arithmetic (e.g using float or double types) just doesn't cut it. Floating point values cannot represent all values accurately, and if you start adding/subtracting/multiplying/dividing such values it is very likely the inacurracies quickly exacerbate into an unworkable mess. Depending on the domain you're working on, different solutions can be appropriate. E.g, if you're working with currency, you might need a type representing decimal numbers, or, if you're working with musical timelines or scores, especially where tuplets (e.g. triplets) come into the mix, a type accurately representing any fraction may be called for. Here we will look into the latter: a type where each instance represents a fraction. We want to be able to perform basic arthmetic calculations on those numbers.