Different uses of cosine function in Julia – cospi() and cosc() Method
The
cospi()
is an inbuilt function in
julia which is used to compute the value of
which is more accurately than
, where x is the large value.
Syntax: cospi(x)
Parameters:
- x: Specified large value.
Returns: It returns the value of which is more accurately than .
Example:
println(cospi( 55 ))
println(cospi( 22.7 ))
println(cospi( 3.17 ))
println(cospi( 22 / 7 ))
|
Output:
-1.0
-0.5877852522924714
-0.8607420270039438
-0.9009688679024193
cosc()
The
cosc()
is an inbuilt function in
julia which is used to compute the value of
which is the derivative of sinc(x).
Syntax: cosc(x)
Parameters:
Returns: It returns the value of .
Example:
println(cosc( 0 ))
println(cosc( 1 ))
println(cosc( 3.14 ))
println(cosc( 22 / 7 ))
|
Output:
0.0
-1.0
-0.27441551248588253
-0.2726897540491998
Last Updated :
21 Apr, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...