[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] comment and code differ in francis.c, line 560,561
From: |
Kurt Alan Franke |
Subject: |
[Help-gsl] comment and code differ in francis.c, line 560,561 |
Date: |
Sun, 2 Nov 2014 23:04:34 +0000 |
Hello all,
My first post. I am looking at the francis.c file of gsl-1.16, lines 560.. and
found:
/* q = max(1, i - 1) */
q = (1 > ((int)i - 1)) ? 0 : (i - 1);
/* r = min(i + 3, N - 1) */
r = ((i + 3) < (N - 1)) ? (i + 3) : (N - 1);
The first comment doesn’t appear to agree with the code below.
i q max(1,i-1)
0 0 1 <--
1 0 1 <--
2 1 1
3 2 2
…
Is the comment wrong, or is there an error in the code? I assume the comment
must be wrong. (?)
Does someone have the Golub book to check?
Kind regards,
Kurt
- [Help-gsl] comment and code differ in francis.c, line 560,561,
Kurt Alan Franke <=