float16
class float16
Constructors
11
__new__(what: Int[N], N: Literal[int])
Added by
internal.ops%0 = sitofp i{=N} %what to half
ret half %0
__new__(what: UInt[N], N: Literal[int])
Added by
internal.ops%0 = uitofp i{=N} %what to half
ret half %0
__new__(what: bfloat16)
Added by
internal.ops%0 = fpext bfloat %what to float
%1 = fptrunc float %0 to half
ret half %1
Methods
2
Special methods
35
__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__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__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__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)
Added by
internal.types.float__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)
Added by
internal.types.float__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)
Added by
internal.types.float__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)
Added by
internal.types.float__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__pow__(a: float16, b: float16)
Added by
internal.types.floatdeclare half @llvm.pow.f16(half %a, half %b)
%tmp = call half @llvm.pow.f16(half %a, half %b)
ret half %tmp
__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__eq__(a: float16, b: float16)
Added by
internal.types.float%tmp = fcmp oeq half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__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__ne__(a: float16, b: float16)
Added by
internal.types.float%tmp = fcmp une half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__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__lt__(a: float16, b: float16)
Added by
internal.types.float%tmp = fcmp olt half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__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__gt__(a: float16, b: float16)
Added by
internal.types.float%tmp = fcmp ogt half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__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__le__(a: float16, b: float16)
Added by
internal.types.float%tmp = fcmp ole half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__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__ge__(a: float16, b: float16)
Added by
internal.types.float%tmp = fcmp oge half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__bool__(self)
Added by
internal.types.float%0 = fcmp une half %self, 0.000000e+00
%1 = zext i1 %0 to i8
ret i8 %1
__abs__(a: float16)
Added by
internal.types.floatdeclare half @llvm.fabs.f16(half %a)
%tmp = call half @llvm.fabs.f16(half %a)
ret half %tmp
__floor__(a: float16)
Added by
internal.types.floatdeclare half @llvm.floor.f16(half %a)
%tmp = call half @llvm.floor.f16(half %a)
ret half %tmp
__ceil__(a: float16)
Added by
internal.types.floatdeclare half @llvm.ceil.f16(half %a)
%tmp = call half @llvm.ceil.f16(half %a)
ret half %tmp
__trunc__(a: float16)
Added by
internal.types.floatdeclare half @llvm.trunc.f16(half %a)
%tmp = call half @llvm.trunc.f16(half %a)
ret half %tmp