Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <math.h>
  2. #include <stdio.h>
  3.  
  4. int main(int argc, char* argv[])
  5. {
  6.  
  7. double k, t;
  8.  
  9. for ( k=-20000.0; k<=20000.0; k += 100.0)
  10. {
  11. t = round(k+0.1);
  12. printf("%lf\n", t);
  13. }
  14. k = strtod("Inf", NULL);
  15. t = nan("");
  16. printf("isnan(%lf): %d\n", t, isnan(t));;
  17. printf("isinf(%lf): %d\n", k, isfinite(k));
  18. printf("isnormal: %d, %d\n", isnormal(k), isnormal(t));
  19.  
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement