fork(13) download
  1. #include <math.h>
  2. #include <stdio.h>
  3.  
  4. int main() {
  5. float x = 0.0f;
  6. float y = x * -1;
  7. float z = x * NAN;
  8. float a = x * INFINITY;
  9. float b = y * INFINITY;
  10. printf("%.08f\n", x);
  11. printf("%.08f\n", y);
  12. printf("%.08f\n", z);
  13. printf("%.08f\n", a);
  14. printf("%.08f\n", b);
  15. return 0;
  16. }
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
0.00000000
-0.00000000
nan
nan
-nan