float16
class float16
Constructors
11
__new__(self: float) -> float16
Added by
internal.types.float%0 = fptrunc double %self to half
ret half %0
__new__[N: Literal[int]](what: Int[N]) -> float16
Added by
internal.ops%0 = sitofp i{=N} %what to half
ret half %0
__new__[N: Literal[int]](what: UInt[N]) -> float16
Added by
internal.ops%0 = uitofp i{=N} %what to half
ret half %0
__new__(what: float128) -> float16
Added by
internal.ops%0 = fptrunc fp128 %what to half
ret half %0
__new__(what: bfloat16) -> float16
Added by
internal.ops%0 = fpext bfloat %what to float
%1 = fptrunc float %0 to half
ret half %1
Methods
2
Special methods
35
__float__(self: Self) -> float
Added by
internal.types.float%0 = fpext half %self to double
ret double %0
__bool__(self: Self) -> bool
Added by
internal.types.float%0 = fcmp une half %self, 0.000000e+00
%1 = zext i1 %0 to i8
ret i8 %1
__add__(a: float16, b: float16) -> float16
Added by
internal.types.float%tmp = fadd half %a, %b
ret half %tmp
__add__(self: Self, b: float)
Added by
internal.ops__add__(self: Self, b: float128)
Added by
internal.ops__add__(self: Self, b: float32)
Added by
internal.ops__add__(self: Self, b: bfloat16)
Added by
internal.ops__add__(self: Self, b: Int)
Added by
internal.ops__add__(self: Self, b: UInt)
Added by
internal.ops__add__(self: Self, b: bool)
Added by
internal.ops__sub__(a: float16, b: float16) -> float16
Added by
internal.types.float%tmp = fsub half %a, %b
ret half %tmp
__sub__(self: Self, b: float)
Added by
internal.ops__sub__(self: Self, b: float128)
Added by
internal.ops__sub__(self: Self, b: float32)
Added by
internal.ops__sub__(self: Self, b: bfloat16)
Added by
internal.ops__sub__(self: Self, b: Int)
Added by
internal.ops__sub__(self: Self, b: UInt)
Added by
internal.ops__sub__(self: Self, b: bool)
Added by
internal.ops__mul__(a: float16, b: float16) -> float16
Added by
internal.types.float%tmp = fmul half %a, %b
ret half %tmp
__mul__(self: Self, b: float)
Added by
internal.ops__mul__(self: Self, b: float128)
Added by
internal.ops__mul__(self: Self, b: float32)
Added by
internal.ops__mul__(self: Self, b: bfloat16)
Added by
internal.ops__mul__(self: Self, b: Int)
Added by
internal.ops__mul__(self: Self, b: UInt)
Added by
internal.ops__mul__(self: Self, b: bool)
Added by
internal.ops__floordiv__(self: Self, other: float16) -> float16
Added by
internal.types.float__floordiv__(self: Self, b: float)
Added by
internal.ops__floordiv__(self: Self, b: float128)
Added by
internal.ops__floordiv__(self: Self, b: float32)
Added by
internal.ops__floordiv__(self: Self, b: bfloat16)
Added by
internal.ops__floordiv__(self: Self, b: Int)
Added by
internal.ops__floordiv__(self: Self, b: UInt)
Added by
internal.ops__floordiv__(self: Self, b: bool)
Added by
internal.ops__truediv__(self: Self, other: float16) -> float16
Added by
internal.types.float__truediv__(self: Self, b: float)
Added by
internal.ops__truediv__(self: Self, b: float128)
Added by
internal.ops__truediv__(self: Self, b: float32)
Added by
internal.ops__truediv__(self: Self, b: bfloat16)
Added by
internal.ops__truediv__(self: Self, b: Int)
Added by
internal.ops__truediv__(self: Self, b: UInt)
Added by
internal.ops__truediv__(self: Self, b: bool)
Added by
internal.ops__mod__(self: Self, other: float16) -> float16
Added by
internal.types.float__mod__(self: Self, b: float)
Added by
internal.ops__mod__(self: Self, b: float128)
Added by
internal.ops__mod__(self: Self, b: float32)
Added by
internal.ops__mod__(self: Self, b: bfloat16)
Added by
internal.ops__mod__(self: Self, b: Int)
Added by
internal.ops__mod__(self: Self, b: UInt)
Added by
internal.ops__mod__(self: Self, b: bool)
Added by
internal.ops__divmod__(self: Self, other: float16) -> Tuple[(float16, float16)]
Added by
internal.types.float__divmod__(self: Self, b: float)
Added by
internal.ops__divmod__(self: Self, b: float128)
Added by
internal.ops__divmod__(self: Self, b: float32)
Added by
internal.ops__divmod__(self: Self, b: bfloat16)
Added by
internal.ops__divmod__(self: Self, b: Int)
Added by
internal.ops__divmod__(self: Self, b: UInt)
Added by
internal.ops__divmod__(self: Self, b: bool)
Added by
internal.ops__eq__(a: float16, b: float16) -> bool
Added by
internal.types.float%tmp = fcmp oeq half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__eq__(self: Self, b: float)
Added by
internal.ops__eq__(self: Self, b: float128)
Added by
internal.ops__eq__(self: Self, b: float32)
Added by
internal.ops__eq__(self: Self, b: bfloat16)
Added by
internal.ops__eq__(self: Self, b: Int)
Added by
internal.ops__eq__(self: Self, b: UInt)
Added by
internal.ops__eq__(self: Self, b: bool)
Added by
internal.ops__ne__(a: float16, b: float16) -> bool
Added by
internal.types.float%tmp = fcmp une half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__ne__(self: Self, b: float)
Added by
internal.ops__ne__(self: Self, b: float128)
Added by
internal.ops__ne__(self: Self, b: float32)
Added by
internal.ops__ne__(self: Self, b: bfloat16)
Added by
internal.ops__ne__(self: Self, b: Int)
Added by
internal.ops__ne__(self: Self, b: UInt)
Added by
internal.ops__ne__(self: Self, b: bool)
Added by
internal.ops__lt__(a: float16, b: float16) -> bool
Added by
internal.types.float%tmp = fcmp olt half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__lt__(self: Self, b: float)
Added by
internal.ops__lt__(self: Self, b: float128)
Added by
internal.ops__lt__(self: Self, b: float32)
Added by
internal.ops__lt__(self: Self, b: bfloat16)
Added by
internal.ops__lt__(self: Self, b: Int)
Added by
internal.ops__lt__(self: Self, b: UInt)
Added by
internal.ops__lt__(self: Self, b: bool)
Added by
internal.ops__gt__(a: float16, b: float16) -> bool
Added by
internal.types.float%tmp = fcmp ogt half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__gt__(self: Self, b: float)
Added by
internal.ops__gt__(self: Self, b: float128)
Added by
internal.ops__gt__(self: Self, b: float32)
Added by
internal.ops__gt__(self: Self, b: bfloat16)
Added by
internal.ops__gt__(self: Self, b: Int)
Added by
internal.ops__gt__(self: Self, b: UInt)
Added by
internal.ops__gt__(self: Self, b: bool)
Added by
internal.ops__le__(a: float16, b: float16) -> bool
Added by
internal.types.float%tmp = fcmp ole half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__le__(self: Self, b: float)
Added by
internal.ops__le__(self: Self, b: float128)
Added by
internal.ops__le__(self: Self, b: float32)
Added by
internal.ops__le__(self: Self, b: bfloat16)
Added by
internal.ops__le__(self: Self, b: Int)
Added by
internal.ops__le__(self: Self, b: UInt)
Added by
internal.ops__le__(self: Self, b: bool)
Added by
internal.ops__ge__(a: float16, b: float16) -> bool
Added by
internal.types.float%tmp = fcmp oge half %a, %b
%res = zext i1 %tmp to i8
ret i8 %res
__ge__(self: Self, b: float)
Added by
internal.ops__ge__(self: Self, b: float128)
Added by
internal.ops__ge__(self: Self, b: float32)
Added by
internal.ops__ge__(self: Self, b: bfloat16)
Added by
internal.ops__ge__(self: Self, b: Int)
Added by
internal.ops__ge__(self: Self, b: UInt)
Added by
internal.ops__ge__(self: Self, b: bool)
Added by
internal.ops__abs__(a: float16) -> 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) -> 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) -> 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) -> float16
Added by
internal.types.floatdeclare half @llvm.trunc.f16(half %a)
%tmp = call half @llvm.trunc.f16(half %a)
ret half %tmp
__pow__(a: float16, b: float16) -> 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
__pow__(self: Self, b: float)
Added by
internal.ops__pow__(self: Self, b: float128)
Added by
internal.ops__pow__(self: Self, b: float32)
Added by
internal.ops__pow__(self: Self, b: bfloat16)
Added by
internal.ops__pow__(self: Self, b: Int)
Added by
internal.ops__pow__(self: Self, b: UInt)
Added by
internal.ops__pow__(self: Self, b: bool)
Added by
internal.ops