derivative#

swordfish.function.derivative()#

Return the derivative of func of order n at X.

Parameters:
  • func (Constant) – A unary function.

  • X (Constant) – A numeric scalar/vector indicating where the derivative is evaluated.

  • dx (Constant, optional) – A scalar of FLOAT type indicating spacing. The default value is 1.0.

  • n (Constant, optional) – An integer scalar indicating the order of the derivative. As of now only n=1 is supported.

  • order (Constant, optional) – An integer scalar indicating the number of points to use. It must be an odd number. The default value is 3 and can be values between 3 and 1023.