p (OptiVec vector function)">p">
VF_cosecrpiVD_cosecrpiVE_cosecrpi
VF_cosecrpi2VD_cosecrpi2VE_cosecrpi2
VF_cosecrpi3VD_cosecrpi3VE_cosecrpi3
FunctionCosecant function of fractional multiples of p
Syntax C/C++#include <VFmath.h>
int VF_cosecrpi( fVector Y, iVector P, ui size, int q );
int VF_cosecrpi2( fVector Y, iVector P, ui size, int q );
int VF_cosecrpi3( fVector Y, iVector P, ui size, int q );
C++ VecObj#include <OptiVec.h>
int vector<T>::cosecrpi( const vector<int>& P, int q );
int vector<T>::cosecrpi2( const vector<int>& P, int q );
int vector<T>::cosecrpi3( const vector<int>& P, int q );
Pascal/Delphiuses VFmath;
function VF_cosecrpi( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_cosecrpi2( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_cosecrpi3( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_cosecrpi( fVector d_Y, iVector d_P, ui size, int q );
int cudaVF_cosecrpi2( fVector d_Y, iVector d_P, ui size, int q );
int cudaVF_cosecrpi3( fVector d_Y, iVector d_P, ui size, int q );
int VFcu_cosecrpi( fVector h_Y, iVector h_P, ui size, int q );
int VFcu_cosecrpi2( fVector h_Y, iVector h_P, ui size, int q );
int VFcu_cosecrpi3( fVector h_Y, iVector h_P, ui size, int q );
CUDA function Pascal/Delphiuses VFmath;
function cudaVF_cosecrpi( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_cosecrpi2( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_cosecrpi3( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cosecrpi( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cosecrpi2( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cosecrpi3( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
DescriptionYi = cosec( (Pi / q) * p )
The cosecant of fractional multiples of p is calculated. There are three versions: VF_cosecrpi is for general use with any arbitrary denominator q. If q is a power of 2, VF_cosecrpi2 should be used which is a highly optimized version using a look-up table. If q is a multiple of 3, VF_cosecrpi3 should be used. VF_cosecrpi2 and VF_cosecrpi3 work also with q values they are not optimized for; in this case, however, memory space is wasted for the tables.
Error handlingSING errors occur if Pi / q is exactly an integer number; the default result is 0.0 (which is the mean of +HUGE_VAL and -HUGE_VAL; in contrast to VF_cosec, 0.0 is chosen irrespective of the fact that it is not a valid result of the cosecant function); q must be non-zero; this is, however, not tested for.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_cosec,   sin

VectorLib Table of Contents  OptiVec home