sinc ( x -- y )


Vocabulary
math.extras

Inputs and outputs
xa number
ya number


Word description
Returns the sinc function, calculated according to sin(pi * x) / (pi * x). The name sinc is short for "sine cardinal" or "sinus cardinalis".

Notes
0 sinc is the limit value of 1.

Definition
USING: kernel math math.constants math.functions ;

IN: math.extras

: sinc ( x -- y ) [ 1 ] [ pi * [ sin ] [ / ] bi ] if-zero ;