diff options
Diffstat (limited to 'web/api/queries')
-rw-r--r-- | web/api/queries/des/des.c | 4 | ||||
-rw-r--r-- | web/api/queries/median/median.c | 4 | ||||
-rw-r--r-- | web/api/queries/ses/ses.c | 4 | ||||
-rw-r--r-- | web/api/queries/stddev/stddev.c | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/web/api/queries/des/des.c b/web/api/queries/des/des.c index 93d7247235..c6236f31ac 100644 --- a/web/api/queries/des/des.c +++ b/web/api/queries/des/des.c @@ -99,7 +99,7 @@ void grouping_free_des(RRDR *r) { void grouping_add_des(RRDR *r, calculated_number value) { struct grouping_des *g = (struct grouping_des *)r->internal.grouping_data; - if(isnormal(value)) { + if(calculated_number_isnumber(value)) { if(likely(g->count > 0)) { // we have at least a number so far @@ -128,7 +128,7 @@ void grouping_add_des(RRDR *r, calculated_number value) { calculated_number grouping_flush_des(RRDR *r, RRDR_VALUE_FLAGS *rrdr_value_options_ptr) { struct grouping_des *g = (struct grouping_des *)r->internal.grouping_data; - if(unlikely(!g->count || !isnormal(g->level))) { + if(unlikely(!g->count || !calculated_number_isnumber(g->level))) { *rrdr_value_options_ptr |= RRDR_VALUE_EMPTY; return 0.0; } diff --git a/web/api/queries/median/median.c b/web/api/queries/median/median.c index 5a13b2e4da..31916c546b 100644 --- a/web/api/queries/median/median.c +++ b/web/api/queries/median/median.c @@ -42,7 +42,7 @@ void grouping_add_median(RRDR *r, calculated_number value) { error("INTERNAL ERROR: median buffer overflow on chart '%s' - next_pos = %zu, series_size = %zu, r->group = %ld.", r->st->name, g->next_pos, g->series_size, r->group); } else { - if(isnormal(value)) + if(calculated_number_isnumber(value)) g->series[g->next_pos++] = (LONG_DOUBLE)value; } } @@ -64,7 +64,7 @@ calculated_number grouping_flush_median(RRDR *r, RRDR_VALUE_FLAGS *rrdr_value_op else value = (calculated_number)g->series[0]; - if(!isnormal(value)) { + if(!calculated_number_isnumber(value)) { value = 0.0; *rrdr_value_options_ptr |= RRDR_VALUE_EMPTY; } diff --git a/web/api/queries/ses/ses.c b/web/api/queries/ses/ses.c index 6ea40dfba0..772505f93b 100644 --- a/web/api/queries/ses/ses.c +++ b/web/api/queries/ses/ses.c @@ -71,7 +71,7 @@ void grouping_free_ses(RRDR *r) { void grouping_add_ses(RRDR *r, calculated_number value) { struct grouping_ses *g = (struct grouping_ses *)r->internal.grouping_data; - if(isnormal(value)) { + if(calculated_number_isnumber(value)) { if(unlikely(!g->count)) g->level = value; @@ -83,7 +83,7 @@ void grouping_add_ses(RRDR *r, calculated_number value) { calculated_number grouping_flush_ses(RRDR *r, RRDR_VALUE_FLAGS *rrdr_value_options_ptr) { struct grouping_ses *g = (struct grouping_ses *)r->internal.grouping_data; - if(unlikely(!g->count || !isnormal(g->level))) { + if(unlikely(!g->count || !calculated_number_isnumber(g->level))) { *rrdr_value_options_ptr |= RRDR_VALUE_EMPTY; return 0.0; } diff --git a/web/api/queries/stddev/stddev.c b/web/api/queries/stddev/stddev.c index 3858003d9f..ad0efc838e 100644 --- a/web/api/queries/stddev/stddev.c +++ b/web/api/queries/stddev/stddev.c @@ -36,7 +36,7 @@ void grouping_free_stddev(RRDR *r) { void grouping_add_stddev(RRDR *r, calculated_number value) { struct grouping_stddev *g = (struct grouping_stddev *)r->internal.grouping_data; - if(isnormal(value)) { + if(calculated_number_isnumber(value)) { g->count++; // See Knuth TAOCP vol 2, 3rd edition, page 232 @@ -74,7 +74,7 @@ calculated_number grouping_flush_stddev(RRDR *r, RRDR_VALUE_FLAGS *rrdr_value_op if(likely(g->count > 1)) { value = stddev(g); - if(!isnormal(value)) { + if(!calculated_number_isnumber(value)) { value = 0.0; *rrdr_value_options_ptr |= RRDR_VALUE_EMPTY; } @@ -102,7 +102,7 @@ calculated_number grouping_flush_coefficient_of_variation(RRDR *r, RRDR_VALUE_FL calculated_number m = mean(g); value = 100.0 * stddev(g) / ((m < 0)? -m : m); - if(unlikely(!isnormal(value))) { + if(unlikely(!calculated_number_isnumber(value))) { value = 0.0; *rrdr_value_options_ptr |= RRDR_VALUE_EMPTY; } |