# Floating point #'s, why so much talk about it?

This is a discussion on Floating point #'s, why so much talk about it? within the C Programming forums, part of the General Programming Boards category; I dont get why floating points are such a big deal in C, as I am reading my C book ...

1. ## Floating point #'s, why so much talk about it?

I dont get why floating points are such a big deal in C, as I am reading my C book and it seems like they put a lot of emphasis on floating point. But all that I get is that floating point #'s are basically decimal #'s. What more is to say about it?

2. On many computers that use IEEE floating point standards, floats and doubles are inaccurate. Many floats cannot be represented accurately, and compring two floats (or double) for equality may fail when logic says they should be the same. Higher-level mathametical problems will have more use for floats/doubles than you find in most "normal" applicaton programs.

3. Basically, the point is, don't think "floating point number." Think "floating point approximation."

4. Thanks, I am reading a nice wikipedia article on floating point right now. Quick question why does it not print "10.2" but "10.200000"

Code:
```#include <stdio.h>

int main(void)
{
float value = 10.2;
printf("The number is %f\n", value);
return 0;
}```

5. >Quick question why does it not print "10.2" but "10.200000"
http://dev.unicals.com/c89-draft.html#4.9.6.1
f The double argument is converted to decimal notation in the style [-]ddd.ddd , where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal-point character appears, at least one digit appears before it. The value is rounded to the appropriate number of digits.

6. thanks mate