number

package
v0.0.0-...-0e61b49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Add

type Add[N any] interface {
	Add(N, N) N
}

type Div

type Div[N any] interface {
	Div(N, N) N
}

type EnumInt

type EnumInt struct{}

* Enum for int

func NewEnumInt

func NewEnumInt() *EnumInt

func (*EnumInt) Pred

func (enum *EnumInt) Pred(x int) int

func (*EnumInt) Range

func (enum *EnumInt) Range(i, j int) collection.Iterator[int]

func (*EnumInt) Succ

func (enum *EnumInt) Succ(x int) int

func (*EnumInt) ToEnum

func (enum *EnumInt) ToEnum(i int) int

type EnumNat

type EnumNat struct{}

func (*EnumNat) Pred

func (enum *EnumNat) Pred(x Nat) Nat

func (*EnumNat) Range

func (enum *EnumNat) Range(i, j Nat) collection.Iterator[Nat]

func (*EnumNat) Succ

func (enum *EnumNat) Succ(x Nat) Nat

func (*EnumNat) ToEnum

func (enum *EnumNat) ToEnum(i int) Nat

type IntIter

type IntIter struct {
	// contains filtered or unexported fields
}

func (IntIter) From

func (IntIter) From(start int) *IntIter

func (*IntIter) Next

func (iter *IntIter) Next() maybe.Maybe[int]

type Integer

type Integer struct {
	// contains filtered or unexported fields
}

* Infinite precision Integers

type Mul

type Mul[N any] interface {
	Mul(N, N) N
}

type Nat

type Nat uint

* Natural numbers

type Neg

type Neg[N any] interface {
	Neg(N) N
}

type NonZero

type NonZero uint

* Non-zero Integers

type Num

type Num[N any] interface {
	Add[N]
	Sub[N]
	Mul[N]
	Div[N]
	Neg[N]
}

type Number

type Number struct {
	// contains filtered or unexported fields
}

* Infinite precision floating numbers

type Sub

type Sub[N any] interface {
	Sub(N, N) N
}

Directories

Path Synopsis
* functions about number pverflow
* functions about number pverflow

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL