cosc
cosc(x)
Compute $\cos(\pi x) / x - \sin(\pi x) / (\pi x^2)$ if $x \neq 0$, and $0$
if $x = 0$. This is the derivative of sinc(x).
Examples
-
Calculate the value of cosc(x):
julia> cosc(0.5) 0.43060612817638346This example calculates the value of
cosc(0.5). -
Compute cosc(x) for an array of values:
julia> x = [0.1, 0.2, 0.3]; julia> cosc.(x) 3-element Array{Float64,1}: 3.062140737012792 1.8523159768093945 1.2877171461718348It computes the values of
cosc(x)for each element in the arrayx. - Handle special case when x = 0:
julia> cosc(0) 0.0When
xis zero, thecoscfunction returns zero.
Common mistake example:
julia> cosc("hello")
ERROR: MethodError: no method matching cosc(::String)
In this example, the input to the cosc function is a string instead of a numeric value. Make sure to provide valid numeric inputs to the cosc function to avoid such errors.
See Also
acos, acosd, acosh, acot, acotd, acoth, acsc, acscd, acsch, asec, asecd, asech, asin, asind, asinh, atan, atan2, atand, atanh, cos, cosc, cosd, cosh, cospi, cot, cotd, coth, csc, cscd, csch, deg2rad, rad2deg, sin, sinc, sind, sinh, sinpi, tan, tand, tanh,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.