INF: DB-LIB and Floating Point

Last reviewed: April 25, 1997
Article ID: 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 : kbprg SSrvDB_Lib SSrvWinNT
Version : 4.2 | 4.2 | 4.2
Platform : MS-DOS OS/2 WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.