This is the mail archive of the gsl-discuss@sources.redhat.com 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]

Re: GSL on Hitachi SR8000


Brian Gough wrote:

Reinhold Bader writes:
> printf("failure of range for i=%d: %20.16f %20.16f\n",i,h->range[i],abs(h->range[i] - hh->range[i]));

abs() returns an integer value, hence the strange floating point value O(1e-318).

Try this instead:

printf("failure i=%d: %.19e %.19e %.19e\n",i,h->range[i], hh->range[i], hh->range[i] - h->range[i])

failure i=1: 2.5188916876574307000e-03 2.5188916876574298000e-03 -8.6736173798840355000e-19
failure i=2: 5.0377833753148613000e-03 5.0377833753148596000e-03 -1.7347234759768071000e-18
failure i=3: 7.5566750629722920000e-03 7.5566750629722903000e-03 -1.7347234759768071000e-18
failure i=4: 1.0075566750629723000e-02 1.0075566750629719000e-02 -3.4694469519536142000e-18
failure i=5: 1.2594458438287154000e-02 1.2594458438287151000e-02 -3.4694469519536142000e-18
failure i=6: 1.5113350125944584000e-02 1.5113350125944581000e-02 -3.4694469519536142000e-18
etc. (up to i=34)



--
Dr. Reinhold Bader

Leibniz-Rechenzentrum, Abt. Benutzerbetreuung | Tel. +4989 289 28825
Barerstr. 21, 80333 Muenchen | email Bader@lrz.de





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]