bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] small error in the manual


From: Brian Gough
Subject: Re: [Bug-gsl] small error in the manual
Date: Thu, 13 Apr 2006 14:23:20 +0100

Li Can-An writes:
 > There's a small error in the manual named gsl-ref.ps.ps, which is
 > in section "8.4.12 matrix properties". In the first example
 > program, the line:
 > 
 > for(i=0;i<100;i++)
 > 
 > should be
 > 
 > for(i=0;i<10;i++)

Hello, 

Thanks for your email.  The upper bound is out-of-range to demonstrate
the range-checking error handling (described in the subsequent paragraph).

-- 
Brian Gough

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/




  Here is the output from the program.  The final loop attempts to read
  outside the range of the matrix `m', and the error is trapped by the
  range-checking code in `gsl_matrix_get'.

       $ ./a.out
       m(0,0) = 0.23
       m(0,1) = 1.23
       m(0,2) = 2.23
       m(1,0) = 100.23
       m(1,1) = 101.23
       m(1,2) = 102.23
       ...
       m(9,2) = 902.23
       gsl: matrix_source.c:13: ERROR: first index out of range
       Default GSL error handler invoked.
       Aborted (core dumped)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]