VF_tanrpiVD_tanrpiVE_tanrpi
VF_tanrpi2VD_tanrpi2VE_tanrpi2
VF_tanrpi3VD_tanrpi3VE_tanrpi3
FunctionTangent function of fractional multiples of p
Syntax C/C++#include <VFmath.h>
int VF_tanrpi( fVector Y, iVector P, ui size, int q );
int VF_tanrpi2( fVector Y, iVector P, ui size, int q );
int VF_tanrpi3( fVector Y, iVector P, ui size, int q );
C++ VecObj#include <OptiVec.h>
int vector<T>::tanrpi( const vector<int>& P, int q );
int vector<T>::tanrpi2( const vector<int>& P, int q );
int vector<T>::tanrpi3( const vector<int>& P, int q );
Pascal/Delphiuses VFmath;
function VF_tanrpi( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_tanrpi2( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_tanrpi3( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_tanrpi( fVector d_Y, iVector d_P, ui size, int q );
int cudaVF_tanrpi2( fVector d_Y, iVector d_P, ui size, int q );
int cudaVF_tanrpi3( fVector d_Y, iVector d_P, ui size, int q );
int VFcu_tanrpi( fVector h_Y, iVector h_P, ui size, int q );
int VFcu_tanrpi2( fVector h_Y, iVector h_P, ui size, int q );
int VFcu_tanrpi3( fVector h_Y, iVector h_P, ui size, int q );
CUDA function Pascal/Delphiuses VFmath;
function cudaVF_tanrpi( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_tanrpi2( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_tanrpi3( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_tanrpi( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_tanrpi2( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_tanrpi3( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
DescriptionYi = tan( (Pi / q) * p )
The tangent of fractional multiples of p is calculated. There are three versions: VF_tanrpi is for general use with any arbitrary denominator q. If q is a power of 2, VF_tanrpi2 should be used which is a highly optimized version using a look-up table. If q is a multiple of 3, VF_tanrpi3 should be used. VF_tanrpi2 and VF_tanrpi3 work also with q values they are not optimized for; in this case, however, memory space is wasted for the then useless tables.
Error handlingSING errors occur if Pi / q is an odd multiple of 1/2; the default result is 0.0 (which is the mean of +HUGE_VAL and -HUGE_VAL).
q must be non-zero; this is, however, not tested for.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_tan,   tan

VectorLib Table of Contents  OptiVec home