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