divu4

NAME

divu4 - return quotients of unsigned integer elements

SYNOPSIS

Procedure call syntax:

#include <simdmath.h>
divu4_t divu4(vector unsigned int x, vector unsigned int y);
Link with -lsimdmath

Inline call syntax:

#include <simdmath.h>
#include <divu4.h>
divu4_t _divu4(vector unsigned int x, vector unsigned int y);
Parameters  
x,y input vectors

DESCRIPTION

The divu4 function divides each element of x by the corresponding element of y and returns a vector of remainders in a structure (if the quotients can be represented).

Special Cases:
  • Division by zero (positive or negative) produces positive zero, without generating an error.
  • Negative zero divided by 1 produces zero.

RETURN VALUE

The function divu4 returns the quotient and remainder in the following structures:
  typedef struct divi4_t {  
  vector signed int quot;  
  vector signed int rem;  
  } divi4_t;  
     
  typedef struct divu4_t {  
  vector unsigned int quot;  
  vector unsigned int rem;  
  } divu4_t;  
  • Each element in the structure member quot is the algebraic quotient truncated towards 0.
  • Each element in the structure member rem is the corresponding remainder, such that x = quot*y+rem

ENVIRONMENT

SPU and PPU

CONFORMING TO

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

NOTES

Basis

ISO9899 (C99) div function (divi4).

SEE ALSO

divu4_t(3), div(3), divf4(3), divf4_fast(3), divi4(3), divd2(3), lldivi2(3), lldivu2(3), fma(3), fmaf4(3), fmad2(3), modf(3), modff4(3), modfd2(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)