func Gop_bigrat_Cast__1(a Gop_bigint) Gop_bigrat {
	return Gop_bigrat{new(big.Rat).SetInt(a.Int)}
}
Gop_bigrat_Cast: func bigrat(a bigint) bigrat
package builtin
import (
	"math/big"
)
const (
	GopPackage = true  
)
type Gop_ninteger = uint
func Gop_istmp(a interface{}) bool {
	return false
}
type Gop_untyped_bigint *big.Int
type Gop_untyped_bigrat *big.Rat
type Gop_untyped_bigfloat *big.Float
type Gop_untyped_bigint_Default = Gop_bigint
type Gop_untyped_bigrat_Default = Gop_bigrat
type Gop_untyped_bigfloat_Default = Gop_bigfloat
func Gop_untyped_bigint_Init__0(x int) Gop_untyped_bigint {
	panic("make compiler happy")
}
func Gop_untyped_bigrat_Init__0(x int) Gop_untyped_bigrat {
	panic("make compiler happy")
}
func Gop_untyped_bigrat_Init__1(x Gop_untyped_bigint) Gop_untyped_bigrat {
	panic("make compiler happy")
}
type Gop_bigint struct {
	*big.Int
}
func tmpint(a, b Gop_bigint) Gop_bigint {
	if Gop_istmp(a) {
		return a
	} else if Gop_istmp(b) {
		return b
	}
	return Gop_bigint{new(big.Int)}
}
func tmpint1(a Gop_bigint) Gop_bigint {
	if Gop_istmp(a) {
		return a
	}
	return Gop_bigint{new(big.Int)}
}
func (a Gop_bigint) IsNil() bool {
	return a.Int == nil
}
func (a Gop_bigint) Gop_Assign(b Gop_bigint) {
	if Gop_istmp(b) {
		*a.Int = *b.Int
	} else {
		a.Int.Set(b.Int)
	}
}
func (a Gop_bigint) Gop_Add(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).Add(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_Sub(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).Sub(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_Mul(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).Mul(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_Quo(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).Quo(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_Rem(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).Rem(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_Or(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).Or(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_Xor(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).Xor(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_And(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).And(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_AndNot(b Gop_bigint) Gop_bigint {
	return Gop_bigint{tmpint(a, b).AndNot(a.Int, b.Int)}
}
func (a Gop_bigint) Gop_Lsh(n Gop_ninteger) Gop_bigint {
	return Gop_bigint{tmpint1(a).Lsh(a.Int, uint(n))}
}
func (a Gop_bigint) Gop_Rsh(n Gop_ninteger) Gop_bigint {
	return Gop_bigint{tmpint1(a).Rsh(a.Int, uint(n))}
}
func (a Gop_bigint) Gop_LT(b Gop_bigint) bool {
	return a.Cmp(b.Int) < 0
}
func (a Gop_bigint) Gop_LE(b Gop_bigint) bool {
	return a.Cmp(b.Int) <= 0
}
func (a Gop_bigint) Gop_GT(b Gop_bigint) bool {
	return a.Cmp(b.Int) > 0
}
func (a Gop_bigint) Gop_GE(b Gop_bigint) bool {
	return a.Cmp(b.Int) >= 0
}
func (a Gop_bigint) Gop_EQ(b Gop_bigint) bool {
	return a.Cmp(b.Int) == 0
}
func (a Gop_bigint) Gop_NE(b Gop_bigint) bool {
	return a.Cmp(b.Int) != 0
}
func (a Gop_bigint) Gop_Neg() Gop_bigint {
	return Gop_bigint{tmpint1(a).Neg(a.Int)}
}
func (a Gop_bigint) Gop_Pos() Gop_bigint {
	return a
}
func (a Gop_bigint) Gop_Not() Gop_bigint {
	return Gop_bigint{tmpint1(a).Not(a.Int)}
}
func (a Gop_bigint) Gop_AddAssign(b Gop_bigint) {
	a.Int.Add(a.Int, b.Int)
}
func (a Gop_bigint) Gop_SubAssign(b Gop_bigint) {
	a.Int.Sub(a.Int, b.Int)
}
func (a Gop_bigint) Gop_MulAssign(b Gop_bigint) {
	a.Int.Mul(a.Int, b.Int)
}
func (a Gop_bigint) Gop_QuoAssign(b Gop_bigint) {
	a.Int.Quo(a.Int, b.Int)
}
func (a Gop_bigint) Gop_RemAssign(b Gop_bigint) {
	a.Int.Rem(a.Int, b.Int)
}
func (a Gop_bigint) Gop_OrAssign(b Gop_bigint) {
	a.Int.Or(a.Int, b.Int)
}
func (a Gop_bigint) Gop_XorAssign(b Gop_bigint) {
	a.Int.Xor(a.Int, b.Int)
}
func (a Gop_bigint) Gop_AndAssign(b Gop_bigint) {
	a.Int.And(a.Int, b.Int)
}
func (a Gop_bigint) Gop_AndNotAssign(b Gop_bigint) {
	a.Int.AndNot(a.Int, b.Int)
}
func (a Gop_bigint) Gop_LshAssign(n Gop_ninteger) {
	a.Int.Lsh(a.Int, uint(n))
}
func (a Gop_bigint) Gop_RshAssign(n Gop_ninteger) {
	a.Int.Rsh(a.Int, uint(n))
}
func Gop_bigint_Cast__0() Gop_bigint {
	return Gop_bigint{new(big.Int)}
}
func Gop_bigint_Cast__1(x int64) Gop_bigint {
	return Gop_bigint{big.NewInt(x)}
}
func Gop_bigint_Cast__2(x int) Gop_bigint {
	return Gop_bigint{big.NewInt(int64(x))}
}
func Gop_bigint_Cast__3(x uint64) Gop_bigint {
	return Gop_bigint{new(big.Int).SetUint64(x)}
}
func Gop_bigint_Cast__4(x uint) Gop_bigint {
	return Gop_bigint{new(big.Int).SetUint64(uint64(x))}
}
func Gop_bigint_Cast__5(x *big.Int) Gop_bigint {
	return Gop_bigint{x}
}
func Gop_bigint_Cast__6(x *big.Rat) Gop_bigint {
	if x.IsInt() {
		return Gop_bigint{x.Num()}
	}
	ret, _ := new(big.Float).SetRat(x).Int(nil)
	return Gop_bigint{ret}
}
func Gop_bigint_Init__0(x int) Gop_bigint {
	return Gop_bigint{big.NewInt(int64(x))}
}
func Gop_bigint_Init__1(x *big.Int) Gop_bigint {
	return Gop_bigint{x}
}
func Gop_bigint_Init__2(x *big.Rat) Gop_bigint {
	if x.IsInt() {
		return Gop_bigint{x.Num()}
	}
	panic("TODO: can't init bigint from bigrat")
}
type Gop_bigrat struct {
	*big.Rat
}
func tmprat(a, b Gop_bigrat) Gop_bigrat {
	if Gop_istmp(a) {
		return a
	} else if Gop_istmp(b) {
		return b
	}
	return Gop_bigrat{new(big.Rat)}
}
func tmprat1(a Gop_bigrat) Gop_bigrat {
	if Gop_istmp(a) {
		return a
	}
	return Gop_bigrat{new(big.Rat)}
}
func (a Gop_bigrat) IsNil() bool {
	return a.Rat == nil
}
func (a Gop_bigrat) Gop_Assign(b Gop_bigrat) {
	if Gop_istmp(b) {
		*a.Rat = *b.Rat
	} else {
		a.Rat.Set(b.Rat)
	}
}
func (a Gop_bigrat) Gop_Add(b Gop_bigrat) Gop_bigrat {
	return Gop_bigrat{tmprat(a, b).Add(a.Rat, b.Rat)}
}
func (a Gop_bigrat) Gop_Sub(b Gop_bigrat) Gop_bigrat {
	return Gop_bigrat{tmprat(a, b).Sub(a.Rat, b.Rat)}
}
func (a Gop_bigrat) Gop_Mul(b Gop_bigrat) Gop_bigrat {
	return Gop_bigrat{tmprat(a, b).Mul(a.Rat, b.Rat)}
}
func (a Gop_bigrat) Gop_Quo(b Gop_bigrat) Gop_bigrat {
	return Gop_bigrat{tmprat(a, b).Quo(a.Rat, b.Rat)}
}
func (a Gop_bigrat) Gop_LT(b Gop_bigrat) bool {
	return a.Cmp(b.Rat) < 0
}
func (a Gop_bigrat) Gop_LE(b Gop_bigrat) bool {
	return a.Cmp(b.Rat) <= 0
}
func (a Gop_bigrat) Gop_GT(b Gop_bigrat) bool {
	return a.Cmp(b.Rat) > 0
}
func (a Gop_bigrat) Gop_GE(b Gop_bigrat) bool {
	return a.Cmp(b.Rat) >= 0
}
func (a Gop_bigrat) Gop_EQ(b Gop_bigrat) bool {
	return a.Cmp(b.Rat) == 0
}
func (a Gop_bigrat) Gop_NE(b Gop_bigrat) bool {
	return a.Cmp(b.Rat) != 0
}
func (a Gop_bigrat) Gop_Neg() Gop_bigrat {
	return Gop_bigrat{tmprat1(a).Neg(a.Rat)}
}
func (a Gop_bigrat) Gop_Pos() Gop_bigrat {
	return a
}
func (a Gop_bigrat) Gop_Inv() Gop_bigrat {
	return Gop_bigrat{tmprat1(a).Inv(a.Rat)}
}
func (a Gop_bigrat) Gop_AddAssign(b Gop_bigrat) {
	a.Rat.Add(a.Rat, b.Rat)
}
func (a Gop_bigrat) Gop_SubAssign(b Gop_bigrat) {
	a.Rat.Sub(a.Rat, b.Rat)
}
func (a Gop_bigrat) Gop_MulAssign(b Gop_bigrat) {
	a.Rat.Mul(a.Rat, b.Rat)
}
func (a Gop_bigrat) Gop_QuoAssign(b Gop_bigrat) {
	a.Rat.Quo(a.Rat, b.Rat)
}
func Gop_bigrat_Cast__0() Gop_bigrat {
	return Gop_bigrat{new(big.Rat)}
}