After the some calculations with float values, instead of showing something like: 123.4567890, wierd characters of: 1.#IND00000 were displayed......
What are the possible causes for this to happen? And what does it mean by 1.#IND00000???
_____
After the some calculations with float values, instead of showing something like: 123.4567890, wierd characters of: 1.#IND00000 were displayed......
What are the possible causes for this to happen? And what does it mean by 1.#IND00000???
_____
What are the calculations you're doing? And did you actually try doing a simple google search? Because I did one and found this link:
http://www.kbalertz.com/kb_156919.aspx
If you understand what you're doing, you're not learning anything.
#INF - infinity (mostly because things have gotten really big)
#IND - indefinite (mostly because things have gotten really small)
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Yes that is it! It happened when I divide a value by zero. My question is: How to use if statement as a condition for #IND values?
i.e:
if (value != Indefinedvalues)
if the value is not a zero I can just:
if (value != 0)...
But how to do it for indefined values?
if (value != #IND) ?
How?
_____
There may be something in either math.h or float.h (can't remember)
Something along the lines of isInf(), isNan() etc.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
int isfinite(fpval)
int isinf(fpval)
int isnan(fpval)
int isnormal(fpval)
are all defined in <math.h>
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.