0

If a variable has a specific value (directly assigned or received as an input with scanf), when I want to show its value with printf I see that it is not correctly represented (34.56 becomes 34.560001, etc). How could I work with quite precise numbers? Is there a "long long double" in C? Does "%LLf" exist? I specify that in my computer the double and the long double representation is the same, there is not a difference in precision.

  • https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html – Mitch Wheat Feb 06 '18 at 07:22
  • Possible duplicate of [Printf width specifier to maintain precision of floating-point value](https://stackoverflow.com/questions/16839658/printf-width-specifier-to-maintain-precision-of-floating-point-value) – Mitch Wheat Feb 06 '18 at 07:23
  • see [Fixed Point Arithmetic in C Programming](https://stackoverflow.com/questions/10067510/fixed-point-arithmetic-in-c-programming) – sgDysregulation Feb 06 '18 at 07:36

0 Answers0