VF_cosecVD_cosecVE_cosec
VFx_cosecVDx_cosecVEx_cosec
FunctionCosecant function
Syntax C/C++#include <VFmath.h>
int VF_cosec( fVector Y, fVector X, ui size );
int VFx_cosec( fVector Y, fVector X, ui size, float A, float B, float C );
C++ VecObj#include <OptiVec.h>
int vector<T>::cosec( const vector<T>& X );
int vector<T>::x_cosec( const vector<T>& X, const T& A, const T& B, const T& C );
Pascal/Delphiuses VFmath;
function VF_cosec( Y, X:fVector; size:UIntSize ): IntBool;
function VFx_cosec( Y, X:fVector; size:UIntSize; A, B, C:Single ): IntBool;
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_cosec( fVector d_Y, fVector d_X, ui size );
int cudaVFx_cosec( fVector d_Y, fVector d_X, ui size, float A, float B, float C );
int cusdVFx_cosec( fVector d_Y, fVector d_X, ui size, float *d_A, float *d_B, float *d_C );
int VFcu_cosec( fVector h_Y, fVector h_X, ui size );
int VFxcu_cosec( fVector h_Y, fVector h_X, ui size, float A, float B, float C );
CUDA function Pascal/Delphiuses VFmath;
function cudaVF_cosec( d_Y, d_X:fVector; size:UIntSize ): IntBool;
function cudaVFx_cosec( d_Y, d_X:fVector; size:UIntSize; A, B, C:Single ): IntBool;
function cusdVFx_cosec( d_Y, d_X:fVector; size:UIntSize; d_A, d_B, d_C:PSingle ): IntBool;
function VFcu_cosec( h_Y, h_X:fVector; size:UIntSize ): IntBool;
function VFxcu_cosec( h_Y, h_X:fVector; size:UIntSize; A, B, C:Single ): IntBool;
Descriptionnormal versions: Yi = cosec ( Xi ) = 1.0 / sin ( Xi )
expanded versions: Yi = C * cosec ( A*Xi + B )
The cosecant is defined as the inverse of the sine (not to be mistaken for the arcus function arcsin!) 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_cosecrpi than VF_cosec.
Error handlingFor TLOSS precision errors, the default result is arbitrarily set to 1.0 (as an exception from the general rule which would require the result to be the mean of the results for +0 and -0. This would be 0.0. However, zero is not a valid result for the cosecant function). For SING and OVERFLOW errors, the default result is ±HUGE_VAL.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_cosec2,   VF_cosecrpi,   VF_sin,   VF_cosech,   sin

VectorLib Table of Contents  OptiVec home