ZABBIX BUGS AND ISSUES

wrong comparison of floating point numbers in trigger function count()

Details

  • Zabbix ID:
    Reviewed 2.0

Description

When we evaluate the "eq" operator for function count(), we consider two values equal if they are within 10^-5 of each other.

When we evaluate the "ge" operator, we consider value A greater than or equal to another value B if "A >= B". Clearly, this is wrong, because if A is smaller than B, but within 10^-5, "ge" comparison should yield "true".

Activity

Hide
Aleksandrs Saveljevs added a comment -

Also, while fixing this issue, it would be nice to resolve the following inconsistency: trigger expressions are evaluated using an epsilon of 10^-6, but trigger function count() uses an epsilon of 10^-5. The latter is especially surprising, because all floating values are stored in the database using 4 digits after the decimal point.

Show
Aleksandrs Saveljevs added a comment - Also, while fixing this issue, it would be nice to resolve the following inconsistency: trigger expressions are evaluated using an epsilon of 10^-6, but trigger function count() uses an epsilon of 10^-5. The latter is especially surprising, because all floating values are stored in the database using 4 digits after the decimal point.
Hide
Aleksandrs Saveljevs added a comment -

Available in development branch svn://svn.zabbix.com/branches/dev/ZBX-4027 .

Show
Aleksandrs Saveljevs added a comment - Available in development branch svn://svn.zabbix.com/branches/dev/ZBX-4027 .
Hide
Aleksandrs Saveljevs added a comment -

Available in pre-1.8.9 in r23119 and in pre-1.9.8 in r23121.

Show
Aleksandrs Saveljevs added a comment - Available in pre-1.8.9 in r23119 and in pre-1.9.8 in r23121.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: