fix off by 1 error
[rrdtool.git] / doc / rrdgraph_rpn.pod
index 16f7610..87fc8e6 100644 (file)
@@ -51,7 +51,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>
 
@@ -156,6 +157,16 @@ average, ignoring all UNKNOWN values in the process.
 
 Example: C<CDEF:x=a,b,c,d,4,AVG>
 
+B<MEDIAN>
+
+pop one element (I<count>) from the stack. Now pop I<count> elements and find
+the median, ignoring all UNKNOWN values in the process. If there are an even
+number of non-UNKNOWN values, the average of the middle two will be pushed on
+the stack.
+
+Example: C<CDEF:x=a,b,c,d,4,MEDIAN>
+
+
 B<TREND, TRENDNAN>
 
 Create a "sliding window" average of another data series.
@@ -343,9 +354,8 @@ Example: C<VDEF:stdev=mydata,STDEV>
 
 =item LAST, FIRST
 
-Return the last/first value including its time.  The time for
-FIRST is actually the start of the corresponding interval, whereas
-LAST returns the end of the corresponding interval.
+Return the last/first non-nan or infinite value for the selected data
+stream, including its timestamp.
 
 Example: C<VDEF:first=mydata,FIRST>