So, I’m delving into the PREDICT operations in the RPN, and have found something unexpected.

There are two ways of specifying the shift offsets – as a (positive) count of shifts and a list; or as a negative count and a base shift.

CDEF:predict1=172800,86400,0,3,3600,x,PREDICT

CDEF:predict2=86400,-3,3600,x,PREDICT

My tests (using 1.4.trunk) indicate that the two above have identical behaviour. My question is, is this intended? In particular, when giving a negative shift count, should the resulting list of shifts be based at 0?

Given this:

CDEF:predict=s,-3,w,x,PREDICT

I had expected to get shifts of s, 2s and 3s. Instead I get 0, s and 2s. Is this intentional, or a feature?

As a corollary, it means that these two lines are also equal for ANY value of s

CDEF:predict1=s,-1,3600,x,PREDICT

CDEF:predict2=x,3600,TRENDNAN

Thanks,

Steve

Steve Shipway

University of Auckland

UNIX Systems Design Team Lead

s.shipway <at> auckland.ac.nz

+64 (9) 3737 599 ext 86487