internal.types.int

Standard library module View source
class Int
@extend
class Int[N]
Constructors 5
__new__
__new__()
__new__
@overload
__new__(what: Int[M], M: Literal[int])
__new__
@overload
__new__(what: UInt[M], M: Literal[int])
__new__
@overload
__new__(what: str, base: int)
__new__
@overload
__new__(what)
Properties 2
real
@property
real(self)
imag
@property
imag(self)
Methods 4
cdiv
cdiv(self, other: Int[N])
cmod
cmod(self, other: Int[N])
popcnt
popcnt(self)
bit_length
bit_length(self)
Special methods 42
__int__
__int__(self)
__index__
__index__(self)
__copy__
__copy__(self)
__deepcopy__
__deepcopy__(self)
__hash__
__hash__(self)
__float__
@pure @llvm
__float__(self)
%0 = sitofp i{=N} %self to double
ret double %0
__bool__
@pure @llvm
__bool__(self)
%0 = icmp ne i{=N} %self, 0
%1 = zext i1 %0 to i8
ret i8 %1
__pos__
__pos__(self)
__neg__
@pure @llvm
__neg__(self)
%0 = sub i{=N} 0, %self
ret i{=N} %0
__invert__
@pure @llvm
__invert__(self)
%0 = xor i{=N} %self, -1
ret i{=N} %0
__abs__
@pure @llvm
__abs__(self)
declare i{=N} @llvm.abs.i{=N}(i{=N}, i1)
%0 = call i{=N} @llvm.abs.i{=N}(i{=N} %self, i1 false)
ret i{=N} %0
__add__
@pure @commutative @associative @llvm
__add__(self, other: Int[N])
%0 = add i{=N} %self, %other
ret i{=N} %0
__sub__
@pure @llvm
__sub__(self, other: Int[N])
%0 = sub i{=N} %self, %other
ret i{=N} %0
__mul__
@pure @commutative @associative @distributive @llvm
__mul__(self, other: Int[N])
%0 = mul i{=N} %self, %other
ret i{=N} %0
__floordiv__
__floordiv__(self, other: Int[N])
__truediv__
__truediv__(self, other: Int[N])
__mod__
__mod__(self, other: Int[N])
__divmod__
__divmod__(self, other: Int[N])
__lshift__
__lshift__(self, other: Int[N])
__lshift__(self, other: int)
__rshift__
__rshift__(self, other: Int[N])
__rshift__(self, other: int)
__eq__
@pure @llvm
__eq__(self, other: Int[N])
%0 = icmp eq i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ne__
@pure @llvm
__ne__(self, other: Int[N])
%0 = icmp ne i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__lt__
@pure @llvm
__lt__(self, other: Int[N])
%0 = icmp slt i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__gt__
@pure @llvm
__gt__(self, other: Int[N])
%0 = icmp sgt i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__le__
@pure @llvm
__le__(self, other: Int[N])
%0 = icmp sle i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ge__
@pure @llvm
__ge__(self, other: Int[N])
%0 = icmp sge i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__and__
@pure @commutative @associative @llvm
__and__(self, other: Int[N])
%0 = and i{=N} %self, %other
ret i{=N} %0
__or__
@pure @commutative @associative @llvm
__or__(self, other: Int[N])
%0 = or i{=N} %self, %other
ret i{=N} %0
__xor__
@pure @commutative @associative @llvm
__xor__(self, other: Int[N])
%0 = xor i{=N} %self, %other
ret i{=N} %0
__pow__
__pow__(self, exp: Int[N])
__pow__(self, exp: Literal[int])
__repr__
__repr__(self)
__match__
__match__(self, obj: Int[N])
__round__
__round__(self, ndigits = None)
__atomic_xchg__
@nocapture @llvm
__atomic_xchg__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw xchg ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_add__
@nocapture @llvm
__atomic_add__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw add ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_sub__
@nocapture @llvm
__atomic_sub__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw sub ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_and__
@nocapture @llvm
__atomic_and__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw and ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_nand__
@nocapture @llvm
__atomic_nand__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw nand ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_or__
@nocapture @llvm
__atomic_or__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw or ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_xor__
@nocapture @llvm
__atomic_xor__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw xor ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_min__
@nocapture @llvm
__atomic_min__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw min ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_max__
@nocapture @llvm
__atomic_max__(d: Ptr[Int[N]], b: Int[N])
%tmp = atomicrmw max ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
class UInt
@extend
class UInt[N]
Constructors 4
__new__
__new__()
__new__
@overload
__new__(what: UInt[M], M: Literal[int])
__new__
@overload
__new__(what: Int[M], M: Literal[int])
__new__
__new__(what: str, base: int = 10)
Properties 2
real
@property
real(self)
imag
@property
imag(self)
Methods 4
cdiv
cdiv(self, other: UInt[N])
cmod
cmod(self, other: UInt[N])
popcnt
popcnt(self)
bit_length
bit_length(self)
Special methods 42
__int__
__int__(self)
__index__
__index__(self)
__copy__
__copy__(self)
__deepcopy__
__deepcopy__(self)
__hash__
__hash__(self)
__float__
@pure @llvm
__float__(self)
%0 = uitofp i{=N} %self to double
ret double %0
__bool__
@pure @llvm
__bool__(self)
%0 = icmp ne i{=N} %self, 0
%1 = zext i1 %0 to i8
ret i8 %1
__pos__
__pos__(self)
__neg__
@pure @llvm
__neg__(self)
%0 = sub i{=N} 0, %self
ret i{=N} %0
__invert__
@pure @llvm
__invert__(self)
%0 = xor i{=N} %self, -1
ret i{=N} %0
__abs__
__abs__(self)
__add__
@pure @commutative @associative @llvm
__add__(self, other: UInt[N])
%0 = add i{=N} %self, %other
ret i{=N} %0
__sub__
@pure @llvm
__sub__(self, other: UInt[N])
%0 = sub i{=N} %self, %other
ret i{=N} %0
__mul__
@pure @commutative @associative @distributive @llvm
__mul__(self, other: UInt[N])
%0 = mul i{=N} %self, %other
ret i{=N} %0
__floordiv__
__floordiv__(self, other: UInt[N])
__truediv__
__truediv__(self, other: UInt[N])
__mod__
__mod__(self, other: UInt[N])
__divmod__
__divmod__(self, other: UInt[N])
__lshift__
__lshift__(self, other: UInt[N])
__lshift__(self, other: int)
__rshift__
__rshift__(self, other: UInt[N])
__rshift__(self, other: int)
__eq__
@pure @llvm
__eq__(self, other: UInt[N])
%0 = icmp eq i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ne__
@pure @llvm
__ne__(self, other: UInt[N])
%0 = icmp ne i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__lt__
@pure @llvm
__lt__(self, other: UInt[N])
%0 = icmp ult i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__gt__
@pure @llvm
__gt__(self, other: UInt[N])
%0 = icmp ugt i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__le__
@pure @llvm
__le__(self, other: UInt[N])
%0 = icmp ule i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ge__
@pure @llvm
__ge__(self, other: UInt[N])
%0 = icmp uge i{=N} %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__and__
@pure @commutative @associative @llvm
__and__(self, other: UInt[N])
%0 = and i{=N} %self, %other
ret i{=N} %0
__or__
@pure @commutative @associative @llvm
__or__(self, other: UInt[N])
%0 = or i{=N} %self, %other
ret i{=N} %0
__xor__
@pure @commutative @associative @llvm
__xor__(self, other: UInt[N])
%0 = xor i{=N} %self, %other
ret i{=N} %0
__pow__
__pow__(self, exp: UInt[N])
__pow__(self, exp: Literal[int])
__repr__
__repr__(self)
__match__
__match__(self, obj: UInt[N])
__round__
__round__(self, ndigits = None)
__atomic_xchg__
@nocapture @llvm
__atomic_xchg__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw xchg ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_add__
@nocapture @llvm
__atomic_add__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw add ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_sub__
@nocapture @llvm
__atomic_sub__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw sub ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_and__
@nocapture @llvm
__atomic_and__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw and ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_nand__
@nocapture @llvm
__atomic_nand__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw nand ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_or__
@nocapture @llvm
__atomic_or__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw or ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_xor__
@nocapture @llvm
__atomic_xor__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw xor ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_min__
@nocapture @llvm
__atomic_min__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw umin ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp
__atomic_max__
@nocapture @llvm
__atomic_max__(d: Ptr[UInt[N]], b: UInt[N])
%tmp = atomicrmw umax ptr %d, i{=N} %b seq_cst
ret i{=N} %tmp