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]


Attachment: rol-ror.patch
Description: Binary data

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
rrd-developers mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers

Reply via email to