SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

BN

Name:
    BN (LET)
Type:
    Library Function
Purpose:
    Compute the Bernoulli number or the Bernoulli polynomial.
Description:
    The Bernoulli numbers can be defined by the recurrence relation:

      B(N) = -SUM[(1/(k!(n-k)!)B(k)] where the summation is
 from k = 0 to n-1

    where N defines the order of the Bernouilli numbers and "!" is the factorial function, and B(0) = 1.

    The Bernoulli polynomials can be defined in terms of the Bernoulli numbers:

      B(x,n)

    where BINOM is the binomial coefficient function (n!/(k!(n-k)!), and B(k) is the Bernoulli number of order k.

    Dataplot computes this function using the BERNOB and BERNPN routines from "Computation of Special Functions" (see the Reference section below).

Syntax 1:
    LET <y> = BN(<x>,<n>)             <SUBSET/EXCEPT/FOR qualification>
    where <x> is a number, variable or parameter;
                <n> is a non-negagive integer number, variable or parameter;
                <y> is a variable or a parameter (depending on what <x> and <n> are) where the computed Bernoulli polynomial values are stored;
                and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes the Bernoulli polynomial of order .

Syntax 2:
    LET <y> = BN(<n>)             <SUBSET/EXCEPT/FOR qualification>
    where <n> is a non-negagive integer number, variable or parameter; and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes the Bernoulli number of order .

Examples:
    LET A = BN(12)
    LET A = BN(B)
    LET A = BN(2.5,4)
    LET Y = BN(X,N)
Default:
    None
Synonyms:
    None
Related Commands:
    BINCDF = Compute the binomial cumulative distribution function.
    BINPDF = Compute the binomial probability mass function.
    BINPPF = Compute the binomial percent point function.
    BINOMIAL = Compute the binomial coefficients.
    EN = Compute Euler number or polynomial.
Reference:
    "Computation of Special Functions", Shanjie Zhang and Jianming Jin, John Wiley and Sons, 1996, chapter 1.
Applications:
    Probability
Implementation Date:
    1997/12
Program:
    TITLE BERNOULLI POLYNOMIAL OF ORDER 2
    LET X = SEQUENCE 0 0.01 5
    LET Y = BN(X,2)
    RETAIN X Y SUBSET Y > 0
    YLIMTIS 0 20
    YTIC OFFSET 0 1
    PLOT Y X

    plot generated by sample program

Date created: 6/5/2001
Last updated: 4/4/2003
Please email comments on this WWW page to alan.heckert@nist.gov.