# Data Types and Accuracy Modes

Mathematical and pack/unpack vector functions in VML have been implemented for vector arguments of single and double precision real data. Both Fortran- and C-interfaces to all functions, including VML service functions, are provided in the library. The differences in naming and calling the functions for Fortran- and C-interfaces are detailed in the Function Naming Conventions section below.

Each vector function from VML (for each data format) can work in three modes: High Accuracy (HA), Low Accuracy (LA), and Enhanced Performance (EP). For many functions, using the LA version improves performance at the cost of slight reduction in accuracy (1-2 least significant bits). In contrast to the LA accuracy flavor, the EP flavor further enhances the performance at the cost of significant reduction in accuracy. In both single and double precision, about half bits of floating-point mantissa are correct. Moreover, subtle argument paths for certain functions (for example, large arguments in trigonometric functions) may be calculated with even less accuracy.

Despite the fact that default accuracy is HA, LA is more than sufficient in most cases. For certain applications that are not very demanding for accuracy (for example, media applications, some Monte Carlo simulations, etc.) you may find the EP accuracy flavor sufficient.

In addition, special value behavior may differ between the HA and LA versions of the functions. Any information on accuracy behavior can be found in the Intel MKL Release Notes.

Switching between the two modes (HA, LA, EP) is accomplished by using vmlSetMode(mode)(see Table “Values of the mode Parameter”). The function vmlGetMode() returns the currently used mode. The High Accuracy mode is used by default.

Parent topic: Vector Mathematical Functions