github.com/goplus/igop@v0.25.0/pkg/math/big/go114_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //+build go1.14,!go1.15
     4  
     5  package big
     6  
     7  import (
     8  	q "math/big"
     9  
    10  	"go/constant"
    11  	"reflect"
    12  
    13  	"github.com/goplus/igop"
    14  )
    15  
    16  func init() {
    17  	igop.RegisterPackage(&igop.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]reflect.Type{
    36  			"Accuracy":     reflect.TypeOf((*q.Accuracy)(nil)).Elem(),
    37  			"ErrNaN":       reflect.TypeOf((*q.ErrNaN)(nil)).Elem(),
    38  			"Float":        reflect.TypeOf((*q.Float)(nil)).Elem(),
    39  			"Int":          reflect.TypeOf((*q.Int)(nil)).Elem(),
    40  			"Rat":          reflect.TypeOf((*q.Rat)(nil)).Elem(),
    41  			"RoundingMode": reflect.TypeOf((*q.RoundingMode)(nil)).Elem(),
    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]igop.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]igop.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  }