GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
dpchst.f
Go to the documentation of this file.
1*DECK DPCHST
2 DOUBLE PRECISION FUNCTION dpchst (ARG1, ARG2)
3C***BEGIN PROLOGUE DPCHST
4C***SUBSIDIARY
5C***PURPOSE DPCHIP Sign-Testing Routine
6C***LIBRARY SLATEC (PCHIP)
7C***TYPE DOUBLE PRECISION (PCHST-S, DPCHST-D)
8C***AUTHOR Fritsch, F. N., (LLNL)
9C***DESCRIPTION
10C
11C DPCHST: DPCHIP Sign-Testing Routine.
12C
13C
14C Returns:
15C -1. if ARG1 and ARG2 are of opposite sign.
16C 0. if either argument is zero.
17C +1. if ARG1 and ARG2 are of the same sign.
18C
19C The object is to do this without multiplying ARG1*ARG2, to avoid
20C possible over/underflow problems.
21C
22C Fortran intrinsics used: SIGN.
23C
24C***SEE ALSO DPCHCE, DPCHCI, DPCHCS, DPCHIM
25C***ROUTINES CALLED (NONE)
26C***REVISION HISTORY (YYMMDD)
27C 811103 DATE WRITTEN
28C 820805 Converted to SLATEC library version.
29C 870813 Minor cosmetic changes.
30C 890411 Added SAVE statements (Vers. 3.2).
31C 890531 Changed all specific intrinsics to generic. (WRB)
32C 890531 REVISION DATE from Version 3.2
33C 891214 Prologue converted to Version 4.0 format. (BAB)
34C 900328 Added TYPE section. (WRB)
35C 910408 Updated AUTHOR and DATE WRITTEN sections in prologue. (WRB)
36C 930503 Improved purpose. (FNF)
37C***END PROLOGUE DPCHST
38C
39C**End
40C
41C DECLARE ARGUMENTS.
42C
43 DOUBLE PRECISION arg1, arg2
44C
45C DECLARE LOCAL VARIABLES.
46C
47 DOUBLE PRECISION one, zero
48 SAVE zero, one
49 DATA zero /0.d0/, one/1.d0/
50C
51C PERFORM THE TEST.
52C
53C***FIRST EXECUTABLE STATEMENT DPCHST
54 dpchst = sign(one,arg1) * sign(one,arg2)
55 IF ((arg1.EQ.zero) .OR. (arg2.EQ.zero)) dpchst = zero
56C
57 RETURN
58C------------- LAST LINE OF DPCHST FOLLOWS -----------------------------
59 END
double precision function dpchst(arg1, arg2)
Definition dpchst.f:3