VF_cotrpiVD_cotrpiVE_cotrpi
VF_cotrpi2VD_cotrpi2VE_cotrpi2
VF_cotrpi3VD_cotrpi3VE_cotrpi3
FunctionCotangent function of rational multiples of p
Syntax C/C++#include <VFmath.h>
int VF_cotrpi( fVector Y, iVector P, ui size, int q );
int VF_cotrpi2( fVector Y, iVector P, ui size, int q );
int VF_cotrpi3( fVector Y, iVector P, ui size, int q );
C++ VecObj#include <OptiVec.h>
int vector<T>::cotrpi( const vector<int>& P, int q );
int vector<T>::cotrpi2( const vector<int>& P, int q );
int vector<T>::cotrpi3( const vector<int>& P, int q );
Pascal/Delphiuses VFmath;
function VF_cotrpi( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_cotrpi2( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_cotrpi3( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_cotrpi( fVector d_Y, iVector d_P, ui size, int q );
int cudaVF_cotrpi2( fVector d_Y, iVector d_P, ui size, int q );
int cudaVF_cotrpi3( fVector d_Y, iVector d_P, ui size, int q );
int VFcu_cotrpi( fVector h_Y, iVector h_P, ui size, int q );
int VFcu_cotrpi2( fVector h_Y, iVector h_P, ui size, int q );
int VFcu_cotrpi3( fVector h_Y, iVector h_P, ui size, int q );
CUDA function Pascal/Delphiuses VFmath;
function cudaVF_cotrpi( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_cotrpi2( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_cotrpi3( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cotrpi( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cotrpi2( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cotrpi3( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
DescriptionYi = cot( (Pi / q) * p )
The cotangent of fractional multiples of p is calculated. There are three versions: VF_cotrpi is for general use with any arbitrary denominator q. If q is a power of 2, VF_cotrpi2 should be used which is a highly optimized version using a look-up table. If q is a multiple of 3, VF_cotrpi3 should be used. VF_cotrpi2 and VF_cotrpi3 also work 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 a whole number. 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_cot,   tan

VectorLib Table of Contents  OptiVec home