FunctionCotangent function
Syntax C/C++#include <VFmath.h>
int VF_cot( fVector Y, fVector X, ui size );
int VFx_cot( fVector Y, fVector X, ui size, float A, float B, float C );
C++ VecObj#include <OptiVec.h>
int vector<T>::cot( const vector<T>& X );
int vector<T>::x_cot( const vector<T>& X, const T& A, const T& B, const T& C );
Pascal/Delphiuses VFmath;
function VF_cot( Y, X:fVector; size:UIntSize ): IntBool;
function VFx_cot( Y, X:fVector; size:UIntSize; A, B, C:Single ): IntBool;
Descriptionnormal versions: Yi = cot ( Xi )
expanded versions: Yi = C * cot ( A*Xi+B )
The cotangent is defined as the inverse of the tangent (not to be mistaken for the arcus function arctan!) For large values of Xi, round-off error becomes appreciable; if the Xi values are representable as rational multiples of p, it is better to use VF_cotrpi than VF_cot.
Error handlingFor TLOSS precision errors, the default result is 0.0 (which is the mean of +HUGE_VAL and -HUGE_VAL); for SING and OVERFLOW errors, the default result is ±HUGE_VAL.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_cot2,   VF_cotrpi,   VF_coth,   VF_atan,   VF_atan2,   tan

VectorLib Table of Contents  OptiVec home