|
You are here |
blog.m-ou.se | ||
| | | | |
probablydance.com
|
|
| | | | | Here is a rough approximation of float multiplication (source): float rough_float_multiply(float a, float b) { constexpr uint32_t bias = 0x3f76d000; return bit_cast(bit_cast(a) + bit_cast(b) - bias); } We're casting the floats to ints, adding them, adjusting the exponent, and returning as float. If you think about it for a second you will realize that since... | |
| | | | |
clemenswinter.com
|
|
| | | | | 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,... | |
| | | | |
gregat.es
|
|
| | | | | ||
| | | | |
www.ralfj.de
|
|
| | | This is a cross-post of an article that I wrote for the SIGPLAN blog. "Undefined Behavior" often has a bad reputation. People see it as an excuse compiler writers use to break code, or an ... | ||