[ZBX-8014] insufficient precision when evaluating calculated item and trigger expressions Created: 2014 Apr 01 Updated: 2017 May 30 Resolved: 2014 Apr 01 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 1.8.20, 2.0.11, 2.2.2 |
Fix Version/s: | 2.3.0 |
Type: | Incident report | Priority: | Major |
Reporter: | Aleksandrs Saveljevs | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | calculateditems, expressions, precision, triggers | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
The following expression is evaluated incorrectly, yielding "false": 9*(1/9)=1. The reason it happens is due to expression rewriting in function evaluate(). There 1/9 is evaluated first and the result is inserted into the original expression with 6 digits after the decimal point: 9*0.111111=1. This is further evaluated as 0.999999=1, which is false. |
Comments |
Comment by Aleksandrs Saveljevs [ 2014 Apr 01 ] |
Another problem is that calculated item expressions cannot be evaluated if they are over 2048 characters after all function values have been substituted into the expression. |
Comment by Aleksandrs Saveljevs [ 2014 Apr 01 ] |
The issue was discussed with sasha and it was decided to fix the issue in 2.4 only under |
Comment by Aleksandrs Saveljevs [ 2014 May 27 ] |
Fixed in pre-2.3.0 (trunk) r45764. |