how can i check if a floating point value is a normal number and does not have any crude states (+-inf, ind, nan, qnan, denormal ...).
Checking for identity with it self seems to work for nan, but the other states?
Sorry - i forgot to mention that I am tied to an C90 Compiler ;(
You can use isnormal macro:
#include <math.h>
int isnormal(real-floating x);
There are also isfinite, isinf and isnan macros.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With