exprel class

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

class brian2.core.functions.exprel(arg)[source]

Bases: Function

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.

fdiff(argindex=1)[source]

Returns the first derivative of this function.