package
2.16.0
Repository: https://github.com/tawesoft/golib.git
Documentation: pkg.go.dev

# Packages

Package checked (operator/checked) implements operations bounded by limits that are robust in the event of integer overflow.
No description provided by the author

# Functions

Abs returns (0 - r) for r < 0, or r for r >= 0.
Add returns a + b.
And is a logical predicate for performing conjunction.
BitwiseAnd returns bitwise AND (i.e.
BitwiseNot returns bitwise complement.
BitwiseOr returns bitwise OR (i.e.
BitwiseXor returns bitwise XOR (i.e.
Cmp returns integer 1, 0, or -1 depending on whether a is greater than, equal to, or less than b.
ConverseImplies is a logical predicate ConverseImplies(p, q) for "q implies p" (written "q => p" or "p <= q").
ConverseNotImplies is a logical predicate ConverseNotImplies(p, q) for "q does not imply p" (written "q =/=> p" or "p <=/= q").
Div returns a / b.
Equal returns a == b.
F is a logical predicate for a contradiction.
GT returns a > b.
GTE returns a >= b.
Identity implements the function f(x) => x.
Iff is a logical predicate Iff(p, q) for the logical biconditional "p iff q" ("p if and only if q").
Implies is a logical predicate Implies(p, q) for "p implies q" (written p => q).
In returns true if x equals any of the following arguments.
Inv returns (-r).
IsNegative returns true iff r <= 0.
IsNonZero returns true iff x is not equal to the zero value of its type.
IsPositive returns true iff r >= 0.
IsStrictlyNegative returns true iff r < 0.
IsStrictlyPositive returns true iff r > 0.
IsZero returns true iff x is equal to the zero value of its type.
LT returns a < b.
LTE returns a <= b.
Mod returns a mod b (i.e.
Mul returns a * b.
Nand is a logical predicate that is the inverse of And.
Nor is a logical predicate for neither.
Not returns the logical negation of x.
NotEqual returns a != b.
NotImplies is a logical predicate for nonimplication.
NotP is a logical predicate.
NotQ is a logical predicate.
Or is a logical predicate for performing disjunction.
P is a logical predicate.
Pow returns a to the power of b for integer inputs.
Q is a logical predicate.
ShiftLeft returns bitwise shift left (i.e.
ShiftRight returns bitwise shift right (i.e.
Sub returns a - b.
T is a logical predicate for a tautology.
Ternary returns a if q is true, or b if q is false.
True returns true if x represents a truthy value.
Xor is a logical predicate for exclusive or.
Zero returns the zero value for any type.

# Interfaces

Number represents any number type that you can support arithmetic using standard Go operators (like a + b, or a ^ b) - i.e.
Signed represents any number type that may encode both positive and negative values and that support arithmetic on using standard Go operators (like a + b, or a ^ b) - i.e.