/*< DOUBLE PRECISION FUNCTION DERFCX(X) >*/ double erfcx_cody(double x) { /* ------------------------------------------------------------------ */ /* This subprogram computes approximate values for exp(x*x) * erfc(x). */ /* (see comments heading CALERF). */ /* Author/date: W. J. Cody, March 30, 1987 */ /* ------------------------------------------------------------------ */ /*< INTEGER JINT >*/ /* S REAL X, RESULT */ /*< DOUBLE PRECISION X, RESULT >*/ /* ------------------------------------------------------------------ */ /*< JINT = 2 >*/ /*< CALL CALERF(X,RESULT,JINT) >*/ return calerf(x, 2); /* S ERFCX = RESULT */ /*< DERFCX = RESULT >*/ /*< RETURN >*/ /* ---------- Last card of DERFCX ---------- */ /*< END >*/ } /* derfcx_ */
/*< DOUBLE PRECISION FUNCTION DERFC(X) >*/ double erfc_cody(double x) { /* -------------------------------------------------------------------- */ /* This subprogram computes approximate values for erfc(x). */ /* (see comments heading CALERF). */ /* Author/date: W. J. Cody, January 8, 1985 */ /* -------------------------------------------------------------------- */ /*< INTEGER JINT >*/ /* S REAL X, RESULT */ /*< DOUBLE PRECISION X, RESULT >*/ /* ------------------------------------------------------------------ */ /*< JINT = 1 >*/ /*< CALL CALERF(X,RESULT,JINT) >*/ return calerf(x, 1); /* S ERFC = RESULT */ /*< DERFC = RESULT >*/ /*< RETURN >*/ /* ---------- Last card of DERFC ---------- */ /*< END >*/ } /* derfc_ */
_WMRTLINK double erfc(double x) { return calerf(x, 1); }
_WMRTLINK double erf(double x) { return calerf(x, 0); }