Stacniac is an RPN calculator.
Commands(TOS refers to the top of the stack; NOS refers to the next on the stack.)
: defines a new command (refer to the programming section) ! deletes a command (refer to the programming section) about shows the about box abs absolute value of TOS add adds TOS and NOS (use + for immediate add) and converts TOS and NOS to integers and bitwise ands them acos arc cosine of TOS in radians asin arc sine of TOS in radians atan arc tangent of TOS in radians clr clears the stack cos cosine of TOS (TOS in radians) cub cubes TOS cbrt cube root of TOS d2r converts TOS from degrees to radians div divides NOS by TOS (use / for immediate divide) dn pops and discards NOS drop pops and discards TOS dup duplicates TOS dd duplicates TOS below NOS e pushes e (2.7182818284590452354) eq pushes 1.0 if TOS is equal to NOS; pushes -1.0 otherwise exp e raised to TOS fmtc switches display format to currency fmtd switches format to decimal fmte switches format to engineering fmth switches format to hexadecimal (note that fractions are ignored) gt pushes 1.0 if TOS is greater than NOS; pushes -1.0 otherwise help displays help window inv converts TOS to an integer and bitwise inverts it log natural logarithm of TOS lt pushes 1.0 if TOS is less than NOS; pushes -1.0 otherwise mul multiplies TOS by NOS (use * for immediate multiply) neg negates TOS or converts TOS and NOS to integers and bitwise ors them pi pushes pi (3.14159265358979323846) pop pops and discards TOS pow raises NOS to TOS power r2d converts TOS from radians to degrees rcp reciprocal of TOS rem remainder from dividing NOS by TOS rd rotates down the top three items on the stack rt TOS root of NOS ru rotates up the top three items on the stack rnd rounds TOS to an integer sfmtc set the display format for currency sfmte set the display format for engineering (exponential) sfmts set the display format for engineering (standard) sgn sign of TOS show shows a list of the current custom commands sin sine of TOS (TOS in radians) sqr squares TOS sqrt square root of TOS sub subtracts NOS from TOS (use - for immediate subtract) swap swaps TOS and NOS tan tangent of TOS (TOS in radians) xor converts TOS and NOS to integers and bitwise exclusive ors them In addition, the following may be used when defining new commands (refer to the programming section) ? pops TOS and if > 0 then skips the next command % pops TOS and if > 0 then terminates current command normally $ pops TOS and if > 0 then terminates current command as a failure
Add Two Numbers
Balance your checkbook
Compute flight time to Alpha Centauri
Stacniac has limited programmability.
You can embed numeric literals in the command definition and they will be pushed onto the stack.
Commands can be deleted by typing in a space-delimited deletion string consisting of:
Commands are persistent - i.e. once you define a command, Stacniac remembers it until you explicitly delete it.
Commands that you enter are stored in Stacniac's preferences file.
Alias a command
To alias div to d, you could enter
To program a new command to compute the hypotenuse of a right triangle,
you could enter
To program a new command to compute the factorial of a number,
you could enter
Send comments, questions, suggestions, bug reports to email@example.com