Skip to main content

float32

Standard library class internal.core.float32 View source
class float32
@tuple
class float32
Constructors 11
__new__
@pure @llvm
__new__(self: float) -> float32
%0 = fptrunc double %self to float
ret float %0
__new__
@overload
__new__(what: float32) -> float32
__new__
@overload
__new__(what: str) -> float32
__new__
@overload
__new__() -> float32
__new__
__new__(what) -> float32
Added by internal.ops
__new__
__new__(what: bool) -> float32
Added by internal.ops
__new__
@pure @llvm
__new__[N: Literal[int]](what: Int[N]) -> float32
Added by internal.ops
%0 = sitofp i{=N} %what to float
ret float %0
__new__
@pure @llvm
__new__[N: Literal[int]](what: UInt[N]) -> float32
Added by internal.ops
%0 = uitofp i{=N} %what to float
ret float %0
__new__
@pure @llvm
__new__(what: float128) -> float32
Added by internal.ops
%0 = fptrunc fp128 %what to float
ret float %0
__new__
@pure @llvm
__new__(what: float16) -> float32
Added by internal.ops
%0 = fpext half %what to float
ret float %0
__new__
@pure @llvm
__new__(what: bfloat16) -> float32
Added by internal.ops
%0 = fpext bfloat %what to float
ret float %0
Methods 2
cdiv
cdiv(self: Self, other: float32) -> float32
cmod
cmod(self: Self, other: float32) -> float32
Special methods 38
__repr__
__repr__(self: Self) -> str
__format__
__format__(self: Self, format_spec: str) -> str
__copy__
__copy__(self: Self) -> float32
__deepcopy__
__deepcopy__(self: Self) -> float32
__int__
@pure @llvm
__int__(self: Self) -> int
%0 = fptosi float %self to i64
ret i64 %0
__float__
@pure @llvm
__float__(self: Self) -> float
%0 = fpext float %self to double
ret double %0
__bool__
@pure @llvm
__bool__(self: Self) -> bool
%0 = fcmp une float %self, 0.000000e+00
%1 = zext i1 %0 to i8
ret i8 %1
__pos__
__pos__(self: Self) -> float32
__neg__
@pure @llvm
__neg__(self: Self) -> float32
%0 = fneg float %self
ret float %0
__add__
@commutative
@pure @llvm
__add__(a: float32, b: float32) -> float32
%tmp = fadd float %a, %b
ret float %tmp
__add__(self: Self, b: float)
Added by internal.ops
__add__(self: Self, b: float128)
Added by internal.ops
__add__(self: Self, b: float16)
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__
@pure @llvm
__sub__(a: float32, b: float32) -> float32
%tmp = fsub float %a, %b
ret float %tmp
__sub__(self: Self, b: float)
Added by internal.ops
__sub__(self: Self, b: float128)
Added by internal.ops
__sub__(self: Self, b: float16)
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__
@commutative
@pure @llvm
__mul__(a: float32, b: float32) -> float32
%tmp = fmul float %a, %b
ret float %tmp
__mul__(self: Self, b: float)
Added by internal.ops
__mul__(self: Self, b: float128)
Added by internal.ops
__mul__(self: Self, b: float16)
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__
__floordiv__(self: Self, other: float32) -> float32
__floordiv__(self: Self, b: float)
Added by internal.ops
__floordiv__(self: Self, b: float128)
Added by internal.ops
__floordiv__(self: Self, b: float16)
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__
__truediv__(self: Self, other: float32) -> float32
__truediv__(self: Self, b: float)
Added by internal.ops
__truediv__(self: Self, b: float128)
Added by internal.ops
__truediv__(self: Self, b: float16)
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__
__mod__(self: Self, other: float32) -> float32
__mod__(self: Self, b: float)
Added by internal.ops
__mod__(self: Self, b: float128)
Added by internal.ops
__mod__(self: Self, b: float16)
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__
__divmod__(self: Self, other: float32) -> Tuple[(float32, float32)]
__divmod__(self: Self, b: float)
Added by internal.ops
__divmod__(self: Self, b: float128)
Added by internal.ops
__divmod__(self: Self, b: float16)
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__
@pure @llvm
__eq__(a: float32, b: float32) -> bool
%tmp = fcmp oeq float %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: float16)
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__
@pure @llvm
__ne__(a: float32, b: float32) -> bool
%tmp = fcmp une float %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: float16)
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__
@pure @llvm
__lt__(a: float32, b: float32) -> bool
%tmp = fcmp olt float %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: float16)
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__
@pure @llvm
__gt__(a: float32, b: float32) -> bool
%tmp = fcmp ogt float %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: float16)
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__
@pure @llvm
__le__(a: float32, b: float32) -> bool
%tmp = fcmp ole float %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: float16)
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__
@pure @llvm
__ge__(a: float32, b: float32) -> bool
%tmp = fcmp oge float %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: float16)
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__
@pure @llvm
__abs__(a: float32) -> float32
declare float @llvm.fabs.f32(float %a)
%tmp = call float @llvm.fabs.f32(float %a)
ret float %tmp
__floor__
@pure @llvm
__floor__(a: float32) -> float32
declare float @llvm.floor.f32(float %a)
%tmp = call float @llvm.floor.f32(float %a)
ret float %tmp
__ceil__
@pure @llvm
__ceil__(a: float32) -> float32
declare float @llvm.ceil.f32(float %a)
%tmp = call float @llvm.ceil.f32(float %a)
ret float %tmp
__trunc__
@pure @llvm
__trunc__(a: float32) -> float32
declare float @llvm.trunc.f32(float %a)
%tmp = call float @llvm.trunc.f32(float %a)
ret float %tmp
__pow__
@pure @llvm
__pow__(a: float32, b: float32) -> float32
declare float @llvm.pow.f32(float %a, float %b)
%tmp = call float @llvm.pow.f32(float %a, float %b)
ret float %tmp
__pow__(self: Self, b: float)
Added by internal.ops
__pow__(self: Self, b: float128)
Added by internal.ops
__pow__(self: Self, b: float16)
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
__atomic_xchg__
@nocapture @llvm
__atomic_xchg__(d: Ptr[float32], b: float32) -> None
%tmp = atomicrmw xchg ptr %d, float %b seq_cst
ret {} {}
__atomic_add__
@nocapture @llvm
__atomic_add__(d: Ptr[float32], b: float32) -> float32
0:
%1 = load atomic i32, ptr %d monotonic, align 4
%2 = bitcast i32 %1 to float
%3 = fadd float %2, %b
%4 = bitcast float %3 to i32
%5 = cmpxchg weak ptr %d, i32 %1, i32 %4 seq_cst monotonic, align 4
%6 = extractvalue { i32, i1 } %5, 1
br i1 %6, label %15, label %7
7: ; preds = %0, %7
%8 = phi { i32, i1 } [ %13, %7 ], [ %5, %0 ]
%9 = extractvalue { i32, i1 } %8, 0
%10 = bitcast i32 %9 to float
%11 = fadd float %10, %b
%12 = bitcast float %11 to i32
%13 = cmpxchg weak ptr %d, i32 %9, i32 %12 seq_cst monotonic, align 4
%14 = extractvalue { i32, i1 } %13, 1
br i1 %14, label %15, label %7
15: ; preds = %7, %0
%16 = phi float [ %2, %0 ], [ %10, %7 ]
ret float %16
__atomic_sub__
@nocapture @llvm
__atomic_sub__(d: Ptr[float32], b: float32) -> float32
0:
%1 = load atomic i32, ptr %d monotonic, align 4
%2 = bitcast i32 %1 to float
%3 = fsub float %2, %b
%4 = bitcast float %3 to i32
%5 = cmpxchg weak ptr %d, i32 %1, i32 %4 seq_cst monotonic, align 4
%6 = extractvalue { i32, i1 } %5, 1
br i1 %6, label %15, label %7
7: ; preds = %0, %7
%8 = phi { i32, i1 } [ %13, %7 ], [ %5, %0 ]
%9 = extractvalue { i32, i1 } %8, 0
%10 = bitcast i32 %9 to float
%11 = fsub float %10, %b
%12 = bitcast float %11 to i32
%13 = cmpxchg weak ptr %d, i32 %9, i32 %12 seq_cst monotonic, align 4
%14 = extractvalue { i32, i1 } %13, 1
br i1 %14, label %15, label %7
15: ; preds = %7, %0
%16 = phi float [ %2, %0 ], [ %10, %7 ]
ret float %16
__hash__
__hash__(self: Self) -> int
__match__
__match__(self: Self, obj: float32) -> bool
__complex__
__complex__(self: Self) -> complex
__to_gpu__
__to_gpu__(self: Self, cache: AllocCache)
Added by internal.gpu
__from_gpu__
__from_gpu__(self: Self, other: float32)
Added by internal.gpu
__from_gpu_new__
__from_gpu_new__(other: float32)
Added by internal.gpu
__pickle__
__pickle__(self: Self, jar: Jar)
Added by pickle
__unpickle__
__unpickle__(jar: Jar) -> float32
Added by pickle