diff --git a/doc/fileformat/nmodl.rst b/doc/fileformat/nmodl.rst index f8015e40f41acee4216da1a77d3d40e47ca7e920..5ec115cc26ce701b9291360c5f50832473afa46c 100644 --- a/doc/fileformat/nmodl.rst +++ b/doc/fileformat/nmodl.rst @@ -164,16 +164,16 @@ Arbor-specific features All of the following functions take a single argument `x` and return a floating point value. - ================== ===================================== ========= - Function name Description Semantics - ================== ===================================== ========= - sqrt(x) square root :math:`\sqrt{x}` - step_right(x) right-continuous heaviside step :math:`\begin{align*} 1 & ~~ \text{if} ~x \geq 0, \\ 0 & ~~ \text{otherwise}. \end{align*}` - step_left(x) left-continuous heaviside step :math:`\begin{align*} 1 & ~~ \text{if} ~x \gt 0, \\ 0 & ~~ \text{otherwise}. \end{align*}` - step(x) heaviside step with half value :math:`\begin{align*} 1 & ~~ \text{if} ~x \gt 0, \\ 0 & ~~ \text{if} ~x \lt 0, \\ 0.5 & ~~ \text{otherwise}. \end{align*}` - signum(x) sign of argument :math:`\begin{align*} +1 & ~~ \text{if} ~x \gt 0, \\ -1 & ~~ \text{if} ~x \lt 0, \\ 0 & ~~ \text{otherwise}. \end{align*}` - exprelr(x) guarded exponential :math:`x e^{1-x}` - ================== ===================================== ========= + ================== ======================================== ========= + Function name Description Semantics + ================== ======================================== ========= + sqrt(x) square root :math:`\sqrt{x}` + step_right(x) right-continuous heaviside step :math:`\begin{align*} 1 & ~~ \text{if} ~x \geq 0, \\ 0 & ~~ \text{otherwise}. \end{align*}` + step_left(x) left-continuous heaviside step :math:`\begin{align*} 1 & ~~ \text{if} ~x \gt 0, \\ 0 & ~~ \text{otherwise}. \end{align*}` + step(x) heaviside step with half value :math:`\begin{align*} 1 & ~~ \text{if} ~x \gt 0, \\ 0 & ~~ \text{if} ~x \lt 0, \\ 0.5 & ~~ \text{otherwise}. \end{align*}` + signum(x) sign of argument :math:`\begin{align*} +1 & ~~ \text{if} ~x \gt 0, \\ -1 & ~~ \text{if} ~x \lt 0, \\ 0 & ~~ \text{otherwise}. \end{align*}` + exprelr(x) smooth continuation over :math:`x=0` of :math:`x/(1 - e^{-x})` + ================== ======================================== ========= Voltage Processes ----------------- @@ -484,10 +484,10 @@ A common pattern is the use of a guarded exponential of the form .. code:: - if (x != 1) { - r = x*exp(1 - x) + if (x != 0) { + r = a*x/(exp(-x) - 1) } else { - r = x + r = a } However, it can be written in Arbor's NMODL dialect as