[Top][All Lists]

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

[Help-gsl] Error handling

From: Raphael Mack
Subject: [Help-gsl] Error handling
Date: Tue, 18 Jul 2006 15:17:40 +0200


I've problems understanding the error handling stuff of gsl.
What I want to execute code like the following:

double x = 9e307;
int result;
gsl_matrix A, B;
A = gsl_matrix_alloc(1, 2);
B = gsl_matrix_alloc(1, 2);

gsl_matrix_set(A, 0, 0, x);
gsl_matrix_set(A, 0, 1, 1);
gsl_matrix_memcpy(B, A);

result = gsl_matrix_add(A, B);

The last line will overflow for element (0, 0) so I'd like to see the
value of A = [Inf, 3] and I expected result == GSL_EOVRFLW.

I wonder how I can compile my app and setup gsl to get this behavior,
because I already played with gsl_ieee_set_mode, but then I get an OS
signal which I don't like.

Thanks in advance for any hint.


reply via email to

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