Documentation
¶
Overview ¶
Package stack implements postfix calculator using a stack package.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RPNStack ¶
RPNStack prints the result of a string in reverse polish notation (postfix) using stack package of golang-collections.
Example ¶
Running exemples where fmt is needed to check output.
fmt.Printf("%.13f", RPNStack(values.Input))
Output: 3.0001220703125
Example (Sqrt) ¶
fmt.Printf("%f", RPNStack(values.RPNInput))
Output: 30.000000
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.