File: nmodls_built_in_functions.rst

package info (click to toggle)
neuron 8.2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,760 kB
  • sloc: cpp: 149,571; python: 58,465; ansic: 50,329; sh: 3,510; xml: 213; pascal: 51; makefile: 35; sed: 5
file content (93 lines) | stat: -rw-r--r-- 2,725 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.. _nmodls_built_in_functions:

NMODL's built-in functions
===============

These functions, which are provided by the C language math library, can be called from within NMODL code. With the exception of **abs()**, all expect double-precision floating point arguments and return double-precision floating point values.

    **acos(x) - compute the arc cosine**

        : Returns the arc cosine of its argument (arccos x). The argument must be in the range -1.0 to 1.0.

    **asin(x) - compute the arc sine**

         : Returns the arc sine of its argument (arcsin x). The argument must be in the range -1.0 to 1.0.

    **atan(x) - compute the arc tangent**

        : Returns the arc tangent of its argument (arctan x).

    **atan2(y,x) - compute the arc tangent of y/x**

        : Returns the arc tangent of the ratio y/x (arctan y/x).

    **ceil(x) - round upwards**

        : Returns the smallest integral value greater than or equal to its argument (x).

    **cos(x) - compute the cosine**

        : Returns the cosine of its argument (cos x). The angle is expressed in radians.

    **cosh(x) - compute the hyperbolic cosine**

        : Returns the hyperbolic cosine for a real argument (cosh x).

    **exp(x) - compute the exponential function**

        : Returns the value of e raised to the argument power (:math:`e^x`).

    **fabs(x) - compute the absolute value of a floating point number**

        : Returns the absolute value of its argument (|x|).

    **floor(x) - round downwards**

        : Returns the largest integral value less than or equal to its argument (x).

    **fmod(x,y) - compute x modulo y**

        : Returns the value of x modulo y, the remainder resulting from x/y. (In Python this is ``x%y``)

    **log(x) - compute the natural logarithm**

        : Returns the natural logarithm of its argument (ln x).

    **log10(x) - compute the base 10 logarithm**

        : Returns the base 10 logarithm of its argument (log10 x).

    **pow(x,y) - compute x raised to the y power**

        : Returns the value of x raised to the power of y (:math:`x^y`).

    **sin(x) - compute the sine**

        : Returns the sine of its argument (sin x). The angle is expressed in radians.

    **sinh(x) - compute the hyperbolic sine**

        : Returns the hyperbolic sine for a real argument (sinh x).

    **sqrt(x) - compute the square root**

        : Returns the positive square root of its argument (:math:`\sqrt{x}`).

    **tan(x) - compute the tangent**

        : Returns the tangent of its argument (tan x). The angle is expressed in radians.

    **tanh(x) - compute the hyperbolic tangent**

        : Returns the hyperbolic tangent for a real argument (tanh x).