All Questions
Tagged with floating-point c
4 questions
3
votes
1
answer
2k
views
Should "NaN" default to SNaN or QNaN
I created a function to read floats (IEEE 754 binary 32-bit) from strings, for developers. I have everything finished and working perfectly, except i'm wondering if a user/or programmer enters a ...
0
votes
1
answer
767
views
floating-point number stored in float variable has other value [duplicate]
I'm reading a book about C programming By "King.K.N" and I'm reading the following statement:
If we store 0.1 in a float variable, we may later find that the variable has a value such as 0....
34
votes
2
answers
89k
views
Can anyone explain representation of float in memory?
Can anyone help me in understanding how float values are stored in the memory.
My doubt is here float values contain '.' (for example 3.45) how the '.' will be represented in the memory?
Can anyone ...
231
votes
8
answers
300k
views
When do you use float and when do you use double
Frequently, in my programming experience, I need to make a decision whether I should use float or double for my real numbers. Sometimes I go for float, sometimes I go for double, but really this feels ...