ID Number: Q38831
1.10 1.11 4.20
OS/2
Summary:
This article explains how you can control whether or not DB-LIBRARY
(db-lib) uses a coprocessor for floating-point operations.
More Information:
Db-lib uses floating point only if conversion or display of FLOAT data
is requested. No other SQL Server data type requires floating point.
The DLL version of db-lib was compiled with /FPa and linked with the
alternate floating-point library. It will never use the coprocessor,
even if one is present and is totally independent of the
floating-point compile and link requirements of the applications that
call it.
The static-link version of db-lib was compiled with /FPi, which
generates coprocessor floating-point instructions. This is why you
will see 8087 instructions in db-lib code. Whether or not a
coprocessor is required is determined at link time. If the
application is linked with the coprocessor floating-point library
(xLIBC7.LIB), DB-LIB will require a coprocessor. If the application
is linked with the emulator floating-point library (xLIBCE.LIB),
the coprocessor will be used if it is present. The C start-up code
detects if a coprocessor is not present and sets up a handler to
trap 8087 instructions and emulate them. The automatic selection of
a coprocessor at run time may be overridden with the NO87 environment
variable. Please refer to Chapter 7 of the C compiler user's guide
for more information on controlling floating-point options.
Additional reference words: dblib