Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   C (https://www.askmehelpdesk.com/forumdisplay.php?f=438)
-   -   Precision in c (https://www.askmehelpdesk.com/showthread.php?t=215320)

  • May 12, 2008, 07:09 PM
    jaspreet2142
    precision in c
    I have a precision problem in c
    this can be understand better by an example
    I declare a variable in float
    then I stored in it 0.10101
    but when I printed it it shows 0.10095
    how can I remove this problem because I can't lose any digit, precision is very imp for my program
  • Jun 9, 2008, 08:54 PM
    Jhon m
    Use double instead of float. To extend a precision use long double.

  • All times are GMT -7. The time now is 10:40 PM.