gsl_specfunc__eval.h 416 B

123456789101112131415161718
  1. /* evaluate a function discarding the status value in a modifiable way */
  2. #define EVAL_RESULT(fn) \
  3. gsl_sf_result result; \
  4. int status = fn; \
  5. if (status != GSL_SUCCESS) { \
  6. GSL_ERROR_VAL(#fn, status, result.val); \
  7. } ; \
  8. return result.val;
  9. #define EVAL_DOUBLE(fn) \
  10. int status = fn; \
  11. if (status != GSL_SUCCESS) { \
  12. GSL_ERROR_VAL(#fn, status, result); \
  13. } ; \
  14. return result;