fork(4) download
  1. #include <stdio.h>
  2. #include <float.h>
  3.  
  4. int main(void) {
  5. float x=1.0;
  6. float epsilon=1.0;
  7.  
  8. while(x+(float)(epsilon*0.5)!=x) {
  9. epsilon*=0.5;
  10. }
  11. printf("%g\n", epsilon);
  12. printf("%g\n", FLT_EPSILON);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
1.19209e-07
1.19209e-07