modfd2

NAME

modfd2 - return signed integer and fraction values from double elements

SYNOPSIS

Procedure call syntax:

#include <simdmath.h>
vector double modfd2(vector double x, vector double *pint);
Link with -lsimdmath

Inline call syntax:

#include <simdmath.h>
#include <modfd2.h>
vector double _modfd2(vector double x, vector double *pint);
Parameters  
x input vector
*pint pointer to output vector of integers

DESCRIPTION

The modfd2 function determines an integer i plus a fraction frac that represent the value of each element of x. It returns a vector of the values frac and stores a vector of the integers i in *pint for each corresponding element of x, such that:
  • x = frac + i,
  • |frac| is in the interval [0,1), and
  • both frac and i have the same sign as the element of x.

RETURN VALUE

The function modfd2 returns a double vector such that:
  • the signed fractional portion of the corresponding element of x is returned, and
  • the integral portion of each corresponding element of x is stored in the vector pointed to by pint.

If an element of y is zero the corresponding element of the result is undefined.

ENVIRONMENT

SPU only

CONFORMING TO

SIMD Math library specification for the Cell Broadband Engineā„¢ Architecture.

NOTES

Basis

ISO9899 (C99) modf functions.

SEE ALSO

modf(3), modff4(3), div(3), divf4(3), divi4(3), divu4(3), divd2(3), lldivi2(3), lldivu2(3), fma(3), fmaf4(3), fmad2(3), fmod(3), fmodf4(3), fmodd2(3), remainder(3), remainderf4(3), remainderd2(3), remquo(3) , remquof4(3), remquod2(3), recip(3), recipf4(3), recipd2(3), rsqrt(3), rsqrtf4(3), rsqrtd2(3)