The SINC function returns the sinc of X, which is defined as SIN(X) / X. At X = 0, SINC returns 1.0.

Examples


To find the sinc of each element in the array [0, 0.5, 2.0] and print the result, enter:

IDL> SINC([0, 0.5, 2])
1.00000  0.958851  0.454649

To plot the SINC function between -10 and 10, enter:

p = PLOT("sinc")

To compute the "normalized" sinc function, which is sin(πx) / (πx):

IDL> SINC(!DPI * [0, 0.5, 2])
1.0000000000000000  0.63661977236758138   -3.8981718325193755e-17

Note: !DPI is a read-only system variable that contains the double-precision value of π.

Syntax


Result = SINC(X)

Return Value


Returns the sinc value. If X is integer or float then the result is type FLOAT. If X is a double then the result is DOUBLE. If X is complex or double complex then the result is COMPLEX or DCOMPLEX, respectively.

Arguments


X

The value for which the sinc is desired. If X is an array, the result has the same structure, with each element containing the sinc of the corresponding element of X.

Keywords


Thread Pool Keywords

This routine is written to make use of IDL’s thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine. See Thread Pool Keywords for details.

Version History


9.3

Introduced

See Also


ASIN, SIN, SINH