Skip to main content
`Ctrl`+`K`

# FNRationalSetDenominator

Sets the parameters defining the denominator of the rational function.

## Synopsis

    #include "slepcfn.h"
    PetscErrorCode FNRationalSetDenominator(FN fn,PetscInt nq,PetscScalar qcoeff[])

Logically Collective

## Input Parameters

- fn - the math function context

- nq - number of coefficients

- qcoeff - coefficients (array of scalar values)

## Notes

Let the rational function be \(f(x) = p(x)/q(x)\), where \(p(x)\) and \(q(x)\) are polynomials. This function provides the coefficients of the denominator \(q(x)\). Hence, \(q(x)\) is of degree `nq-1`. If `nq` is zero, or this function is not called, then the function is assumed to be polynomial, \(f(x) = p(x)\).

In polynomials, high order coefficients are stored in the first positions of the array, e.g., to represent \(x^2-3\) use `{1,0,-3}`.

## See Also

FN: Mathematical Functions, `FNRATIONAL`, `FNRationalSetNumerator()`, `FNRationalGetDenominator()`

## Level

intermediate

## Location

src/sys/classes/fn/impls/rational/fnrational.c

## Examples

src/nep/tutorials/ex42.c

## Implementations

FNRationalSetDenominator_Rational() in src/sys/classes/fn/impls/rational/fnrational.c

Index of all FN routines Table of Contents for all manual pages Index of all manual pages