GSL on Hitachi SR8000
Jochen Küpper
jochen@unc.edu
Sat Aug 24 11:08:00 GMT 2002
On Sat, 24 Aug 2002 19:45:04 +0200 Reinhold Bader wrote:
Reinhold> printf("failure of range for i=%d: %20.16f %20.16f\n",i,h->range[i],abs(h->range[i] - hh->range[i]));
Reinhold> and receive failures for h->range. Oddly enough, the absolute differences are
Reinhold> 0:
Reinhold> failure of range for i=1: 0.0025188916876574 0.0000000000000000
Reinhold> failure of range for i=2: 0.0050377833753149 0.0000000000000000
Reinhold> failure of range for i=3: 0.0075566750629723 0.0000000000000000
Reinhold> failure of range for i=4: 0.0100755667506297 0.0000000000000000
Reinhold> failure of range for i=5: 0.0125944584382872 0.0000000000000000
Reinhold> perhaps the machine differentiates 0.0 and -0.0? Generally, comparing
Reinhold> floats etc. to equality is generally not a good idea (and you do
Reinhold> read in %lg's in gsl_histogram_fscanf)...
Hmm, what's the output if you use %g instead of %f?
Greetings,
Jochen
--
University of North Carolina phone: +1-919-962-4403
Department of Chemistry phone: +1-919-962-1579
Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041
Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E
More information about the Gsl-discuss
mailing list