mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Adding Interactive Data Language (IDL) support.
This commit is contained in:
29
samples/IDL/mg_acosh.pro
Normal file
29
samples/IDL/mg_acosh.pro
Normal file
@@ -0,0 +1,29 @@
|
||||
; docformat = 'rst'
|
||||
|
||||
;+
|
||||
; Inverse hyperbolic cosine. Uses the formula:
|
||||
;
|
||||
; $$\text{acosh}(z) = \ln(z + \sqrt{z + 1} \sqrt{z - 1})$$
|
||||
;
|
||||
; :Examples:
|
||||
; The arc hyperbolic sine function looks like::
|
||||
;
|
||||
; IDL> x = 2.5 * findgen(1000) / 999. + 1.
|
||||
; IDL> plot, x, mg_acosh(x), xstyle=1
|
||||
;
|
||||
; This should look like:
|
||||
;
|
||||
; .. image:: acosh.png
|
||||
;
|
||||
; :Returns:
|
||||
; float, double, complex, or double complex depending on the input
|
||||
;
|
||||
; :Params:
|
||||
; z : in, required, type=numeric
|
||||
; input
|
||||
;-
|
||||
function mg_acosh, z
|
||||
compile_opt strictarr
|
||||
|
||||
return, alog(z + sqrt(z + 1) * sqrt(z - 1))
|
||||
end
|
||||
Reference in New Issue
Block a user