fork(2) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. double d1 = 1. * 0.;
  5. double d2 = (-1.) * 0;
  6.  
  7. printf("d1: %f\n", d1);
  8. printf("d2: %f\n", d2);
  9.  
  10. printf("(d1 == d2): %s\n", (d1 == d2)?"true":"false");
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 4324KB
stdin
Standard input is empty
stdout
d1: 0.000000
d2: -0.000000
(d1 == d2): true