This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello Instead of computing 2 times fabs(fn), why not storing it in a variable ? result->val = fn; - result->err = GSL_DBL_EPSILON*fabs(fn); + result->err = 2.0*GSL_DBL_EPSILON; + double factor = fabs(fn); + if (factor > 1.0) + result->err *= factor; Have a nice day.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |