Documentation
¶
Overview ¶
Package multipleconversions implements postfix calculator using conversions.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RPN ¶
RPN returns the result of an expression using reverse polish notation (postfix) by exploding the string to a slice and editing the slice by replacing each op by its result until only a number is left or failing if the expression is invalid.
Example ¶
fmt.Printf("%f", RPN(values.RPNInput))
Output: 30.000000
Example (Exp) ¶
fmt.Printf("%.13f", RPN(values.Input))
Output: 3.0001220703125
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.