...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <assert.h>
#include <stdio.h>
#include <float.h>
#include <limits.h>
extern size_t popcount(uintmax_t);
#define PRECISION(umax_value) popcount(umax_value)
int main(void) {
assert(PRECISION(INT_MAX) <= DBL_MANT_DIG * log2(DBL_MANT_DIG));
int big = 1234567890;
double approx = big;
printf("%d\n", (big - (int)approx));
return 0;
}
|
...