comparison sample.cpp @ 283:0e44de38d675

Trivial fix for some compilers trying to be smart and noting a path whereby something uninitialized might be returned in yinv().
author mas01cr
date Thu, 03 Jul 2008 08:50:57 +0000
parents 3be15407e814
children cacad987d785
comparison
equal deleted inserted replaced
282:f6b80b9f6afe 283:0e44de38d675
14 double b = 1000.0; 14 double b = 1000.0;
15 15
16 double ay = yfun(a); 16 double ay = yfun(a);
17 double by = yfun(b); 17 double by = yfun(b);
18 18
19 double c, cy; 19 double c = 0;
20 double cy;
20 21
21 /* FIXME: simple binary search; there's probably some clever solver 22 /* FIXME: simple binary search; there's probably some clever solver
22 in gsl somewhere which is less sucky. */ 23 in gsl somewhere which is less sucky. */
23 while ((b - a) > 1.0e-5) { 24 while ((b - a) > 1.0e-5) {
24 c = (a + b) / 2; 25 c = (a + b) / 2;