The OpenNET Project / Index page

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

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

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

fmal (3)
  • >> fmal (3) ( FreeBSD man: Библиотечные вызовы )
  • fmal (3) ( Русские man: Библиотечные вызовы )
  • fmal (3) ( Linux man: Библиотечные вызовы )
  • fmal (3) ( POSIX man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    
    
    fma
    
     
    fmaf
    
     
    fmal
    
     - fused multiply-add
    
     
    

    LIBRARY

    Lb libm
    
     
    

    SYNOPSIS

       #include <math.h>
    double fma (double x double y double z);
    float fmaf (float x float y float z);
    long double fmal (long double x long double y long double z);
     

    DESCRIPTION

    The fma (,);
    fmaf (,);
    and fmal ();
    functions return (x * y) + z computed with only one rounding error. Using the ordinary multiplication and addition operators, by contrast, results in two roundings: one for the intermediate product and one for the final result.

    For instance, the expression 1.2e100 * 2.0e208 - 1.4e308 produces due to overflow in the intermediate product, whereas fma(1.2e100, 2.0e208, -1.4e308) returns approximately 1.0e308.

    The fused multiply-add operation is often used to improve the accuracy of calculations such as dot products. It may also be used to improve performance on machines that implement it natively. The macros FP_FAST_FMA FP_FAST_FMAF and FP_FAST_FMAL may be defined in    #include <math.h>
    to indicate that fma (,);
    fmaf (,);
    and fmal ();
    (respectively) have comparable or faster speed than a multiply operation followed by an add operation.  

    IMPLEMENTATION NOTES

    In general, these routines will behave as one would expect if x * y + z were computed with unbounded precision and range, then rounded to the precision of the return type. However, on some platforms, if Fa z is , these functions may not raise an exception even when the computation of x * y would have otherwise generated an invalid exception.  

    SEE ALSO

    fenv(3), math(3)  

    STANDARDS

    The fma (,);
    fmaf (,);
    and fmal ();
    functions conform to St -isoC-99 . A fused multiply-add operation with virtually identical characteristics appears in IEEE draft standard 754R.  

    HISTORY

    The fma ();
    and fmaf ();
    routines first appeared in Fx 5.4 , and fmal ();
    appeared in Fx 6.0 .


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    IMPLEMENTATION NOTES
    SEE ALSO
    STANDARDS
    HISTORY


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




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

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