Opened 15 years ago

Closed 10 years ago

#188 closed enhancement (wontfix)

Use GSL defined round of errors?

Reported by: Jari Häkkinen Owned by: Jari Häkkinen
Priority: minor Milestone:
Component: test Version: trunk
Keywords: Cc:

Description (last modified by Jari Häkkinen)

As it is now we use hard coded error limits.

See source:trunk/test/nni_test.cc at approximately at line 70:

double error_bound = 5e-13;

See source:trunk/test/regression_test.cc at approximately at line 220:

if (fabs(fit[0]-1.012229646706 + fit[1]-0.012561322528 +
	 fit[2]+1.159674470130) > 1e-11) {
	*error << "regression_Polynomial: cannot reproduce fit."
	       << std::endl;
	ok=false;
}

See source:trunk/test/svd_test.cc at approximately at line 44:

double MAXTOL=1e-13; // accepted error

Change History (6)

comment:1 Changed 15 years ago by Jari Häkkinen

Description: modified (diff)

comment:2 Changed 15 years ago by Jari Häkkinen

Description: modified (diff)

comment:3 Changed 15 years ago by Peter

Milestone: later

comment:4 Changed 15 years ago by Peter

Where do you find those GSL guys?

Are they somehow related to the different GSL functions or are they solely based on precision. In the first case we are of course limited to use this in test of our GSL wrappers. If the latter is the case, we are limited to very simple functionality. In more complicated algorithms it is rather complicated to go from precision to round errors.

comment:5 Changed 15 years ago by Jari Häkkinen

I don't remember, but I know that GSL tests use GSL error bounds. Nothing fancy but I just thought we should use them since we wrap GSL.

comment:6 Changed 10 years ago by Peter

Milestone: yat 0.x+
Resolution: wontfix
Status: newclosed

I suppose jari referred to this function

http://www.gnu.org/software/gsl/manual/gsl-ref.html#Approximate-Comparison-of-Floating-Point-Numbers

We could use it but it looks very similar to test::Suite::equal, so I just close this instead.

Note: See TracTickets for help on using tickets.