floaterr.c 190 B

123456789101112
  1. /* floaterr.c--demonstrates round-off error */
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5. float a,b;
  6. b = 2.0e20 + 1.0;
  7. a = b - 2.0e20;
  8. printf("%f \n", a);
  9. return 0;
  10. }