[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Re: more info on vector check failure on solaris
From: |
Britton Kerin |
Subject: |
[Bug-gsl] Re: more info on vector check failure on solaris |
Date: |
Mon, 12 Jan 2004 11:30:49 -0900 (AKST) |
That was dumb of me. Here is the fixed code, as you advised (the make
check log is attached):
if (fabs(r - z) > 2 * GSL_FLT_EPSILON * fabs(z)) {
status = 1;
printf ("\nr: " OUT_FORMAT ", x: " OUT_FORMAT ", y: " OUT_FORMAT
", z: " OUT_FORMAT "\nfabs(r - z): %.18e\n"
"2 * GSL_FLT_EPSILON * fabs(z): %.18e\n", r, x, y, z,
fabs(r - z), 2 * GSL_FLT_EPSILON * fabs(z));
}
Britton
On Sat, 10 Jan 2004, Brian Gough wrote:
> Britton Kerin writes:
> > ", z: " OUT_FORMAT "\nfabs(r - z): %d\n"
> > "2 * GSL_FLT_EPSILON * fabs(z): %d\n", r, x, y, z,
> > fabs(r - z), 2 * GSL_FLT_EPSILON * fabs(z));
>
> Hello,
>
> %d is an integer format, you need to use a floating point format in
> the output, e.g. %.18e
>
> > r: 1, x: 3, y: 3, z: 1
> > fabs(r - z): 1072693248 <<<< should use floating point format
> > 2 * GSL_FLT_EPSILON * fabs(z): 0 <<<< should use floating point format
>
> Thanks,
>
>
make_check_log_fixed.txt
Description: Text document