float16

Standard library class
class float16
@tuple
class float16
Constructors 11
__new__
__new__(what)
Added by internal.ops
__new__
__new__(what: bool)
Added by internal.ops
__new__
@pure @llvm
__new__(what: Int[N], N: Literal[int])
Added by internal.ops
%0 = sitofp i{=N} %what to half
ret half %0
__new__
@pure @llvm
__new__(what: UInt[N], N: Literal[int])
Added by internal.ops
%0 = uitofp i{=N} %what to half
ret half %0
__new__
@pure @llvm
__new__(what: float128)
Added by internal.ops
%0 = fptrunc fp128 %what to half
ret half %0
__new__
@pure @llvm
__new__(what: float32)
Added by internal.ops
%0 = fptrunc float %what to half
ret half %0
__new__
@pure @llvm
__new__(what: bfloat16)
Added by internal.ops
%0 = fpext bfloat %what to float
%1 = fptrunc float %0 to half
ret half %1
__new__
@pure @llvm
__new__(self: float)
%0 = fptrunc double %self to half
ret half %0
__new__
@overload
__new__(what: float16)
__new__
@overload
__new__(what: str)
__new__
@overload
__new__()
Methods 2
cdiv
cdiv(self, other: float16)
cmod
cmod(self, other: float16)
Special methods 35
__add__
@commutative
__add__(self, b: float)
Added by internal.ops
__add__(self, b: float128)
Added by internal.ops
__add__(self, b: float32)
Added by internal.ops
__add__(self, b: bfloat16)
Added by internal.ops
__add__(self, b: Int)
Added by internal.ops
__add__(self, b: UInt)
Added by internal.ops
__add__(self, b: bool)
Added by internal.ops
@pure @llvm
__add__(a: float16, b: float16)
%tmp = fadd half %a, %b
ret half %tmp
__sub__
__sub__(self, b: float)
Added by internal.ops
__sub__(self, b: float128)
Added by internal.ops
__sub__(self, b: float32)
Added by internal.ops
__sub__(self, b: bfloat16)
Added by internal.ops
__sub__(self, b: Int)
Added by internal.ops
__sub__(self, b: UInt)
Added by internal.ops
__sub__(self, b: bool)
Added by internal.ops
@pure @llvm
__sub__(a: float16, b: float16)
%tmp = fsub half %a, %b
ret half %tmp
__mul__
@commutative
__mul__(self, b: float)
Added by internal.ops
__mul__(self, b: float128)
Added by internal.ops
__mul__(self, b: float32)
Added by internal.ops
__mul__(self, b: bfloat16)
Added by internal.ops
__mul__(self, b: Int)
Added by internal.ops
__mul__(self, b: UInt)
Added by internal.ops
__mul__(self, b: bool)
Added by internal.ops
@pure @llvm
__mul__(a: float16, b: float16)
%tmp = fmul half %a, %b
ret half %tmp
__floordiv__
__floordiv__(self, b: float)
Added by internal.ops
__floordiv__(self, b: float128)
Added by internal.ops
__floordiv__(self, b: float32)
Added by internal.ops
__floordiv__(self, b: bfloat16)
Added by internal.ops
__floordiv__(self, b: Int)
Added by internal.ops
__floordiv__(self, b: UInt)
Added by internal.ops
__floordiv__(self, b: bool)
Added by internal.ops
__floordiv__(self, other: float16)
__truediv__
__truediv__(self, b: float)
Added by internal.ops
__truediv__(self, b: float128)
Added by internal.ops
__truediv__(self, b: float32)
Added by internal.ops
__truediv__(self, b: bfloat16)
Added by internal.ops
__truediv__(self, b: Int)
Added by internal.ops
__truediv__(self, b: UInt)
Added by internal.ops
__truediv__(self, b: bool)
Added by internal.ops
__truediv__(self, other: float16)
__mod__
__mod__(self, b: float)
Added by internal.ops
__mod__(self, b: float128)
Added by internal.ops
__mod__(self, b: float32)
Added by internal.ops
__mod__(self, b: bfloat16)
Added by internal.ops
__mod__(self, b: Int)
Added by internal.ops
__mod__(self, b: UInt)
Added by internal.ops
__mod__(self, b: bool)
Added by internal.ops
__mod__(self, other: float16)
__divmod__
__divmod__(self, b: float)
Added by internal.ops
__divmod__(self, b: float128)
Added by internal.ops
__divmod__(self, b: float32)
Added by internal.ops
__divmod__(self, b: bfloat16)
Added by internal.ops
__divmod__(self, b: Int)
Added by internal.ops
__divmod__(self, b: UInt)
Added by internal.ops
__divmod__(self, b: bool)
Added by internal.ops
__divmod__(self, other: float16)
__pow__
__pow__(self, b: float)
Added by internal.ops
__pow__(self, b: float128)
Added by internal.ops
__pow__(self, b: float32)
Added by internal.ops
__pow__(self, b: bfloat16)
Added by internal.ops
__pow__(self, b: Int)
Added by internal.ops
__pow__(self, b: UInt)
Added by internal.ops
__pow__(self, b: bool)
Added by internal.ops
@pure @llvm
__pow__(a: float16, b: float16)
declare half @llvm.pow.f16(half %a, half %b)
%tmp = call half @llvm.pow.f16(half %a, half %b)
ret half %tmp
__eq__
__eq__(self, b: float)
Added by internal.ops
__eq__(self, b: float128)
Added by internal.ops
__eq__(self, b: float32)
Added by internal.ops
__eq__(self, b: bfloat16)
Added by internal.ops
__eq__(self, b: Int)
Added by internal.ops
__eq__(self, b: UInt)
Added by internal.ops
__eq__(self, b: bool)
Added by internal.ops
@pure @llvm
__eq__(a: float16, b: float16)
%tmp = fcmp oeq half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__ne__
__ne__(self, b: float)
Added by internal.ops
__ne__(self, b: float128)
Added by internal.ops
__ne__(self, b: float32)
Added by internal.ops
__ne__(self, b: bfloat16)
Added by internal.ops
__ne__(self, b: Int)
Added by internal.ops
__ne__(self, b: UInt)
Added by internal.ops
__ne__(self, b: bool)
Added by internal.ops
@pure @llvm
__ne__(a: float16, b: float16)
%tmp = fcmp une half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__lt__
__lt__(self, b: float)
Added by internal.ops
__lt__(self, b: float128)
Added by internal.ops
__lt__(self, b: float32)
Added by internal.ops
__lt__(self, b: bfloat16)
Added by internal.ops
__lt__(self, b: Int)
Added by internal.ops
__lt__(self, b: UInt)
Added by internal.ops
__lt__(self, b: bool)
Added by internal.ops
@pure @llvm
__lt__(a: float16, b: float16)
%tmp = fcmp olt half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__gt__
__gt__(self, b: float)
Added by internal.ops
__gt__(self, b: float128)
Added by internal.ops
__gt__(self, b: float32)
Added by internal.ops
__gt__(self, b: bfloat16)
Added by internal.ops
__gt__(self, b: Int)
Added by internal.ops
__gt__(self, b: UInt)
Added by internal.ops
__gt__(self, b: bool)
Added by internal.ops
@pure @llvm
__gt__(a: float16, b: float16)
%tmp = fcmp ogt half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__le__
__le__(self, b: float)
Added by internal.ops
__le__(self, b: float128)
Added by internal.ops
__le__(self, b: float32)
Added by internal.ops
__le__(self, b: bfloat16)
Added by internal.ops
__le__(self, b: Int)
Added by internal.ops
__le__(self, b: UInt)
Added by internal.ops
__le__(self, b: bool)
Added by internal.ops
@pure @llvm
__le__(a: float16, b: float16)
%tmp = fcmp ole half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__ge__
__ge__(self, b: float)
Added by internal.ops
__ge__(self, b: float128)
Added by internal.ops
__ge__(self, b: float32)
Added by internal.ops
__ge__(self, b: bfloat16)
Added by internal.ops
__ge__(self, b: Int)
Added by internal.ops
__ge__(self, b: UInt)
Added by internal.ops
__ge__(self, b: bool)
Added by internal.ops
@pure @llvm
__ge__(a: float16, b: float16)
%tmp = fcmp oge half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__to_gpu__
__to_gpu__(self, cache: AllocCache)
Added by internal.gpu
__from_gpu__
__from_gpu__(self, other: float16)
Added by internal.gpu
__from_gpu_new__
__from_gpu_new__(other: float16)
Added by internal.gpu
__repr__
__repr__(self)
__format__
__format__(self, format_spec: str)
__copy__
__copy__(self)
__deepcopy__
__deepcopy__(self)
__int__
@pure @llvm
__int__(self)
%0 = fptosi half %self to i64
ret i64 %0
__float__
@pure @llvm
__float__(self)
%0 = fpext half %self to double
ret double %0
__bool__
@pure @llvm
__bool__(self)
%0 = fcmp une half %self, 0.000000e+00
%1 = zext i1 %0 to i8
ret i8 %1
__pos__
__pos__(self)
__neg__
@pure @llvm
__neg__(self)
%0 = fneg half %self
ret half %0
__abs__
@pure @llvm
__abs__(a: float16)
declare half @llvm.fabs.f16(half %a)
%tmp = call half @llvm.fabs.f16(half %a)
ret half %tmp
__floor__
@pure @llvm
__floor__(a: float16)
declare half @llvm.floor.f16(half %a)
%tmp = call half @llvm.floor.f16(half %a)
ret half %tmp
__ceil__
@pure @llvm
__ceil__(a: float16)
declare half @llvm.ceil.f16(half %a)
%tmp = call half @llvm.ceil.f16(half %a)
ret half %tmp
__trunc__
@pure @llvm
__trunc__(a: float16)
declare half @llvm.trunc.f16(half %a)
%tmp = call half @llvm.trunc.f16(half %a)
ret half %tmp
__hash__
__hash__(self)
__match__
__match__(self, obj: float16)
__complex__
__complex__(self)
__pickle__
__pickle__(self, jar: Jar)
Added by pickle
__unpickle__
__unpickle__(jar: Jar)
Added by pickle