The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

libm (3)
  • >> libm (3) ( Solaris man: Библиотечные вызовы )
  •  

    NAME

    libm - C math library
     
    

    SYNOPSIS

    c99 [ flag... ] file... -lm [ library... ] 
    

     

    DESCRIPTION

    Functions in this library provide common elementary mathematical functions and floating point environment routines defined by System V, ANSI C, POSIX, and so on. See standards(5). Additional functions in this library provide extended support for handling floating point exceptions.  

    INTERFACES

    The shared object libm.so.2 provides the public interfaces defined below. See Intro(3) for additional information on shared object interfaces.

    acosacosf
    acoshacoshf
    acoshl
    asin
    asinh
    asinhl
    atan
    atan2f
    atanf
    atanhf
    atanl
    cabsf
    cacos
    cacosh
    cacoshl
    carg
    cargl
    casinf
    casinhf
    casinl
    catanf
    catanhf
    catanl
    cbrtf
    ccos
    ccosh
    ccoshl
    ceil
    ceill
    cexpf
    cimag
    cimagl
    clogf
    conj
    conjl
    copysignf
    cos
    cosh
    coshl
    cpow
    cpowl
    cprojf
    creal
    creall
    csinf
    csinhf
    csinl
    csqrtf
    ctan
    ctanh
    ctanhl
    erf
    erfcf
    erff
    exp
    exp2f
    expf
    expm1
    expm1l
    fabsf
    fdim
    fdiml
    fegetenv
    fegetround
    feraiseexcept
    fesetexceptflag
    fetestexcept
    fex_get_handling
    fex_get_log_depth
    fex_log_entry
    fex_set_handling
    fex_set_log_depth
    floor
    floorl
    fmaf
    fmax
    fmaxl
    fminf
    fmod
    fmodl
    frexpf
    gamma
    gammaf
    gammal
    hypot
    hypotl
    ilogbf
    isnan
    j0f
    j1
    j1l
    jnf
    ldexp
    ldexpl
    lgamma_r
    lgammaf_r
    lgammal_r
    llrintf
    llround
    llroundl
    log10
    log10l
    log1pf
    log2
    log2l
    logbf
    logf
    lrint
    lrintl
    lroundf
    matherr
    modff
    nan
    nanl
    nearbyintf
    nextafter
    nextafterl
    nexttowardf
    pow
    powl
    remainderf
    remquo
    remquol
    rintf
    round
    roundl
    scalbf
    scalbln
    scalblnl
    scalbnf
    signgam
    signgaml
    significandf
    sin
    sincosf
    sinf
    sinhf
    sinl
    sqrtf
    tan
    tanh
    tanhl
    tgamma
    tgammal
    truncf
    y0
    y0l
    y1f
    yn
    ynl

    The following interfaces are unique to the x86 and x64 versions of this library:

    fegetprecfesetprec

     

    ACCURACY

    ISO/IEC 9899:1999, also known as C99, specifies the functions listed in the following tables and states that the accuracy of these functions is "implementation-defined". The information below characterizes the accuracy of these functions as implemented in libm.so.2. For each function, the tables provide an upper bound on the largest error possible for any argument and the largest error actually observed among a large sample of arguments. Errors are expressed in "units in the last place", or ulps, relative to the exact function value for each argument (regarding the argument as exact). Ulps depend on the precision of the floating point format: if y is the exact function value, x and x' are adjacent floating point numbers such that x < y < x', and x'' is the computed function value, then provided x, x', and x'' all lie in the same binade, the error in x'' is |y - x''| / |x - x'| ulps. In particular, when the error is less than one ulp, the computed value is one of the two floating point numbers adjacent to the exact value.

    The bounds and observed errors listed below apply only in the default floating point modes. Specifically, on SPARC, these bounds assume the rounding direction is round-to-nearest and non-standard mode is disabled. On x86, the bounds assume the rounding direction is round-to-nearest and the rounding precision is round-to-64-bits. Moreover, on x86, floating point function values are returned in a floating point register in extended double precision format, but the bounds below assume that the result value is then stored to memory in the format corresponding to the function's type. On x64, the bounds assume the rounding direction in both the x87 floating point control word and the MXCSR is round-to-nearest, the rounding precision in the x87 control word is round-to-64-bits, and the FTZ and DAZ modes are disabled.

    The error bounds listed below are believed to be correct, but smaller bounds might be proved later. The observed errors are the largest ones currently known, but larger errors might be discovered later. Numbers in the notes column refer to the notes following the tables.  

    Real Functions

     

    Single precision real functions (SPARC, x86, and x64)

    error boundlargest error
    function (ulps)observed (ulps)notes
    acosf
    acoshf
    asinf
    asinhf
    atanf
    atan2f
    atanhf
    cbrtf
    cosf
    coshf
    erff
    erfcf
    expf
    exp2f
    expm1f
    hypotf
    lgammaf
    logf
    log10f
    log1pf
    log2f
    powf
    sinf
    sinhf
    sqrtf
    tanf
    tanhf
    tgammaf

     

    Double precision real functions (SPARC and x64)

    error boundlargest error
    function (ulps)observed (ulps)notes
    acos
    acosh
    asin
    asinh
    atan
    atan2
    atanh
    cbrt
    cos
    cosh
    erf
    erfc
    exp
    exp2
    expm1
    hypot
    lgamma
    log
    log10
    log1p
    log2
    pow
    sin
    sinh
    sqrt
    tan
    tanh
    tgamma

     

    Double precision real functions (x86)

    error boundlargest error
    function (ulps)observed (ulps)notes
    acos
    acosh
    asin
    asinh
    atan
    atan2
    atanh
    cbrt
    cos
    cosh
    erf
    erfc
    exp
    exp2
    expm1
    hypot
    lgamma
    log
    log10
    log1p
    log2
    pow
    sin
    sinh
    sqrt
    tan
    tanh
    tgamma

     

    Quadruple precision real functions (SPARC)

    error boundlargest error
    function (ulps)observed (ulps)notes
    acosl
    acoshl
    asinl
    asinhl
    atanl
    atan2l
    atanhl
    cbrtl
    cosl
    coshl
    erfl
    erfcl
    expl
    exp2l
    expm1l
    hypotl
    lgammal
    logl
    log10l
    log1pl
    log2l
    powl
    sinl
    sinhl
    sqrtl
    tanl
    tanhl
    tgammal

     

    Extended precision real functions (x86 and x64)

    error boundlargest error
    function (ulps)observed (ulps)notes
    acosl
    acoshl
    asinl
    asinhl
    atanl
    atan2l
    atanhl
    cbrtl
    cosl
    coshl
    erfl
    erfcl
    expl
    exp2l
    expm1l
    hypotl
    lgammal
    logl
    log10l
    log1pl
    log2l
    powl
    sinl
    sinhl
    sqrtl
    tanl
    tanhl
    tgammal

     

    Notes:

    [1]

    On SPARC and x64, sqrtf, sqrt, and sqrtl are correctly rounded in accordance with IEEE 754. On x86, sqrtl is correctly rounded, sqrtf is correctly rounded provided the result is narrowed to single precision as discussed above, but sqrt might not be correctly rounded due to "double rounding": when the intermediate value computed to extended precision lies exactly halfway between two representable numbers in double precision, the result of rounding the intermediate value to double precision is determined by the round-ties-to-even rule. If this rule causes the second rounding to round in the same direction as the first, the net rounding error can exceed 0.5 ulps. (The error is bounded instead by 0.5*(1 + 2^-11) ulps.)

    [2]

    Error bounds for lgamma and lgammal apply only for positive arguments.

     

    Complex functions

    The real-valued complex functions cabsf, cabs, cabsl, cargf, carg, and cargl are equivalent to the real functions hypotf, hypot, hypotl, atan2f, atan2, and atan2l, respectively. The error bounds and observed errors given above for the latter functions also apply to the former.

    The complex functions listed below are complex-valued. For each function, the error bound shown applies separately to both the real and imaginary parts of the result. (For example, both the real and imaginary parts of cacosf(z) are accurate to within 1 ulp regardless of their magnitudes.) Similarly, the largest observed error shown is the largest error found in either the real or the imaginary part of the result.  

    Single precision complex functions (SPARC and x64)

    error boundlargest error
    function (ulps)observed (ulps)notes
    cacosf, cacoshf
    casinf, casinhf
    catanf, catanhf
    ccosf, ccoshf
    cexpf
    clogf
    cpowf
    csinf, csinhf
    csqrtf
    ctanf, ctanhf

     

    Single precision complex functions (x86)

    error boundlargest error
    function (ulps)observed (ulps)notes
    cacosf, cacoshf
    casinf, casinhf
    catanf, catanhf
    ccosf, ccoshf
    cexpf
    clogf
    cpowf
    csinf, csinhf
    csqrtf
    ctanf, ctanhf

     

    Double precision complex functions (SPARC and x64)

    error boundlargest error
    function (ulps)observed (ulps)notes
    cacos, cacosh
    casin, casinh
    catan, catanh
    ccos, ccosh
    cexp
    clog
    cpow
    csin, csinh
    csqrt
    ctan, ctanh

     

    Double precision complex functions (x86)

    error boundlargest error
    function (ulps)observed (ulps)notes
    cacos, cacosh
    casin, casinh
    catan, catanh
    ccos, ccosh
    cexp
    clog
    cpow
    csin, csinh
    csqrt
    ctan, ctanh

     

    Quadruple precision complex functions (SPARC)

    error boundlargest error
    function (ulps)observed (ulps)notes
    cacosl, cacoshl
    casinl, casinhl
    catanl, catanhl
    ccosl, ccoshl
    cexpl
    clogl
    cpowl
    csinl, csinhl
    csqrtl
    ctanl, ctanhl

     

    Extended precision complex functions (x86 and x64)

    error boundlargest error
    function (ulps)observed (ulps)notes
    cacosl, cacoshl
    casinl, casinhl
    catanl, catanhl
    ccosl, ccoshl
    cexpl
    clogl
    cpowl
    csinl, csinhl
    csqrtl
    ctanl, ctanhl

     

    Notes:

    [1]

    The complex hyperbolic trigonometric functions are equivalent by symmetries to their circular trigonometric counterparts. Because the implementations of these functions exploit these symmetries, corresponding functions have the same error bounds and observed errors.

    [2]

    For large arguments, the results computed by cpowf, cpow, and cpowl can have unbounded relative error. It might be possible to give error bounds for specific domains, but no such bounds are currently available. The observed errors shown are for the domain {(z,w) : max(|Re z|, |Im z|, |Re w|, |Im w|) <= 1}.

     

    FILES

    /lib/libm.so.2

    shared object

    /lib/64/libm.so.2

    64-bit shared object

     

    ATTRIBUTES

    See attributes(5) for descriptions of the following attributes:

    ATTRIBUTE TYPEATTRIBUTE VALUE

    AvailabilitySUNWlibmsr
    MT-Level

    As described on the lgamma(3M) manual page, gamma() and lgamma() and their float and long double counterparts are Unsafe. All other functions in libm.so.2 are MT-Safe.  

    SEE ALSO

    Intro(3), lgamma(3M), math.h(3HEAD), attributes(5), standards(5)


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    INTERFACES
    ACCURACY
    Real Functions
    Single precision real functions (SPARC, x86, and x64)
    Double precision real functions (SPARC and x64)
    Double precision real functions (x86)
    Quadruple precision real functions (SPARC)
    Extended precision real functions (x86 and x64)
    Notes:
    Complex functions
    Single precision complex functions (SPARC and x64)
    Single precision complex functions (x86)
    Double precision complex functions (SPARC and x64)
    Double precision complex functions (x86)
    Quadruple precision complex functions (SPARC)
    Extended precision complex functions (x86 and x64)
    Notes:
    FILES
    ATTRIBUTES
    SEE ALSO


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру