fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. float a=1;
  6. while (1.0f!=1.0f+a)
  7. a*=0.9f;
  8. printf("float %.2e\n",a);
  9. double b=1;
  10. while (1.0!=1.0+b)
  11. b*=0.9;
  12. printf("double %.2e\n",b);
  13. long double c=1;
  14. while (1.0L!=1.0L+c)
  15. c*=0.9L;
  16. printf("long double %.2e\n",(double)c);
  17.  
  18.  
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 4492KB
stdin
Standard input is empty
stdout
float 5.89e-08
double 1.07e-16
long double 4.90e-20