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

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.20 && !go1.21
     4  // +build go1.20,!go1.21
     5  
     6  package big
     7  
     8  import (
     9  	q "math/big"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "big",
    20  		Path: "math/big",
    21  		Deps: map[string]string{
    22  			"bytes":           "bytes",
    23  			"encoding/binary": "binary",
    24  			"errors":          "errors",
    25  			"fmt":             "fmt",
    26  			"internal/cpu":    "cpu",
    27  			"io":              "io",
    28  			"math":            "math",
    29  			"math/bits":       "bits",
    30  			"math/rand":       "rand",
    31  			"strconv":         "strconv",
    32  			"strings":         "strings",
    33  			"sync":            "sync",
    34  		},
    35  		Interfaces: map[string]reflect.Type{},
    36  		NamedTypes: map[string]reflect.Type{
    37  			"Accuracy":     reflect.TypeOf((*q.Accuracy)(nil)).Elem(),
    38  			"ErrNaN":       reflect.TypeOf((*q.ErrNaN)(nil)).Elem(),
    39  			"Float":        reflect.TypeOf((*q.Float)(nil)).Elem(),
    40  			"Int":          reflect.TypeOf((*q.Int)(nil)).Elem(),
    41  			"Rat":          reflect.TypeOf((*q.Rat)(nil)).Elem(),
    42  			"RoundingMode": reflect.TypeOf((*q.RoundingMode)(nil)).Elem(),
    43  			"Word":         reflect.TypeOf((*q.Word)(nil)).Elem(),
    44  		},
    45  		AliasTypes: map[string]reflect.Type{},
    46  		Vars:       map[string]reflect.Value{},
    47  		Funcs: map[string]reflect.Value{
    48  			"Jacobi":     reflect.ValueOf(q.Jacobi),
    49  			"NewFloat":   reflect.ValueOf(q.NewFloat),
    50  			"NewInt":     reflect.ValueOf(q.NewInt),
    51  			"NewRat":     reflect.ValueOf(q.NewRat),
    52  			"ParseFloat": reflect.ValueOf(q.ParseFloat),
    53  		},
    54  		TypedConsts: map[string]igop.TypedConst{
    55  			"Above":         {reflect.TypeOf(q.Above), constant.MakeInt64(int64(q.Above))},
    56  			"AwayFromZero":  {reflect.TypeOf(q.AwayFromZero), constant.MakeInt64(int64(q.AwayFromZero))},
    57  			"Below":         {reflect.TypeOf(q.Below), constant.MakeInt64(int64(q.Below))},
    58  			"Exact":         {reflect.TypeOf(q.Exact), constant.MakeInt64(int64(q.Exact))},
    59  			"ToNearestAway": {reflect.TypeOf(q.ToNearestAway), constant.MakeInt64(int64(q.ToNearestAway))},
    60  			"ToNearestEven": {reflect.TypeOf(q.ToNearestEven), constant.MakeInt64(int64(q.ToNearestEven))},
    61  			"ToNegativeInf": {reflect.TypeOf(q.ToNegativeInf), constant.MakeInt64(int64(q.ToNegativeInf))},
    62  			"ToPositiveInf": {reflect.TypeOf(q.ToPositiveInf), constant.MakeInt64(int64(q.ToPositiveInf))},
    63  			"ToZero":        {reflect.TypeOf(q.ToZero), constant.MakeInt64(int64(q.ToZero))},
    64  		},
    65  		UntypedConsts: map[string]igop.UntypedConst{
    66  			"MaxBase": {"untyped rune", constant.MakeInt64(int64(q.MaxBase))},
    67  			"MaxExp":  {"untyped int", constant.MakeInt64(int64(q.MaxExp))},
    68  			"MaxPrec": {"untyped int", constant.MakeInt64(int64(q.MaxPrec))},
    69  			"MinExp":  {"untyped int", constant.MakeInt64(int64(q.MinExp))},
    70  		},
    71  	})
    72  }