Method

NumCosmoMathDiffrc_d1_1_to_1

Declaration [src]

gdouble
ncm_diff_rc_d1_1_to_1 (
  NcmDiff* diff,
  const gdouble x,
  NcmDiffFunc1to1 f,
  gpointer user_data,
  gdouble* err
)

Description [src]

Calculates the first derivative of f: $\partial_i f$ using the central method plus Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R} \to \mathbb{R}$.

Parameters

x

Type: const gdouble

Function argument.

f

Type: NcmDiffFunc1to1

Function to differentiate.

user_data

Type: gpointer

Function user data.

The argument can be NULL.
The data is owned by the caller of the method.
err

Type: gdouble*

Estimated error.

The argument will be set by the function.
The argument can be set to NULL by the method.

Return value

Type: gdouble

The derivative of f at x.