Rat

Overview

Location

  • Reference: Go.fx
  • Namespace: go.math.big
  • Platforms: Island

Implements

Instance Methods


constructor

 

constructor

 

Rat()

 

init()

 

Sub New()

constructor (Int, Int)

 

constructor(aa: Int; ab: Int)

 

Rat(Int aa, Int ab)

 

init(_ aa: Int, _ ab: Int)

 

Sub New(aa As Int, ab As Int)

Parameters:

  • aa:
  • ab:

constructor (Rat)

 

constructor(value: Rat)

 

Rat(Rat value)

 

init(_ value: Rat)

 

Sub New(value As Rat)

Parameters:

  • value:

Scan (ScanState, rune): error

 

method Scan(s: ScanState; ch: rune): error

 

error Scan(ScanState s, rune ch)

 

func Scan(_ s: ScanState, _ ch: rune) -> error

 

func Scan(s ScanState, ch rune) error

 

Function Scan(s As ScanState, ch As rune) As error

Parameters:

  • s:
  • ch:

Abs

 

method Abs(x: Reference<Rat>): Reference<Rat>

 

Reference<Rat> Abs(Reference<Rat> x)

 

func Abs(_ x: Reference<Rat>) -> Reference<Rat>

 

func Abs(x Reference<Rat>) Reference<Rat>

 

Function Abs(x As Reference<Rat>) As Reference<Rat>

Parameters:

  • x:

Add

 

method Add(x: Reference<Rat>; y: Reference<Rat>): Reference<Rat>

 

func Add(_ x: Reference<Rat>, _ y: Reference<Rat>) -> Reference<Rat>

 

func Add(x Reference<Rat>, y Reference<Rat>) Reference<Rat>

 

Function Add(x As Reference<Rat>, y As Reference<Rat>) As Reference<Rat>

Parameters:

  • x:
  • y:

Cmp

 

method Cmp(y: Reference<Rat>): int

 

int Cmp(Reference<Rat> y)

 

func Cmp(_ y: Reference<Rat>) -> int

 

func Cmp(y Reference<Rat>) int

 

Function Cmp(y As Reference<Rat>) As int

Parameters:

  • y:

Denom

 

method Denom: Reference<Int>

 

Reference<Int> Denom()

 

func Denom() -> Reference<Int>

 

func Denom() Reference<Int>

 

Function Denom() As Reference<Int>

Float32

 

method Float32: tuple of (f: Single, exact: Boolean)

 

(Single f, Boolean exact) Float32()

 

func Float32() -> (Single, Boolean)

 

func Float32() (f Single, exact Boolean)

 

Function Float32() As Tuple (Of Single, Boolean)

Float64

 

method Float64: tuple of (f: Double, exact: Boolean)

 

(Double f, Boolean exact) Float64()

 

func Float64() -> (Double, Boolean)

 

func Float64() (f Double, exact Boolean)

 

Function Float64() As Tuple (Of Double, Boolean)

FloatString

 

method FloatString(prec: int): string

 

string FloatString(int prec)

 

func FloatString(_ prec: int) -> string

 

func FloatString(prec int) string

 

Function FloatString(prec As int) As string

Parameters:

  • prec:

GobDecode

 

method GobDecode(buf: Slice<Byte>): error

 

error GobDecode(Slice<Byte> buf)

 

func GobDecode(_ buf: Slice<Byte>) -> error

 

func GobDecode(buf Slice<Byte>) error

 

Function GobDecode(buf As Slice<Byte>) As error

Parameters:

  • buf:

GobEncode

 

method GobEncode: tuple of (Slice<Byte>, error)

 

(Slice<Byte>, error) GobEncode()

 

func GobEncode() -> (Slice<Byte>, error)

 

func GobEncode() (Slice<Byte>, error)

 

Function GobEncode() As Tuple (Of Slice<Byte>, error)

Inv

 

method Inv(x: Reference<Rat>): Reference<Rat>

 

Reference<Rat> Inv(Reference<Rat> x)

 

func Inv(_ x: Reference<Rat>) -> Reference<Rat>

 

func Inv(x Reference<Rat>) Reference<Rat>

 

Function Inv(x As Reference<Rat>) As Reference<Rat>

Parameters:

  • x:

IsInt

 

method IsInt: bool

 

bool IsInt()

 

func IsInt() -> bool

 

func IsInt() bool

 

Function IsInt() As bool

MarshalText

 

method MarshalText: tuple of (text: Slice<Byte>, err: error)

 

(Slice<Byte>text, error err) MarshalText()

 

func MarshalText() -> (Slice<Byte>, error)

 

func MarshalText() (text Slice<Byte>, err error)

 

Function MarshalText() As Tuple (Of Slice<Byte>, error)

Mul

 

method Mul(x: Reference<Rat>; y: Reference<Rat>): Reference<Rat>

 

func Mul(_ x: Reference<Rat>, _ y: Reference<Rat>) -> Reference<Rat>

 

func Mul(x Reference<Rat>, y Reference<Rat>) Reference<Rat>

 

Function Mul(x As Reference<Rat>, y As Reference<Rat>) As Reference<Rat>

Parameters:

  • x:
  • y:

Neg

 

method Neg(x: Reference<Rat>): Reference<Rat>

 

Reference<Rat> Neg(Reference<Rat> x)

 

func Neg(_ x: Reference<Rat>) -> Reference<Rat>

 

func Neg(x Reference<Rat>) Reference<Rat>

 

Function Neg(x As Reference<Rat>) As Reference<Rat>

Parameters:

  • x:

Num

 

method Num: Reference<Int>

 

Reference<Int> Num()

 

func Num() -> Reference<Int>

 

func Num() Reference<Int>

 

Function Num() As Reference<Int>

Quo

 

method Quo(x: Reference<Rat>; y: Reference<Rat>): Reference<Rat>

 

func Quo(_ x: Reference<Rat>, _ y: Reference<Rat>) -> Reference<Rat>

 

func Quo(x Reference<Rat>, y Reference<Rat>) Reference<Rat>

 

Function Quo(x As Reference<Rat>, y As Reference<Rat>) As Reference<Rat>

Parameters:

  • x:
  • y:

RatString

 

method RatString: string

 

string RatString()

 

func RatString() -> string

 

func RatString() string

 

Function RatString() As string

Scan (ScanState, rune): error

 

method Scan(s: ScanState; ch: rune): error

 

error Scan(ScanState s, rune ch)

 

func Scan(_ s: ScanState, _ ch: rune) -> error

 

func Scan(s ScanState, ch rune) error

 

Function Scan(s As ScanState, ch As rune) As error

Parameters:

  • s:
  • ch:

Set

 

method Set(x: Reference<Rat>): Reference<Rat>

 

Reference<Rat> Set(Reference<Rat> x)

 

func Set(_ x: Reference<Rat>) -> Reference<Rat>

 

func Set(x Reference<Rat>) Reference<Rat>

 

Function Set(x As Reference<Rat>) As Reference<Rat>

Parameters:

  • x:

SetFloat64

 

method SetFloat64(f: float64): Reference<Rat>

 

Reference<Rat> SetFloat64(float64 f)

 

func SetFloat64(_ f: float64) -> Reference<Rat>

 

func SetFloat64(f float64) Reference<Rat>

 

Function SetFloat64(f As float64) As Reference<Rat>

Parameters:

  • f:

SetFrac

 

method SetFrac(a: Reference<Int>; b: Reference<Int>): Reference<Rat>

 

Reference<Rat> SetFrac(Reference<Int> a, Reference<Int> b)

 

func SetFrac(_ a: Reference<Int>, _ b: Reference<Int>) -> Reference<Rat>

 

func SetFrac(a Reference<Int>, b Reference<Int>) Reference<Rat>

 

Function SetFrac(a As Reference<Int>, b As Reference<Int>) As Reference<Rat>

Parameters:

  • a:
  • b:

SetFrac64

 

method SetFrac64(a: int64; b: int64): Reference<Rat>

 

Reference<Rat> SetFrac64(int64 a, int64 b)

 

func SetFrac64(_ a: int64, _ b: int64) -> Reference<Rat>

 

func SetFrac64(a int64, b int64) Reference<Rat>

 

Function SetFrac64(a As int64, b As int64) As Reference<Rat>

Parameters:

  • a:
  • b:

SetInt

 

method SetInt(x: Reference<Int>): Reference<Rat>

 

Reference<Rat> SetInt(Reference<Int> x)

 

func SetInt(_ x: Reference<Int>) -> Reference<Rat>

 

func SetInt(x Reference<Int>) Reference<Rat>

 

Function SetInt(x As Reference<Int>) As Reference<Rat>

Parameters:

  • x:

SetInt64

 

method SetInt64(x: int64): Reference<Rat>

 

Reference<Rat> SetInt64(int64 x)

 

func SetInt64(_ x: int64) -> Reference<Rat>

 

func SetInt64(x int64) Reference<Rat>

 

Function SetInt64(x As int64) As Reference<Rat>

Parameters:

  • x:

SetString

 

method SetString(s: string): tuple of (Rat, Boolean)

 

(Rat, Boolean) SetString(string s)

 

func SetString(_ s: string) -> (Rat, Boolean)

 

func SetString(s string) (Rat, Boolean)

 

Function SetString(s As string) As Tuple (Of Rat, Boolean)

Parameters:

  • s:

SetUint64

 

method SetUint64(x: uint64): Reference<Rat>

 

Reference<Rat> SetUint64(uint64 x)

 

func SetUint64(_ x: uint64) -> Reference<Rat>

 

func SetUint64(x uint64) Reference<Rat>

 

Function SetUint64(x As uint64) As Reference<Rat>

Parameters:

  • x:

Sign

 

method Sign: int

 

int Sign()

 

func Sign() -> int

 

func Sign() int

 

Function Sign() As int

String

 

method String: string

 

string String()

 

func String() -> string

 

func String() string

 

Function String() As string

Sub

 

method Sub(x: Reference<Rat>; y: Reference<Rat>): Reference<Rat>

 

func Sub(_ x: Reference<Rat>, _ y: Reference<Rat>) -> Reference<Rat>

 

func Sub(x Reference<Rat>, y Reference<Rat>) Reference<Rat>

 

Function Sub(x As Reference<Rat>, y As Reference<Rat>) As Reference<Rat>

Parameters:

  • x:
  • y:

UnmarshalText

 

method UnmarshalText(text: Slice<Byte>): error

 

error UnmarshalText(Slice<Byte> text)

 

func UnmarshalText(_ text: Slice<Byte>) -> error

 

func UnmarshalText(text Slice<Byte>) error

 

Function UnmarshalText(text As Slice<Byte>) As error

Parameters:

  • text: