fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <pmmintrin.h>
  4. #include <string.h>
  5.  
  6. int main()
  7. {
  8. long long i;
  9. scanf("%lld", &i);
  10. double f;
  11. memcpy(&f, &i, sizeof i);
  12.  
  13. _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
  14. _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
  15. printf("%a %a\n", f, sqrt(f));
  16.  
  17. _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_OFF);
  18. _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_OFF);
  19. printf("%a %a\n", f, sqrt(f));
  20. }
  21.  
Success #stdin #stdout 0s 5464KB
stdin
12
stdout
0x0.000000000000cp-1022 0x0p+0
0x0.000000000000cp-1022 0x0p+0