Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Many Microsoft run-time library functions require floating-point support from a math coprocessor or from the floating-point libraries that accompany the compiler. Floating-point support functions are loaded only if required.
When you use a floating-point type specifier in the format string of a call to a function in the printf or scanf family, you must specify a floating-point value or a pointer to a floating-point value in the argument list to tell the compiler that floating-point support is required.
For sample code that shows how to handle floating-point exceptions, see _fpieee_flt.
Floating-point precision of intermediate values are controlled by the functions _control87, _controlfp, __control87_2. By default, precision control in _controlfp is set to 53 bits (_PC_53). Linking by using FP10.OBJ changes the default precision control to 64 bits (_PC_64). On the linker command line, FP10.OBJ must appear before LIBC.LIB, LIBCMT.LIB, or MSVCRT.LIB.
Floating-Point Functions
Routine |
Use |
.NET Framework equivalent |
---|---|---|
Return absolute value of int |
||
Calculate arccosine |
||
Calculate arcsine |
||
Calculate arctangent |
||
Convert character string to double-precision floating-point value |
||
Calculate Bessel functions _j0, _j1, _jn, _y0, _y1, _yn |
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples. |
|
Find absolute value of complex number |
Not applicable. |
|
Calculate the cube root |
Not applicable. |
|
Find integer ceiling |
||
Reverse sign of double-precision floating-point or long double-precision floating-point argument |
Not applicable. |
|
Get and clear floating-point status word |
Not applicable. |
|
Get old floating-point control word and set new control-word value |
Not applicable. |
|
copysign, copysignf, copysignl, _copysign, _copysignf, _copysignl |
Return one value with sign of another |
Not applicable. |
Calculate cosine |
||
Compute difference between two specified time values |
||
Divide one integer by another, returning quotient and remainder |
Not applicable. |
|
Convert double to character string of specified length |
||
Calculate exponential function |
||
Find absolute value |
||
Convert double to string that has specified number of digits following decimal point |
||
Determine whether given double-precision floating-point value is finite |
||
Find largest integer less than or equal to argument |
||
Find floating-point remainder |
||
Return status word that contains information about floating-point class |
System::Double::IsInfinity, System::Double::IsNegativeInfinity, System::Double::IsPositiveInfinity, System::Double::IsNan |
|
Invoke user-defined trap handler for IEEE floating-point exceptions |
Not applicable. |
|
Reinitialize floating-point math package |
|
|
Calculate exponential value |
Not applicable. |
|
Convert floating-point value to character string |
||
Calculate hypotenuse of right triangle |
Not applicable. |
|
Check given double-precision floating-point value for not a number (NaN) |
||
Return absolute value of long |
||
Calculate product of argument and 2exp (specified power) |
||
Divide one long integer by another, and return quotient and remainder |
Not applicable. |
|
Calculate natural or base-10 logarithm. |
||
Extract exponential value of double-precision floating-point argument |
Not applicable. |
|
Shift unsigned long int left (_lrotl) or right (_lrotr) |
Not applicable. |
|
Handle math errors |
Not applicable. |
|
Return larger of two values |
||
Return smaller of two values |
||
Split argument into integer and fractional parts |
Not applicable. |
|
Return a quiet NaN value |
||
Return next representable neighbor |
Not applicable. |
|
Calculate value raised to a power |
||
printf, _printf_l, wprintf, _wprintf_l, printf_s, _printf_s_l, wprintf_s, _wprintf_s_l |
Write data to stdout according to specified format |
|
Get pseudo-random number |
||
Round to nearest integer in floating-point format |
||
Shift unsigned int left (_rotl) or right (_rotr) |
Not applicable. |
|
Scale argument by power of 2 |
Not applicable. |
|
Multiply by integral power of FLT_RADIX |
Not applicable. |
|
Read data from stdin according to specified format and write data to specified location |
||
Set new control-word value |
Not applicable. |
|
Calculate sine or hyperbolic sine |
||
Find square root |
||
Initialize pseudo-random series |
||
Get floating-point status word |
Not applicable. |
|
Convert character string to double-precision value |
||
Calculate tangent or hyperbolic tangent |