modff4

NAME

modff4 - return signed integer and fraction values from float elements

SYNOPSIS

Procedure call syntax:

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

Inline call syntax:

#include <simdmath.h>
#include <modff4.h>
vector float _modff4(vector float x, vector float *pint);
Parameters  
x input vector
*pint pointer to output vector of integers

DESCRIPTION

The modff4 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 modff4 returns a float 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

PPU and SPU

CONFORMING TO

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

NOTES

Basis

ISO9899 (C99) modf functions.

SEE ALSO

modf(3), modfd2(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)