APBS  1.4.1
Vcap class

Collection of routines which cap certain exponential and hyperbolic functions. More...

Files

file  vcap.c
 Class Vcap methods.
 
file  vcap.h
 Contains declarations for class Vcap.
 

Macros

#define EXPMAX   85.00
 Maximum argument for exp(), sinh(), or cosh()
 
#define EXPMIN   -85.00
 Minimum argument for exp(), sinh(), or cosh()
 

Functions

VEXTERNC double Vcap_exp (double x, int *ichop)
 Provide a capped exp() function. More...
 
VEXTERNC double Vcap_sinh (double x, int *ichop)
 Provide a capped sinh() function. More...
 
VEXTERNC double Vcap_cosh (double x, int *ichop)
 Provide a capped cosh() function. More...
 

Detailed Description

Collection of routines which cap certain exponential and hyperbolic functions.

Note
These routines are based on FORTRAN code by Mike Holst

Function Documentation

VEXTERNC double Vcap_cosh ( double  x,
int *  ichop 
)

Provide a capped cosh() function.

If the argument x of Vcap_cosh() exceeds EXPMAX or EXPMIN, then we return cosh(EXPMAX) or cosh(EXPMIN) rather than cosh(x).

Note
Original FORTRAN routine from PMG library by Mike Holst Original notes: to control overflow in the hyperbolic and exp functions, note that the following are the argument limits of the various functions on various machines after which overflow occurs: Convex C240, Sun 3/60, Sun SPARC, IBM RS/6000: sinh, cosh, exp: maximal argument (abs value) = 88.0d0 dsinh, dcosh, dexp: maximal argument (abs value) = 709.0d0
Author
Nathan Baker (based on FORTRAN code by Mike Holst)
Returns
cosh(x) or capped equivalent
Parameters
xArgument to cosh()
ichopSet to 1 if function capped, 0 otherwise

Definition at line 91 of file vcap.c.

VEXTERNC double Vcap_exp ( double  x,
int *  ichop 
)

Provide a capped exp() function.

If the argument x of Vcap_exp() exceeds EXPMAX or EXPMIN, then we return exp(EXPMAX) or exp(EXPMIN) rather than exp(x).

Note
Original FORTRAN routine from PMG library by Mike Holst Original notes: to control overflow in the hyperbolic and exp functions, note that the following are the argument limits of the various functions on various machines after which overflow occurs: Convex C240, Sun 3/60, Sun SPARC, IBM RS/6000: sinh, cosh, exp: maximal argument (abs value) = 88.0d0 dsinh, dcosh, dexp: maximal argument (abs value) = 709.0d0
Author
Nathan Baker (based on FORTRAN code by Mike Holst)
Returns
exp(x) or capped equivalent
Parameters
xArgument to exp()
ichopSet to 1 if function capped, 0 otherwise

Definition at line 59 of file vcap.c.

VEXTERNC double Vcap_sinh ( double  x,
int *  ichop 
)

Provide a capped sinh() function.

If the argument x of Vcap_sinh() exceeds EXPMAX or EXPMIN, then we return sinh(EXPMAX) or sinh(EXPMIN) rather than sinh(x).

Note
Original FORTRAN routine from PMG library by Mike Holst Original notes: to control overflow in the hyperbolic and exp functions, note that the following are the argument limits of the various functions on various machines after which overflow occurs: Convex C240, Sun 3/60, Sun SPARC, IBM RS/6000: sinh, cosh, exp: maximal argument (abs value) = 88.0d0 dsinh, dcosh, dexp: maximal argument (abs value) = 709.0d0
Author
Nathan Baker (based on FORTRAN code by Mike Holst)
Returns
sinh(x) or capped equivalent
Parameters
xArgument to sinh()
ichopSet to 1 if function capped, 0 otherwise

Definition at line 75 of file vcap.c.