X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Frpntutorial.html;h=cc301912ed9092734562b2177feed5f06ddaedc4;hb=43d79b11a51ae02b7b0995945cb351799e932d66;hp=74d8754758e5d3e75038ba02525a22973e4ae005;hpb=d93630a054a49f597224468ee8667af33df510e9;p=pkg-rrdtool.git diff --git a/doc/rpntutorial.html b/doc/rpntutorial.html index 74d8754..cc30191 100644 --- a/doc/rpntutorial.html +++ b/doc/rpntutorial.html @@ -115,9 +115,9 @@ with multiple logic operators:
multiplication operator:1) 128,8,*,7000,GT,7000,128,8,*,IF eval 128,8,* result is 1024 - 2) 1024,7000,GT,7000,128,8,*,IF eval 1024,7000,GT result is 0 - 3) 0,128,8,*,IF eval 128,8,* result is 1024 - 4) 0,7000,1024,IF result is 1024+ 2) 1024 ,7000,GT,7000,128,8,*,IF eval 1024,7000,GT result is 0 + 3) 0, 7000,128,8,*,IF eval 128,8,* result is 1024 + 4) 0, 7000,1024, IF result is 1024
Now let's go back to the first example of multiple logic operators, but replace the value 20 with the variable "input":
@@ -127,7 +127,7 @@ with "A":2) A,10,input,IF eval is A,10,input,IFread "if A then 10 else input". Now replace A with it's verbose -description again and--voila!--you have a easily readable description +description again and--voila!--you have an easily readable description of the expression:
if input > 10 then 10 else input@@ -173,7 +173,7 @@ uses the LE and DIV operators.Answer 2:
if (input <= 56000/8 ) { input*8 } else { 56000 } - input,56000,8,DIV,LT,input,8,*,56000,IF+ input,56000,8,DIV,LE,input,8,*,56000,IF
Exercise 3:
Briefly explain why traditional mathematic notation requires the use of parentheses. Explain why RPN notation does not require