• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

src/generic/vcap.c

Go to the documentation of this file.
00001 
00049 #include "apbscfg.h"
00050 #include "apbs/vcap.h"
00051 
00052 VPUBLIC double Vcap_exp(double x, int *ichop) {
00053 
00054     /* The two chopped arguments */
00055     if (x > EXPMAX) {
00056        (*ichop) = 1;
00057        return VEXP(EXPMAX);
00058     } else if (x < EXPMIN) {
00059        (*ichop) = 1;
00060        return VEXP(EXPMIN);
00061     } 
00062 
00063     /* The normal EXP */
00064     (*ichop) = 0;
00065     return VEXP(x);
00066 }
00067     
00068 VPUBLIC double Vcap_sinh(double x, int *ichop) {
00069 
00070     /* The two chopped arguments */
00071     if (x > EXPMAX) {
00072        (*ichop) = 1;
00073        return VSINH(EXPMAX);
00074     } else if (x < EXPMIN) {
00075        (*ichop) = 1;
00076        return VSINH(EXPMIN);
00077     } 
00078 
00079     /* The normal SINH */
00080     (*ichop) = 0;
00081     return VSINH(x);
00082 }
00083     
00084 VPUBLIC double Vcap_cosh(double x, int *ichop) {
00085 
00086     /* The two chopped arguments */
00087     if (x > EXPMAX) {
00088        (*ichop) = 1;
00089        return VCOSH(EXPMAX);
00090     } else if (x < EXPMIN) {
00091        (*ichop) = 1;
00092        return VCOSH(EXPMIN);
00093     } 
00094 
00095     /* The normal COSH */
00096     (*ichop) = 0;
00097     return VCOSH(x);
00098 }
00099     

Generated on Wed Oct 20 2010 12:01:33 for APBS by  doxygen 1.7.2