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

ID 767253
Date 11/07/2023
Public

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

Document Table of Contents

Homogeneous General-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 homogeneous general-computational operations:

round_integral_nearest_even

Description: The function rounds floating-point number x to its nearest integral value, with the halfway (tied) case rounding to even.

Calling interface:
float __binary32_round_integral_nearest_even(float x);
double __binary64_round_integral_nearest_even(double x);

round_integral_nearest_away

Description: The function rounds floating-point number x to its nearest integral value, with the halfway (tied) case rounding away from zero.

Calling interface:
float __binary32_round_integral_nearest_away(float x);
double __binary64_round_integral_nearest_away(double x);

round_integral_zero

Description: The function rounds floating-point number x to the closest integral value toward zero.

Calling interface:
float __binary32_round_integral_zero(float x);
double __binary64_round_integral_zero(double x);

round_integral_positive

Description: The function rounds floating-point number x to the closest integral value toward positive infinity.

Calling interface:
float __binary32_round_integral_positive(float x);
double __binary64_round_integral_positive(double x);

round_integral_negative

Description: The function rounds floating-point number x to the closest integral value toward negative infinity.

Calling interface:
float __binary32_round_integral_negative(float x);
double __binary64_round_integral_negative(double x);

round_integral_exact

Description: The function rounds floating-point number x to the closest integral value according to the rounding-direction applicable.

Calling interface:
float __binary32_round_integral_exact(float x);
double __binary64_round_integral_exact(double x);

next_up

Description:The function returns the least floating-point number in the same format as x that is greater than x.

Calling interface:
float __binary32_next_up(float x);
double __binary64_next_up(double x);

next_down

Description: The function returns the largest floating-point number in the same format as x that is less than x.

Calling interface:
float __binary32_next_down(float x);
double __binary64_next_down(double x);

rem

Description: The function returns the remainder of x and y.

Calling interface:
float __binary32_rem(float x, float y);
double __binary64_rem(double x, double y);

minnum

Description: The function returns the minimal value of x and y.

Calling interface:
float __binary32_minnum(float x, float y);
double __binary64_minnum(double x, double y);

maxnum

Description: The function returns the maximal value of x and y.

Calling interface:
float __binary32_maxnum(float x, float y);
double __binary64_maxnum(double x, double y);

minnum_mag

Description: The function returns the minimal absolute value of x and y.

Calling interface:
float __binary32_minnum_mag(float x, float y);
double __binary64_minnum_mag(double x, double y);

maxnum_mag

Description: The function returns the maximal absolute value of x and y.

Calling interface:
float __binary32_maxnum_mag(float x, float y);
double __binary64_maxnum_mag(double x, double y);

scalbn

Description: The function computes x X 2n for integer value n.

Calling interface:
float __binary32_scalbn(float x, int n);
double __binary64_scalbn(double x, int n);

ilogb

Description: The function returns the exponent part of x as integer.

Calling interface:
int __binary32_ilogb(float x);
int __binary64_ilogb(double x);