Documentation
¶
Index ¶
- func BigratToBigint(bigrat *big.Rat) *big.Int
- func BigratToFloat(bigrat *big.Rat) float64
- func BigratToInt(bigrat *big.Rat) (int64, error)
- func Eval(expr string) (result *big.Rat, err error)
- func EvaluatePostfix(postfix []string) (*big.Rat, error)
- func FloatToBigrat(float float64) *big.Rat
- func GetPostfix(expr string) []string
- func IsCellAddr(token string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigratToBigint ¶
BigratToInt converts a *big.Rat to a *big.Int (with truncation)
func BigratToFloat ¶
BigratToFloat converts a *big.Rat to a float64 (with loss of precision).
func BigratToInt ¶
BigratToInt converts a *big.Rat to an int64 (with truncation); it returns an error for integer overflows.
func Eval ¶
Eval takes an infix string arithmetic expression, and evaluates it
Usage:
result, err := evaler.Eval("1+2")
Returns: the result of the evaluation, and any errors
func EvaluatePostfix ¶
evaluatePostfix takes a postfix expression and evaluates it
func FloatToBigrat ¶
FloatToBigrat converts a float64 to a *big.Rat.
func GetPostfix ¶
func IsCellAddr ¶
isCellAddr returns true if token is a cell address
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.