Fast version of trigonometric functions (when vector size >= 50000). They respectively compute the cosine, sine, tangent, arc-cosine, arc-sine, arc-tangent, and the two-argument arc-tangent.
cospi_(x)
, sinpi_(x)
, and tanpi_(x)
, compute cos(pi*x)
,
sin(pi*x)
, and tan(pi*x)
.
cos_(x, para = 50000L)
sin_(x, para = 50000L)
tan_(x, para = 50000L)
acos_(x, para = 50000L)
asin_(x, para = 50000L)
atan_(x, para = 50000L)
cospi_(x, para = 50000L)
sinpi_(x, para = 50000L)
tanpi_(x, para = 50000L)
A numeric vector, matrix, or data frame with the transformed values.
They are not generic functions and do not process factor, Date, POSIXt, difftime, complex, or S4 objects (use base R equivalent function instead). Data frames are processed column-wise, providing each column is compatible. All attributes are preserved.
cos_(1:5)
#> [1] 0.5403023 -0.4161468 -0.9899925 -0.6536436 0.2836622