4.8.3.101. STEP5

Table 4.247 Function Name

Language type

Subroutine

FORTRAN

call rd_step5(x, x0, h0, x1, h1, order, value, errflg) or step5(x, x0, h0, x1, h1, order, value, errflg)

C/C++

rd_step5(x, x0, h0, x1, h1, order, &value, &errflg) or step5(x, x0, h0, x1, h1, order, &value, &errflg)

Table 4.248 Parameter information

Variable Name

Size

Description

x

double

Specify the independent variable.

x0

double

The x value at which the STEP5 function begins.

h0

double

Initial value of the STEP5 function.

x1

double

The x value at which the STEP5 function ends

h1

double

Final value at which the STEP5 function

order

int

  1. order = 0

    \(value=\left\{ \begin{array}{*{35}{l}} {{h}_{0}} & x\le {{x}_{0}} \\ {{h}_{0}}+({{h}_{1}}-{{h}_{0}})\left( 10{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{3}}-15{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{4}}+6{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{5}} \right) & {{x}_{0}}\le x\le {{x}_{1}} \\ {{h}_{1}} & x\ge {{x}_{1}} \\ \end{array} \right.\)

  2. order = 1

    \(value=\left\{ \begin{array}{*{35}{l}} 0 & x\le {{x}_{0}} \\ \frac{{{h}_{1}}-{{h}_{0}}}{{{x}_{1}}-{{x}_{0}}}\left( 30{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{2}}-60{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{3}}+30{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{4}} \right) & {{x}_{0}}\le x\le {{x}_{1}} \\ 0 & x\ge {{x}_{1}} \\ \end{array} \right.\)

  3. order = 2

    \(value=\left\{ \begin{array}{*{35}{l}} 0 & x\le {{x}_{0}} \\ \frac{{{h}_{1}}-{{h}_{0}}}{{{({{x}_{1}}-{{x}_{0}})}^{2}}}\left( 60{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{1}}-180{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{2}}+120{{\left( \frac{x-{{x}_{0}}}{{{x}_{1}}-{{x}_{0}}} \right)}^{3}} \right) & {{x}_{0}}\le x\le {{x}_{1}} \\ 0 & x\ge {{x}_{1}} \\ \end{array} \right.\)

value

double

errflg

logical

If an error is encountered in invoking Predefined subroutine, this variable becomes true. This variable must be declared as a logical variable.