DCHFCM(3)

SYNOPSIS
INTEGER FUNCTION DCHFCM (D1, D2, DELTA)

NAME
dchfcm - Check a single cubic for monotonicity.

LIBRARY
SLATEC (PCHIP)

TYPE
DOUBLE PRECISION (CHFCM-S, DCHFCM-D)

AUTHOR
Fritsch, F. N., (LLNL)

DESCRIPTION
*Usage: DOUBLE PRECISION D1, D2, DELTA INTEGER ISMON, DCHFCM ISMON = DCHFCM (D1, D2, DELTA) *Arguments: D1,D2:IN are the derivative values at the ends of an interval. DELTA:IN is the data slope over that interval. *Function Return Values: ISMON : indicates the monotonicity of the cubic segment: ISMON = -3 if function is probably decreasing; ISMON = -1 if function is strictly decreasing; ISMON = 0 if function is constant; ISMON = 1 if function is strictly increasing; ISMON = 2 if function is non-monotonic; ISMON = 3 if function is probably increasing. If ABS(ISMON)=3, the derivative values are too close to the boundary of the monotonicity region to declare monotonicity in the presence of roundoff error. *Description: DCHFCM: Cubic Hermite Function -- Check Monotonicity. Called by DPCHCM to determine the monotonicity properties of the cubic with boundary derivative values D1,D2 and chord slope DELTA. *Cautions: This is essentially the same as old DCHFMC, except that a new output value, -3, was added February 1989. (Formerly, -3 and +3 were lumped together in the single value 3.) Codes that flag nonmonotonicity by "IF (ISMON.EQ.2)" need not be changed. Codes that check via "IF (ISMON.GE.3)" should change the test to "IF (IABS(ISMON).GE.3)". Codes that declare monotonicity via "IF (ISMON.LE.1)" should change to "IF (IABS(ISMON).LE.1)". REFER TO DPCHCM

ROUTINES CALLED
D1MACH

REVISION HISTORY (YYMMDD)
820518 DATE WRITTEN
820805 Converted to SLATEC library version.
831201 Changed from ISIGN to SIGN to correct bug that produced wrong sign when -1 .LT. DELTA .LT. 0 .
890206 Added SAVE statements.
890209 Added sign to returned value ISMON=3 and corrected argument description accordingly.
890306 Added caution about changed output.
890407 Changed name from DCHFMC to DCHFCM, as requested at the March 1989 SLATEC CML meeting, and made a few other minor modifications necessitated by this change.
890407 Converted to new SLATEC format.
890407 Modified DESCRIPTION to LDOC format.
891214 Moved SAVE statements. (WRB)