Developer Guide and Reference

Contents

Using the Intel® IEEE 754-2008 Binary Floating-Point Conformance Library

Many routines in the
libbfp754
Library are more optimized for Intel® microprocessors than for non-Intel microprocessors.
To use the library, include the header file,
bfp754.h
, in your program.
Here is an example program illustrating the use of the library on Linux* OS.
//binary.c #include <stdio.h> #include <bfp754.h> int main(){ double a64, b64; float c32; a64 = 1.000000059604644775390625; b64 = 1.1102230246251565404236316680908203125e-16; c32 = __binary32_add_binary64_binary64(a64, b64); printf("The addition result using the libary: %8.8f\n", c32); c32 = a64 + b64; printf("The addition result without the libary: %8.8f\n", c32); return 0; }
The command for compiling
binary.c
is:
icc -fp-model source -fp-model except binary.c –lbfp754
The output of
a.out
will look similar to the following:
The addition result using the libary: 1.00000012 The addition result without the libary: 1.00000000

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-depend