HP MLIB User's Guide Vol. 2 7th Ed.
Chapter 12 VMATH 807
Set and get the mode for VMATH library functions vmlsetmode, vmlgetmode
Name vmlsetmode, vmlgetmode
Set and get the mode for VMATH library functions
Purpose vmlsetmode sets the new mode for VMATH subroutines according to the mode
argument and returns the mode in effect at the time of the call.
vmlgetmode returns the current VMATH mode (as does vmlsetmode).
The mode for the VMATH library comprises an accuracy mode, an error mode,
and an FPU mode.
The accuracy mode is specified by one of the parameters:
The error mode is specified by one of the parameters:
The FPU mode has no effect in VMATH. However, for user source compatibility
with Intel’s MKL vector math library, an FPU mode can be specified by one of
the parameters:
VML_FLOAT_CONSISTENT
VML_DOUBLE_CONSISTENT
VML_RESTORE
The mode argument for vmlsetmode is interpreted as a bitwise of OR one or
more of an accuracy mode parameter, and error mode parameter, and an FPU
mode parameter. If an accuracy mode, error mode, or FPU mode is not
represented in the mode argument, then that mode is unchanged by the call.
For example, the following saves the current mode, installs the modes for lower
accuracy and ignoring errors, while leaving the FPU mode unchanged, and
then restores the saved mode:
VML_HA Higher accuracy versions of VMATH
subroutines are used (default)
VML_LA Lower accuracy versions of VMATH
subroutines may be used to increase
throughput
VML_ERRMODE_EXCEPT Floating-point exceptions, in the style of the
IEEE 754 and C99 standards, are signaled
VML_ERRMODE_IGNORE No error reporting is in effect
VML_ERRMODE_DEFAULT Floating-point exceptions are raised