Hi Steve, your function always affects 3 values ... would there be any gain in makeing this call more generic ?
a,b,c,d,x,y,ROL rotate the last x values on the stack by y steps to the left. and maybe have -y role to the right? cheers tobi Today Steve Shipway wrote: > So, splitting this idea out from the separate post on the predict function, > I propose adding the new operations ROL and ROR to the RPN interpreter. > > They would rotate the top 3 items left or right, and have this effect on the > stack ... > > 1,2,3,ROL --> 2,3,1 > 1,2,3,ROR --> 3,1,2 > > These allow more complex arithmetic to be performed and complement the > existing EXC operator. > > A context-diff against 1.4 is attached for your consideration; it is pretty > simple and implemented similarly to EXC. The modified files are > rrd_rpncalc.h and rrd_rpncalc.c > > Steve > > Steve Shipway > [email protected] > > > -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland www.oetiker.ch [email protected] +41 62 775 9902 _______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
