1vsincospi_(3MVEC)        Vector Math Library Functions       vsincospi_(3MVEC)
2
3
4

NAME

6       vsincospi_, vsincospif_ - vector sincospi functions
7

SYNOPSIS

9       cc [ flag... ] file... -lmvec [ library... ]
10
11       void vsincospi_(int *n, double * restrict x, int *stridex,
12            double * restrict s, int *strides, double * restrict c,
13            int *stridec);
14
15
16       void vsincospif_(int *n, float * restrict x, int *stridex,
17            float * restrict s, int *strides, float * restrict c,
18            int *stridec);
19
20

DESCRIPTION

22       These  functions  evaluate  both  sinpi(x)  and  cospi(x),  defined  by
23       sinpi(x) = sin(pi * x) and cospi(x) = cos(pi * x), for an entire vector
24       of  values  at once. The first parameter specifies the number of values
25       to compute. Subsequent parameters specify the argument and result  vec‐
26       tors.  Each vector is described by a pointer to the first element and a
27       stride, which is the increment between successive elements.
28
29
30       Specifically, vsincospi_(n, x, sx, s, ss, c,  sc)  simultaneously  com‐
31       putes s[i * *ss] = sinpi(x[i * *sx]) and c[i * *sc] = cospi(x[i * *sx])
32       for each i = 0, 1, ..., *n - 1. The  vsincosf_() function performs  the
33       same computation for single precision data.
34
35
36       Non-exceptional  results  are  accurate  to  within  a unit in the last
37       place.
38

USAGE

40       The element count *n must be greater than zero.  The  strides  for  the
41       argument  and  result  arrays can be arbitrary integers, but the arrays
42       themselves must not be the same or overlap. A zero  stride  effectively
43       collapses  an  entire  vector  into a single element. A negative stride
44       causes a vector to be accessed in descending  memory  order,  but  note
45       that the corresponding pointer must still point to the first element of
46       the vector to be used; if the stride is  negative,  this  will  be  the
47       highest-addressed  element  in memory. This convention differs from the
48       Level 1 BLAS, in which array parameters always  refer  to  the  lowest-
49       addressed element in memory even when negative increments are used.
50
51
52       These  functions  assume  that  the  default  round-to-nearest rounding
53       direction mode is in effect. On x86, these functions also  assume  that
54       the  default  round-to-64-bit rounding precision mode is in effect. The
55       result of calling a vector function with a non-default rounding mode in
56       effect is undefined.
57
58
59       These  functions  handle  special cases and exceptions in the spirit of
60       IEEE 754. In particular,
61
62           o      sinpi(NaN), cospi(NaN) are NaN,
63
64           o      sinpi(±0) is ±0,
65
66           o      sinpi(±Inf), cospi(±Inf) are NaN, and an  invalid  operation
67                  exception is raised.
68
69
70       An  application  wanting to check for exceptions should call feclearex‐
71       cept(FE_ALL_EXCEPT) before  calling  these  functions.  On  return,  if
72       fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is
73       non-zero, an exception has been raised. The application can then  exam‐
74       ine  the result or argument vectors for exceptional values. Some vector
75       functions can raise the inexact exception even if all elements  of  the
76       argument array are such that the numerical results are exact.
77

ATTRIBUTES

79       See attributes(5) for descriptions of the following attributes:
80
81
82
83
84       ┌─────────────────────────────┬─────────────────────────────┐
85       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
86       ├─────────────────────────────┼─────────────────────────────┤
87       │Interface Stability          │Committed                    │
88       ├─────────────────────────────┼─────────────────────────────┤
89       │MT-Level                     │MT-Safe                      │
90       └─────────────────────────────┴─────────────────────────────┘
91

SEE ALSO

93       feclearexcept(3M), fetestexcept(3M), attributes(5)
94
95
96
97SunOS 5.11                        14 Dec 2007                vsincospi_(3MVEC)
Impressum