Floating Point C Run-Time Library Internal Functions (Windows Embedded CE 6.0)
1/5/2010
This topic lists the functions that are used internally by the generated code in the floating point C run-time library, Fpcrt.dll, to perform basic floating point arithmetic, comparisons, and conversions.
Binary arithmetic
Type | Description |
---|---|
float __adds( float _X, float _Y ) |
Single precision addition. |
float __subs( float _X, float _Y ) |
Single precision subtraction. |
float __divs( float _X, float _Y ) |
Single precision division. |
float __muls( float _X, float _Y) |
Single precision multiplication. |
double __addd( double _X, double _Y ) |
Double precision addition. |
double __subd( double _X, double _Y ) |
Double precision subtraction. |
double __muld( double _X, double _Y ) |
Double precision multiplication. |
double __divd( double _X, double _Y ) |
Double precision division. |
Conversion operations
Floating point, either single or double, to integral type conversions perform truncations and not IEEE754 roundings. This is done in accordance with C/C++ semantics. For IEEE754 floating point to integer roundings, use _frnd().
Type | Description |
---|---|
double __stod( float _X ) |
Single to double conversion. |
float __dtos( double _X ) |
Double to single conversion. |
float __itos( int _X ) |
Integers to single conversion. |
double __itod( int _X ) |
Integers to double conversion. |
int __stoi( float _X ) |
Single to integer conversion. |
int __dtoi( double _X ) |
Double to integer conversion. |
float __utos( unsigned int _X ) |
Unsigned integer to single conversion. |
double __utod( unsigned int _X ) |
Unsigned integer to double conversion. |
unsigned int __stou( float _X ) |
Single to unsigned int conversion. |
unsigned int __dtou( double _X ) |
Double to unsigned integer conversion. |
float __i64tos( int64 _X ) |
Int64 to double conversion. |
double __i64tod( int64 _X ) |
Int64 to double conversion. |
int64 __stoi64( float _X ) |
Single to int64 conversion. |
int64 __dtoi64( double _X ) |
Double to int64 conversion. |
float __u64tos( unsigned int64 _X ) |
Uint64 to single conversion. |
double __u64tod( unsigned int64 _X ) |
Iint64 to double conversion. |
unsigned int64 __stou64( float _X ) |
Single to uint64 conversion. |
unsigned int64 __dtou64( double _X ) |
Double to uint64 conversion. |
Float negate
Function | Description |
---|---|
float __negs (float _X) |
Negates single. |
double __negd (double _X) |
Negates double. |
Compare operations
These compare operators must follow the IEEE floating point semantics. Specifically, undefined results cannot be compared, and any comparison with an undefined result must return FALSE, except for inequality testing, which must return TRUE.
For more information, see the IEEE 754 standard documentation.
These functions return 0 if the condition is FALSE, or 1 if the condition is TRUE.
Function | Description |
---|---|
int __eqs(float _X, float _Y) |
Compares single values to see if they are equal. Return X==Y |
int __nes(float _X, float _Y) |
Compares single values to see if they are not equal. Return X!=Y |
int __lts(float _X, float _Y) |
Compares single values to see if one is less than the other. Return X < Y |
int __les(float _X, float _Y) |
Compares single values to see if one is less than or equal to the other. Return X<= Y |
int __gts(float _X, float _Y) |
Compares single values to see if one is greater than the other. Return X > Y |
int __ges(float _X, float _Y) |
Compares single values to see if one is greater than or equal to the other. Return X >= Y |
int __eqd(double _X, double _Y) |
Compares double values to see if they are equal. Return X == Y |
int __ned(double _X, double _Y) |
Compares double values to see if they are not equal. Return X != Y |
int __led(double _X, double _Y) |
Compares double values to see if one value is less than or equal to the other. Return X <= Y |
int __ltd(double _X, double _Y) |
Compares double values to see if one is less than the other. Return X < Y |
int __ged(double _X, double _Y) |
Compares double values to see if one value is greater than or equal to the other. Return X >= Y |
int __gtd(double _X, double _Y) |
Compares double values to see if one value is greater than the other. Return X > Y |
See Also
Concepts
Floating Point C Run-Time Library Internal Functions