# HG changeset patch # User mas01cr # Date 1213705621 0 # Node ID c8c97224f3c709fbec88b07f0c248f75f60e67f6 # Parent 5d721f1ead0110e7eb2bc54b8e065ac089c11802 Make yinv and yfun not static, so that they can be called from gdb. diff -r 5d721f1ead01 -r c8c97224f3c7 sample.cpp --- a/sample.cpp Tue Jun 17 11:43:40 2008 +0000 +++ b/sample.cpp Tue Jun 17 12:27:01 2008 +0000 @@ -2,11 +2,12 @@ #include -static double yfun(double d) { +// static +double yfun(double d) { return gsl_sf_log(d) - gsl_sf_psi(d); } - -static double yinv(double y) { +// static +double yinv(double y) { double a = 1.0e-5; double b = 1000.0; @@ -151,7 +152,7 @@ sumlogdist += log(dist); i++; } else { - VERB_LOG(1, "infinity found: %f %f %f\n", v1norm, v2norm, v1v2); + VERB_LOG(1, "infinity/NaN found: %f %f %f\n", v1norm, v2norm, v1v2); } }