Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Quiet-Computational Operations Functions

Many routines in the libbfp754 Library are more optimized for Intel® microprocessors than for non-Intel microprocessors.

The Intel® IEEE 754-2008 Binary Conformance Library supports the following functions for quiet-computational operations:

copy

Description: The function copies input floating-point number x to output in the same floating-point format, without any change to the sign.

Calling interface:
float __binary32_copy(float x);
double __binary64_copy(double x);

negate

Description: The function copies input floating-point number x to output in the same floating-point format, reversing the sign.

Calling interface:
float __binary32_negate(float x);
double __binary64_negate(double x);

abs

Description: The function copies input floating-point number x to output in the same floating-point format, setting the sign to positive.

Calling interface:
float __binary32_abs(float x);
double __binary64_abs(double x);

copysign

Description: The function copies input floating-point number x to output in the same floating-point format, with the same sign as y.

Calling interface:
float __binary32_copysign(float x, float y);
double __binary64_copysign(double x, double y);

NOTE:

For the listed quiet-computational operations functions, when the first input is a signaling NaN, two different outcomes are allowed by the standard. The operation could either signal invalid exception with quieted signaling NaN as output, or deliver signaling NaN as output without signaling any exception.