[PPL-devel] Answer from Intel concerning C99-conformance of fma(), fmaf() and fmal()
Roberto Bagnara
bagnara at cs.unipr.it
Wed Feb 2 12:50:53 CET 2005
Hi there,
some time ago I asked Intel whether the implementations of
fma(), fmaf() and fmal() they ship with the Intel C/C++ compiler
do conform to the C99 standard. Here is their answer, for future
reference:
ANSWER: ___________________________________________________
Yes, fma(), fmaf() and fmal(), defined in libimf.a/.so, are conforming to C99.
FMA
( Defined on page 233 of Intel® C++ Compiler for Linux* Systems user's Guide)
Description: The fma functions return (x*y)+z.
Calling interface:
double fma(double x, double y, long double z);
long double fmal(long double x, long double y, long double z);
float fmaf(float x, float y, long double z);
Quote from ISO/IEC 9899:1999 (C99) standard:
7.12.13.1 The fma functions
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 functions compute (x* y) + z, rounded as one ternary operation:
they compute the value (as if) to infinite precision and round once to
the result format, according to the rounding mode characterized by the
value of FLT_ROUNDS.
Returns
The fma functions return (x*y) + z, rounded as one ternary operation.
------------
Some related macros:
The macro FP_FAST_FMA, is optionally defined. If defined, it indicates
that the fma function generally executes about as fast as, or faster
than, a multiply and an add of double operands.193)
The macros
FP_FAST_FMAF
FP_FAST_FMAL
are, respectively, float and long double analogs of FP_FAST_FMA.
Please read in /opt/intel_cc_80/include/mathimf.h.
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it
More information about the PPL-devel
mailing list