stackoverflow.com/questions/6874357/why-0-1-0-2-0-3

assert(0.1 + 0.2 != 0.3); // shall be true

is my favorite check that a language uses native floating point arithmetic.

C++

include <cstdio>

int main() { printf("%d\n", (0.1 + 0.2 != ...


Comments (0)

Sign in to post comments.