description | title | ms.date | f1_keywords | helpviewer_keywords | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: Fast floating-point conversion functions |
Fast conversion functions |
11/18/2021 |
|
|
Microsoft Specific
Fast conversion functions between floating-point types and integral types.
int _cvt_ftoi_fast(float value);
long long _cvt_ftoll_fast(float value);
unsigned _cvt_ftoui_fast(float value);
unsigned long long _cvt_ftoull_fast(float value);
int _cvt_dtoi_fast(double value);
long long _cvt_dtoll_fast(double value);
unsigned _cvt_dtoui_fast(double value);
unsigned long long _cvt_dtoull_fast(double value);
value
[in] A floating-point value to convert.
The integer-typed result of the conversion.
Header: <intrin.h>
Architecture: x86, x64
These intrinsics are fast conversion functions that execute as quickly as possible for valid conversions. As in Standard C++, fast conversions aren't fully defined. They may generate different values or exceptions for invalid conversions. The results depend on the target platform, compiler options, and context. These functions can be useful for handling values that have already been range-checked. Or, for values generated in a way that can never cause an invalid conversion.
The fast conversion intrinsics are available starting in Visual Studio 2022.
END Microsoft Specific
Compiler intrinsics
Saturation floating-point conversion functions
Sentinel floating-point conversion functions