----------------------------------------------
Welcome to Strawberry Perl PDL Edition!
* URL - http://strawberryperl.com + http://pdl.perl.org
* to launch perl script run: perl c:\my\scripts\pdl-test.pl
* to start PDL console run: pdl2
* to update PDL run: cpanm PDL
* to install extra module run: cpanm PDL::Any::Module
or if previous fails: ppm PDL::Any::Module
* or you can use dev tools like: gcc, g++, gfortran, gmake
* see README.TXT for more info
----------------------------------------------
Perl executable: D:\sp\_64\sp-5.32.1-PDL\perl\bin\perl.exe
Perl version : 5.32.1 / MSWin32-x64-multi-thread
PDL version : 2.025
D:\sp\_64\sp-5.32.1-PDL>cd \C
D:\C>gcc -o gsl_spmatrix.exe gsl_spmatrix.c -ID:/sp/_64/sp-5.32.1-PDL/c/include -LD:/sp/_64/sp-5.32.1-PDL/c/lib -lgsl -lgslcblas -lm
D:\C>gsl_spmatrix.exe
size of _size_t is 8 bytes
1: got: 1.500000
1: nnz: 1
will be reported as 'out of range'
gsl: getset_source.c:27: ERROR: first index out of range
Default GSL error handler invoked.
D:\C>
####
#include
#include
#include
#include
int main(void) {
size_t v = 1;
v <<= 32;
v += 1;
printf("gsl header version : %s\n", GSL_VERSION);
printf("gsl library version: %s\n", gsl_version);
printf("size of _size_t is %d bytes\n", sizeof(size_t));
if(v == 1) printf("WTF\n");
gsl_spmatrix *m = gsl_spmatrix_alloc(1,1);
gsl_spmatrix_set( m, 1, 0, 1.5 );
printf("1: got: %f\n", gsl_spmatrix_get( m, 1, 0));
printf("1: nnz: %d\n", gsl_spmatrix_nnz( m ));
gsl_spmatrix_set( m, v, 0, 1.75 );
if (v >= m->size1) printf("will be reported as 'out of range'\n");
printf("2: got: %f\n", gsl_spmatrix_get( m, v, 0 ));
printf("2: nnz: %d\n", gsl_spmatrix_nnz( m ));
return 0;
}
####
D:\C>perl -le "$x = (1 << 32) + 2; print $x; print 'WTF' if $x == 2;"
4294967298