Code

rpn compare operators CAN return unknown ... (#293)
[rrdtool-all.git] / program / doc / rrdgraph_rpn.pod
index 581dce9cecde4da42bdda56b771249105c9c78f2..8f414c773f76e149b35c1c0c354e266f5ce48937 100644 (file)
@@ -50,7 +50,8 @@ B<LT, LE, GT, GE, EQ, NE>
 
 Pop two elements from the stack, compare them for the selected condition
 and return 1 for true or 0 for false. Comparing an I<unknown> or an
-I<infinite> value will always result in 0 (false).
+I<infinite> value will result in I<unknown> returned ... which will also be
+treated as false by the B<IF> call.
 
 B<UN, ISINF>
 
@@ -66,8 +67,6 @@ mean that any value other than 0 is considered to be true.
 
 Example: C<A,B,C,IF> should be read as C<if (A) then (B) else (C)>
 
-Z<>
-
 =item Comparing values
 
 B<MIN, MAX>
@@ -91,8 +90,6 @@ will always return an I<unknown>
 Example: C<CDEF:a=alpha,0,100,LIMIT> will return I<unknown> if
 alpha is lower than 0 or if it is higher than 100.
 
-Z<>
-
 =item Arithmetics
 
 B<+, -, *, /, %>
@@ -127,6 +124,10 @@ B<DEG2RAD, RAD2DEG>
 
 Convert angle in degrees to radians, or radians to degrees.
 
+B<ABS>
+
+Take the absolute value.
+
 =item Set Operations
 
 B<SORT, REV>
@@ -139,6 +140,13 @@ Example: C<CDEF:x=v1,v2,v3,v4,v5,v6,6,SORT,POP,5,REV,POP,+,+,+,4,/> will
 compute the average of the values v1 to v6 after removing the smallest and
 largest.
 
+B<AVG>
+
+Pop one element (I<count>) from the stack. Now pop I<count> elements and build the
+average, ignoring all UNKNOWN values in the process.
+
+Example: C<CDEF:x=a,b,c,d,4,AVG>
+
 B<TREND>
 
 Create a "sliding window" average of another data series.
@@ -223,8 +231,6 @@ B<DUP, POP, EXC>
 Duplicate the top element, remove the top element, exchange the two
 top elements.
 
-Z<>
-
 =back
 
 =head1 VARIABLES
@@ -296,6 +302,7 @@ Make sure to read L<rrdgraph_examples> for tipsE<amp>tricks.
 
 =head1 AUTHOR
 
-Program by Tobias Oetiker E<lt>oetiker@ee.ethz.chE<gt>
+Program by Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
 
-This manual page by Alex van den Bogaerdt E<lt>alex@ergens.op.het.netE<gt>
+This manual page by Alex van den Bogaerdt E<lt>alex@vandenbogaerdt.nlE<gt>
+with corrections and/or additions by several people