Versions in this module Expand all Collapse all v0 v0.0.1 May 26, 2022 Changes in this version + var FormatToString = map[NumberFormat]string + var StringToFormat = map[string]NumberFormat + type IntOperationError struct + func (x IntOperationError) Error() string + type Number struct + Fmt NumberFormat + Num *big.Rat + func Float64(x float64) Number + func Int64(x int64) Number + func (a Number) BinOP(op token.Token, b Value) (Value, error) + func (a Number) Format(tsep string, prec int) string + func (a Number) In(fmt string) (Value, error) + func (a Number) String() string + func (a Number) UnOP(op token.Token) (Value, error) + type NumberFormat int + const BIN + const DEC + const HEX + const OCT + const RAT + const SCI + func (n NumberFormat) String() string + type Time struct + func GetNamedTime(name string) *Time + func NewTime(t time.Time) Time + func (a Time) BinOP(op token.Token, b Value) (Value, error) + func (t Time) In(fmt string) (Value, error) + func (t Time) String() string + func (t Time) UnOP(op token.Token) (Value, error) + type Unit struct + Fmt NumberFormat + Num *big.Rat + Units unit.Units + func (a Unit) BinOP(op token.Token, b Value) (Value, error) + func (a Unit) Format(tsep string, prec int) string + func (a Unit) In(fmt string) (Value, error) + func (a Unit) String() string + func (a Unit) UnOP(op token.Token) (Value, error) + type UnsupportedBinOP struct + func (err UnsupportedBinOP) Error() string + type Value interface + BinOP func(token.Token, Value) (Value, error) + In func(string) (Value, error) + String func() string + UnOP func(token.Token) (Value, error) + type ValueType int + const TYPE_NUMBER + const TYPE_TIME + const TYPE_UNIT + const TYPE_UNKNOWN + func Type(x Value) ValueType + func (t ValueType) String() string