github.com/goplus/gossa@v0.3.25/pkg/math/big/go115_export.go (about)

     1  // export by github.com/goplus/gossa/cmd/qexp
     2  
     3  //+build go1.15,!go1.16
     4  
     5  package big
     6  
     7  import (
     8  	q "math/big"
     9  
    10  	"go/constant"
    11  	"reflect"
    12  
    13  	"github.com/goplus/gossa"
    14  )
    15  
    16  func init() {
    17  	gossa.RegisterPackage(&gossa.Package{
    18  		Name: "big",
    19  		Path: "math/big",
    20  		Deps: map[string]string{
    21  			"bytes":           "bytes",
    22  			"encoding/binary": "binary",
    23  			"errors":          "errors",
    24  			"fmt":             "fmt",
    25  			"internal/cpu":    "cpu",
    26  			"io":              "io",
    27  			"math":            "math",
    28  			"math/bits":       "bits",
    29  			"math/rand":       "rand",
    30  			"strconv":         "strconv",
    31  			"strings":         "strings",
    32  			"sync":            "sync",
    33  		},
    34  		Interfaces: map[string]reflect.Type{},
    35  		NamedTypes: map[string]gossa.NamedType{
    36  			"Accuracy":     {reflect.TypeOf((*q.Accuracy)(nil)).Elem(), "String", ""},
    37  			"ErrNaN":       {reflect.TypeOf((*q.ErrNaN)(nil)).Elem(), "Error", ""},
    38  			"Float":        {reflect.TypeOf((*q.Float)(nil)).Elem(), "", "Abs,Acc,Add,Append,Cmp,Copy,Float32,Float64,Format,GobDecode,GobEncode,Int,Int64,IsInf,IsInt,MantExp,MarshalText,MinPrec,Mode,Mul,Neg,Parse,Prec,Quo,Rat,Scan,Set,SetFloat64,SetInf,SetInt,SetInt64,SetMantExp,SetMode,SetPrec,SetRat,SetString,SetUint64,Sign,Signbit,Sqrt,String,Sub,Text,Uint64,UnmarshalText,fmtB,fmtP,fmtX,ord,pow5,round,scan,setBits64,setExpAndRound,sqrtInverse,uadd,ucmp,umul,uquo,usub,validate"},
    39  			"Int":          {reflect.TypeOf((*q.Int)(nil)).Elem(), "", "Abs,Add,And,AndNot,Append,Binomial,Bit,BitLen,Bits,Bytes,Cmp,CmpAbs,Div,DivMod,Exp,FillBytes,Format,GCD,GobDecode,GobEncode,Int64,IsInt64,IsUint64,Lsh,MarshalJSON,MarshalText,Mod,ModInverse,ModSqrt,Mul,MulRange,Neg,Not,Or,ProbablyPrime,Quo,QuoRem,Rand,Rem,Rsh,Scan,Set,SetBit,SetBits,SetBytes,SetInt64,SetString,SetUint64,Sign,Sqrt,String,Sub,Text,TrailingZeroBits,Uint64,UnmarshalJSON,UnmarshalText,Xor,lehmerGCD,modSqrt3Mod4Prime,modSqrt5Mod8Prime,modSqrtTonelliShanks,scaleDenom,scan,setFromScanner"},
    40  			"Rat":          {reflect.TypeOf((*q.Rat)(nil)).Elem(), "", "Abs,Add,Cmp,Denom,Float32,Float64,FloatString,GobDecode,GobEncode,Inv,IsInt,MarshalText,Mul,Neg,Num,Quo,RatString,Scan,Set,SetFloat64,SetFrac,SetFrac64,SetInt,SetInt64,SetString,SetUint64,Sign,String,Sub,UnmarshalText,marshal,norm"},
    41  			"RoundingMode": {reflect.TypeOf((*q.RoundingMode)(nil)).Elem(), "String", ""},
    42  			"Word":         {reflect.TypeOf((*q.Word)(nil)).Elem(), "", ""},
    43  		},
    44  		AliasTypes: map[string]reflect.Type{},
    45  		Vars:       map[string]reflect.Value{},
    46  		Funcs: map[string]reflect.Value{
    47  			"Jacobi":     reflect.ValueOf(q.Jacobi),
    48  			"NewFloat":   reflect.ValueOf(q.NewFloat),
    49  			"NewInt":     reflect.ValueOf(q.NewInt),
    50  			"NewRat":     reflect.ValueOf(q.NewRat),
    51  			"ParseFloat": reflect.ValueOf(q.ParseFloat),
    52  		},
    53  		TypedConsts: map[string]gossa.TypedConst{
    54  			"Above":         {reflect.TypeOf(q.Above), constant.MakeInt64(int64(q.Above))},
    55  			"AwayFromZero":  {reflect.TypeOf(q.AwayFromZero), constant.MakeInt64(int64(q.AwayFromZero))},
    56  			"Below":         {reflect.TypeOf(q.Below), constant.MakeInt64(int64(q.Below))},
    57  			"Exact":         {reflect.TypeOf(q.Exact), constant.MakeInt64(int64(q.Exact))},
    58  			"ToNearestAway": {reflect.TypeOf(q.ToNearestAway), constant.MakeInt64(int64(q.ToNearestAway))},
    59  			"ToNearestEven": {reflect.TypeOf(q.ToNearestEven), constant.MakeInt64(int64(q.ToNearestEven))},
    60  			"ToNegativeInf": {reflect.TypeOf(q.ToNegativeInf), constant.MakeInt64(int64(q.ToNegativeInf))},
    61  			"ToPositiveInf": {reflect.TypeOf(q.ToPositiveInf), constant.MakeInt64(int64(q.ToPositiveInf))},
    62  			"ToZero":        {reflect.TypeOf(q.ToZero), constant.MakeInt64(int64(q.ToZero))},
    63  		},
    64  		UntypedConsts: map[string]gossa.UntypedConst{
    65  			"MaxBase": {"untyped rune", constant.MakeInt64(int64(q.MaxBase))},
    66  			"MaxExp":  {"untyped int", constant.MakeInt64(int64(q.MaxExp))},
    67  			"MaxPrec": {"untyped int", constant.MakeInt64(int64(q.MaxPrec))},
    68  			"MinExp":  {"untyped int", constant.MakeInt64(int64(q.MinExp))},
    69  		},
    70  	})
    71  }