small_rational

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Bytes = 64

Variables

This section is empty.

Functions

func Modulus

func Modulus() *big.Int

Types

type SmallRational

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

func BatchInvert

func BatchInvert(a []SmallRational) []SmallRational

func (*SmallRational) Add

func (z *SmallRational) Add(x, y *SmallRational) *SmallRational

func (*SmallRational) BigInt added in v0.9.1

func (z *SmallRational) BigInt(dst *big.Int) *big.Int

BigInt returns sets dst to the value of z if it is an integer. if z is not an integer, nil is returned. if the given dst is nil, the address of the numerator is returned. if the given dst is non-nil, it is returned.

func (*SmallRational) Bytes

func (z *SmallRational) Bytes() [Bytes]byte

func (*SmallRational) Cmp

func (z *SmallRational) Cmp(x *SmallRational) int

func (*SmallRational) Double

func (z *SmallRational) Double(x *SmallRational) *SmallRational

func (*SmallRational) Equal

func (z *SmallRational) Equal(x *SmallRational) bool

func (*SmallRational) Inverse

func (z *SmallRational) Inverse(x *SmallRational) *SmallRational

func (*SmallRational) IsOne

func (z *SmallRational) IsOne() bool

func (*SmallRational) IsZero

func (z *SmallRational) IsZero() bool

func (*SmallRational) MarshalJSON

func (z *SmallRational) MarshalJSON() ([]byte, error)

func (*SmallRational) Mul

func (z *SmallRational) Mul(x, y *SmallRational) *SmallRational

func (*SmallRational) Neg

func (*SmallRational) Set

func (*SmallRational) SetBytes

func (z *SmallRational) SetBytes(b []byte)

func (*SmallRational) SetInt64

func (z *SmallRational) SetInt64(i int64) *SmallRational

func (*SmallRational) SetInterface

func (z *SmallRational) SetInterface(x interface{}) (*SmallRational, error)

func (*SmallRational) SetOne

func (z *SmallRational) SetOne() *SmallRational

func (*SmallRational) SetRandom

func (z *SmallRational) SetRandom() (*SmallRational, error)

func (*SmallRational) SetUint64

func (z *SmallRational) SetUint64(i uint64)

func (*SmallRational) SetZero

func (z *SmallRational) SetZero() *SmallRational

func (*SmallRational) Sign

func (z *SmallRational) Sign() int

func (*SmallRational) Square

func (z *SmallRational) Square(x *SmallRational) *SmallRational

func (*SmallRational) String

func (z *SmallRational) String() string

func (*SmallRational) Sub

func (z *SmallRational) Sub(x, y *SmallRational) *SmallRational

func (*SmallRational) Text

func (z *SmallRational) Text(base int) string

func (*SmallRational) UnmarshalJson

func (z *SmallRational) UnmarshalJson(data []byte) error

func (*SmallRational) UpdateText

func (z *SmallRational) UpdateText()

Directories

Path Synopsis
Package polynomial provides polynomial methods and commitment schemes.
Package polynomial provides polynomial methods and commitment schemes.

Jump to

Keyboard shortcuts

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