Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lorenzleutgeb/absorption
- Owner: lorenzleutgeb
- Created: 2013-02-09T17:23:01.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T08:58:05.000Z (over 5 years ago)
- Last Synced: 2024-10-13T02:08:49.844Z (2 months ago)
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.