This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
parameter checking
- From: "Nigel Wetters" <Nigel dot Wetters at lshtm dot ac dot uk>
- To: <gsl-discuss at sources dot redhat dot com>
- Date: Tue, 18 Mar 2003 17:13:19 +0000
- Subject: parameter checking
I guess this is a question about coding style. For the past few days, I've been stupidly passing zero values to construct gamma distributrions, when the library assumed it would never be passed a zero value. I'm obviously at fault here, but I would have found the problem a lot quicker with a bit of help from the libraries.
If a function expects parameters within certain bounds, should those parameters be checked, or is it the user's responsibility to check bounds before calling a function?
Nigel Wetters
Research Fellow, Epidemiology Unit
London School of Hygiene and Tropical Medicine