INF: DB-LIB and Floating Point |
Q38831
The information in this article applies to:
- Microsoft SQL Server Programmer's Toolkit, version 4.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 startup code detects whether 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 pages 508-512 Microsoft C/C++ "Environment and Tools" manual for more information on controlling floating-point options.
Additional query words: dblib Windows NT
Keywords : kbprogramming
Issue type :
Technology : kbSQLServSearch kbAudDeveloper kbSQLServPTK420
Last Reviewed: March 24, 1999 |