Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lorenzleutgeb/absorption

Solution to a challenge on the absorption effect in floats
https://github.com/lorenzleutgeb/absorption

Last synced: about 1 month ago
JSON representation

Solution to a challenge on the absorption effect in floats

Awesome Lists containing this project

README

        

This is [@WanzenBug](https://github.com/WanzenBug) and mine solution to a small challenge in school. The task was to add 0.0001 to 10000.0 (both `float`) repeated 10M times without arithmetic error. As demonstrated by `trivial.c`, an ordinary loop will fail because of the absorption effect.

We wrote the fastest program, using a minimum heap and running in just under 3 seconds on my laptop, whereas it can take weeks if you get it wrong.