| VFx_cosec | VDx_cosec | VEx_cosec |
|
| Function | Cosecant 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/Delphi | uses VFmath;
function VF_cosec( Y, X:fVector; size:UIntSize ): IntBool;
function VFx_cosec( Y, X:fVector; size:UIntSize; A, B, C:Single ): IntBool; |
|
| Description | normal 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 handling | For 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 value | FALSE (0), if no error occurred, otherwise TRUE (non-zero). |
|
|