# exprel class¶

(Shortest import: from brian2.core.functions import exprel)

class brian2.core.functions.exprel[source]

Represents (exp(x) - 1)/x.

The benefit of using exprel(x) over (exp(x) - 1)/x is that the latter is prone to cancellation under finite precision arithmetic when x is close to zero, and cannot be evaluated when x is equal to zero.

Methods

 eval(arg) Returns a canonical form of cls applied to arguments args. fdiff([argindex]) Returns the first derivative of this function.

Details

classmethod eval(arg)[source]

Returns a canonical form of cls applied to arguments args.

The eval() method is called when the class cls is about to be instantiated and it should return either some simplified instance (possible of some other class), or if the class cls should be unmodified, return None.

fdiff(argindex=1)[source]

Returns the first derivative of this function.