Partager via


__fmac

Multiplies two float values and add to a third float value.

Float __fmac( 
  float i, 
  float j, 
  float k 
);

Parameters

  • i
    [in] First operand of the multiplication operation.
  • j
    [in] Second operand of the multiplication operation.
  • k
    [in] Value to which the product of i and j is added.

Return Values

The sum of the product of i and j with k.

Remarks

The following example shows how to use _fmac.

/***********************************************************/
#include <stdio.h>
#include <shintr.h>
void main()
{
     int i;
     float sum=0;
     float v1[4] = {2.0, 2.0, 2.0, 2.0};
     float v2[4] = {8.0, 8.0, 8.0, 8.0};
         for (i = 0; i < 4; i++)
          sum = __fmac(v1[i], v2[i], sum);
         
     printf("sum = %f\n", sum);
}

This example results in the following output.

sum = 64.000000

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: shintr.h.

See Also

Microprocessor-specific Intrinsic Functions

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.