summaryrefslogtreecommitdiff
path: root/gsl-1.9/specfunc/eval.h
blob: 00ddfed3b36d916618cb5cbf077e95220833e1e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* evaluate a function discarding the status value in a modifiable way */

#define EVAL_RESULT(fn) \
   gsl_sf_result result; \
   int status = fn; \
   if (status != GSL_SUCCESS) { \
     GSL_ERROR_VAL(#fn, status, result.val); \
   } ; \
   return result.val;

#define EVAL_DOUBLE(fn) \
   int status = fn; \
   if (status != GSL_SUCCESS) { \
     GSL_ERROR_VAL(#fn, status, result); \
   } ; \
   return result;