Package: advanced-rpn-calculator
RPN Calculator by Akbar BadShahIt's a full-fledged rpn calculator I made to practice my pythonic skills. Works fine to the best of my knowledge, but you're still welcome to share your thoughts, add features, report and correct bugs.New Features!+: Take 2 numbers from the stack, add them and put the result in the stack-: Take 2 numbers from the stack, substracte them and put the result in the stack*: Take 2 numbers from the stack, mul them and put the result in the stack/: Take 2 numbers from the stack, divise them and put the result in the stackcla: Clear both stack and variableclr: Empty the stackclv: Clear both stack and variable!: None!=: Return True if last two numbers in stack are equal, False otherwise%: Take 2 integers from the stack, divide them and put the remainder in the stack++: Increment an integer--: Decrement an integer&: Take 2 numbers from the stack, apply a bitwise "and" and put the result in the stack|: Take 2 numbers from the stack, apply a bitwise "or" and put the result in the stack^: Take 2 numbers from the stack, apply a bitwise "xor" and put the result in the stack~: Take 2 numbers from the stack, apply a bitwise "xor" and put the result in the stack<<: Take 2 numbers from the stack, apply a left shift and put the result in the stack>>: Take 2 numbers from the stack, apply a right shift and put the result in the stack&&: Perform boollean AND operation on two values and output the result (not added to the stack)||: Perform boollean OR operation on two values and output the result (not added to the stack)^^: Perform boolean XOR operation on two values and output the result (not added to the stack)<: Smaller than operation on two values and output the result (not added to the stack)<=: Smaller than or equal to operation on two values and output the result (not added to the stack)==: Equal to operation on two values and output the result (not added to the stack)>: Greater than operation on two values and output the result (not added to the stack)>=: Greater than operation on two values and output the result (not added to the stack)acos: Take arc cosine on a value and output the result (also added to the stack)asin: Take arc sine on a value and output the result (also added to the stack)atan: Take arc tangent on a value and output the result (also added to the stack)cos: Take cosine on a value and output the result (also added to the stack)cosh: Take arc hyperbolic cosine on a value and output the result (also added to the stack)sin: Take sine on a value and output the result (also added to the stack)sinh: Take hyperbolic sine on a value and output the result (also added to the stack)tanh: Take hyperbolic tangent on a value and output the result (also added to the stack)ceil: Take ceil of an integer and output the result (also added to the stack)floor: Take floor of an integer and output the result (also added to the stack)round: Take round of an integer and output the result (also added to the stack)ip: Separates int from floating part of a decimal number and output the result (also added to the stack)fp: separates floating part of a decimal number and output the result (also added to the stack)abs: Take ceil of an integer and output the result (also added to the stack)max: Take maximum value of the stack and output the result (also removed from the stack)min: Take minimum value of the stack and output the result (also removed from the stack)hex: Change display mode to hexbin: Change display mode to binarydec: Change display mode to decimale: Nonepi: Nonerand: Noneexp: Apply e**x to the last number of the stackfact: Push factorial of the last number to the stacksqrt: Push factorial of the last number to the stackln: Apply log10 to the last number of the stacklog: Apply log10 to the last number of the stackpow: Take 2 numbers from the stack, apply power and put the result in the stackpick: Pick the nth item form stackrepeat: Repeat an operation n timesdrop: Drop the top most item from the stackdropn: Drop the n top most items from the stackdup: Duplicates the top item from the stackdupn: Duplicates n top items of thew stackroll: Roll the stack upwards by nrolld: Roll the stack downwards by nstack: Toggles stack display from horizontal to verticalswap: Swap the top 2 stack itemsx=: Assigns a variable, e.g. '1024 x='help: Print help; Same as pol --listexit: Quit the programAvailable ModesFor one time result of a single line statement, do:rpn 3 2 + #(should exit outputting 5)To solve statements from a file before entering shell, do:rpn --file #pathTo simply enter the shell, do:rpnInstallationpip install advanced_rpn_calculatorTodosWrite MORE Tests or just test if everything works fine.LicenseMITFree Software, Hell Yeah!