VxWorks Reference Manual : Libraries
mathHardLib - hardware floating-point math library
mathHardInit( ) - initialize hardware floating-point math support
This library provides support routines for using hardware floating-point units with high-level math functions. The high-level functions include triginometric operations, exponents, and so forth.
The routines in this library are used automatically for high-level math functions only if mathHardInit( ) has been called previously.
Not all architectures support hardware floating-point. See the architecture-specific appendices of the VxWorks Programmer's Guide.
math.h
mathHardLib, mathSoftLib, mathALib, VxWorks Programmer's Guide architecture-specific appendices
mathHardInit( ) - initialize hardware floating-point math support
void mathHardInit ()
This routine places the addresses of the hardware high-level math functions (trigonometric functions, etc.) in a set of global variables. This allows the standard math functions (e.g., sin( ), pow( )) to have a single entry point but to be dispatched to the hardware or software support routines, as specified.
This routine is called from usrConfig.c if INCLUDE_HW_FP is defined. This definition causes the linker to include the floating-point hardware support library.
Certain routines in the floating-point software emulation library do not have equivalent hardware support routines. (These are primarily routines that handle single-precision floating-point numbers.) If no emulation routine address has already been put in the global variable for this function, the address of a dummy routine that logs an error message is placed in the variable; if an emulation routine address is present (the emulation initialization, via mathSoftInit( ), must be done prior to hardware floating-point initialization), the emulation routine address is left alone. In this way, hardware routines will be used for all available functions, while emulation will be used for the missing functions.
N/A