to C guru.
i dont understand why this code fail
because of implicit declaration.
undefined reference to `__finite'
#define isfinite(x) \
(sizeof (x) == sizeof (float) \
? __finitef (x) \
: sizeof (x) == sizeof (double) \
? __finite (x) : __finitel (x))
for (class_num = 0; class_num < classifier->settings->class_num;
class_num++)
{
// maximum belief
double x =
classifier->belief[class_num] / ((double) classifier->sample_num);
argmax = isfinite (x) && (x > max) ? class_num : argmax;
max = isfinite (x) && (x > max) ? x : max;
// mean beliefs
classifier->mean_belief[class_num] +=
(classifier->belief[class_num] / ((double) classifier->sample_num) -
classifier->mean_belief[class_num]) /
((double) classifier->window_num);
}