From a574b67d4e43e9f82179505215b883c815ed6d3c Mon Sep 17 00:00:00 2001
From: Thorsten Hater <24411438+thorstenhater@users.noreply.github.com>
Date: Wed, 14 Dec 2022 14:47:03 +0100
Subject: [PATCH] Fix docs about exprelr. (#2064)

`exprelr` was described all wrong, fixed.
---
 doc/fileformat/nmodl.rst | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/doc/fileformat/nmodl.rst b/doc/fileformat/nmodl.rst
index f8015e40..5ec115cc 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
-- 
GitLab