Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

C library functions that support IEEE floating-point numbers

&pagelevel(4)&pagelevel

For every function that works with floating-point numbers or returns a floating-point number, the C runtime system offers:

  • an implementation of the function with /390 arithmetic

  • an implementation of the function with IEEE arithmetic

  • a macro define that maps the original function (/390 function) to the associated IEEE function

The prototype of an IEEE function and the associated define are stored in the include file in which the corresponding original function is declared. This has the advantage that no additional include files are required in order to use the IEEE floating-point arithmetic, with

the possible exception of <ieee_390.h> (see "Explicit conversion of floating-point numbers").

Names of the IEEE functions

The syntax of the names of the IEEE functions is as follows:

__originalfunction_ieee()

The name of the original function should be specified for originalfunction.

The IEEE variant of sin(), for example, is __sin_ieee().

C library functions for which there is an IEEE function

There is an IEEE variant for each of the following C library functions:

acos

asin

atan

atan2

atof

ceil

cos

cosh

difftime

difftime64   

ecvt

erf

erfc

exp

expm1

fabs

fcvt

floor

floorf

floorl

fmod

fprintf

frexp

fscanf

gamma

gcvt

hypot

j0

j1

jn

ldexp     

lgamma 

llrintf     

llrintf

llrintl

llround   

llroundf

llroundl

log

log10

log1p

lrint

lrintf

lrintl

lround

lroundf

lroundl     

modf

modff

modfl

pow

printf

rint

rintf

rintl

round

roundf

roundl

scanf

sin

sinh

snprintf

sprintf

sqrt

sscanf

strtod

strtof

strtold

tan

tanh

vfprintf

vfscanf

vprintf

vscanf

vsnprintf

vsprintf

vsscanf

y0

y1

yn





For the following functions, the IEEE prototypes are only generated in language mode C11 or C++ 2017:

acosf

acosl

asinf

asinl

atanf

atanl

atan2f

atan2l

atan2f

atan2l

copysign

copysignf

copysignl

cosf

cosl

coshf

coshl

erff

erfl

erfcf

erfcl

expf

expl

expm1f

expm1l

exp2

exp2f

exp2l

fabsf

fabsl

fdim

fdimf

fdiml

fmax

fmaxf

fmaxl

fmin

fminf

fminl

fmodf

fmodl

frexpf

frexpl

hypotf

hypotl

hypotf

ldexpf

ldexpl

lgammaf

lgammal

logf

logl

log10f

log10l

log1pf

log1pl

log2

log2f

log2l

nearbyint

log2l

nearbyintl

powf

powl

scalbln

scalblnf

scalblnl

scalbn

scalbnf

scalbnl

sinf

sinl

sinhf

sinhl

sqrtf

sqrtl

tanf

tanl

tanhf

tanhl

tgamma

tgammaf

tgammal

trunc

truncf

truncl