Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <stdio.h>
- int main(int argc, char* argv[])
- {
- double k, t;
- for ( k=-20000.0; k<=20000.0; k += 100.0)
- {
- t = round(k+0.1);
- printf("%lf\n", t);
- }
- k = strtod("Inf", NULL);
- t = nan("");
- printf("isnan(%lf): %d\n", t, isnan(t));;
- printf("isinf(%lf): %d\n", k, isfinite(k));
- printf("isnormal: %d, %d\n", isnormal(k), isnormal(t));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement