Compartir a través de


Floating-Point Support (Windows CE 5.0)

Send Feedback

Developing an Application > Microsoft C Run-time Library for Windows CE > Run-time Routines by Category

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.

The math functions in the Microsoft run-time library handle exceptions the same way that UNIX V math functions do.

The Microsoft run-time library sets the default internal precision of the math coprocessor (or emulator) to 64 bits. This default applies only to the internal precision at which all intermediate calculations are performed; it does not apply to the size of arguments, return values, or variables.

You can override this default and set the chip (or emulator) back to 80-bit precision by linking your program with LIB/FP10.OBJ.

On the linker command line, FP10.OBJ must appear before LIBC.LIB, LIBCMT.LIB, or MSVCRT.LIB.

Routine Use
abs Returns absolute value of int
acos Calculates arccosine
asin Calculates arcsine
atan, atan2 Calculates arctangent
atof Converts character string to double-precision floating-point value
_cabs Finds absolute value of complex number
ceil Finds integer ceiling
_chgsign Reverses sign of double-precision floating-point argument
clearerr Clears error
_copysign Returns one value with sign of another
cos Calculates cosine
cosh Calculates hyperbolic cosine
div Divides one integer by another, returning quotient and remainder
_ecvt Converts double to character string of specified length
exp Calculates exponential function
fabs Finds absolute value
_fcvt Converts double to string with specified number of digits following decimal point
_finite Determines whether given double-precision floating-point value is finite
floor Finds largest integer less than or equal to argument
fmod Finds floating-point remainder
_fpclass Returns status word containing information on floating-point class
_fpieee_flt Invokes user-defined trap handler for IEEE floating-point exceptions
_fpreset Reinitializes floating-point math package
frexp Calculates exponential value
_gcvt Converts floating-point value to character string
_hypot Calculates hypotenuse of right triangle
_isnan Checks given double-precision floating-point value for not a number (NaN)
_j0, _j1, _jn Calculates Bessel functions _j0, _j1, and _jn
labs Returns absolute value of long
ldexp Calculates product of argument and 2 to specified power
ldiv Divides one long integer by another, returning quotient and remainder
log, log10 Calculates logarithm
_logb Extracts exponential value of double-precision floating-point argument
_lrotl, _lrotr Shifts unsigned long int left (_lrotl) or right (_lrotr)
modf Splits argument into integer and fractional parts
_nextafter Returns next representable neighbor
pow Calculates value raised to a power
rand Gets pseudorandom number
_rotl, _rotr Shifts unsigned int left (_rotl) or right (_rotr)
_scalb Scales argument by power of 2
sin Calculates sine
sinh Calculates hyperbolic sine
sqrt Finds square root
srand Initializes pseudorandom series
_statusfp Gets floating-point status word
strtod Converts character string to double-precision value
tan Calculates tangent
tanh Calculates hyperbolic tangent
_y0, _y1, _yn Calculates Bessel functions _yo, _y1, and _yn

See Also

Microsoft C Run-time Library for Windows CE | Run-time Library Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.