fork download
  1. #include <stdio.h>
  2. #include <fenv.h>
  3. #pragma STDC FENV_ACCESS ON
  4.  
  5. int main(void) {
  6. int i;
  7. for(i=3; i>0; i -= 0.5 )
  8. printf("%d\n", i);
  9. // store the original rounding mode
  10. const int originalRounding = fegetround( );
  11. // establish the desired rounding mode
  12. fesetround(FE_TOWARDZERO);
  13. // do whatever you need to do ...
  14. for(i=3; i>0; i -= 0.5 )
  15. printf("%d\n", i);
  16.  
  17. // ... and restore the original mode afterwards
  18. fesetround(originalRounding);
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
cc1: warnings being treated as errors
prog.c:3: error: ignoring #pragma STDC FENV_ACCESS
stdout
Standard output is empty