By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,805 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,805 IT Pros & Developers. It's quick & easy.

GSL Error with for an "if ()" ???

P: n/a
I hope someone could say me where can i find the meaning of:

gsl: sinint.c:359: ERROR: domain error
Default GSL error handler invoked.
Aborted

or where i can find it.
I don't understand the meaning. I tried to find the error but it seems
inside an "if ()", and it's not a GSL instruction. The program was ok
since i addicted at the function:

if (fabs (j - j_esterno) == 1)
{
distanza_collinear = dist_adiacenti_collinear ;
}
else
{
distanza_collinear = (dist_adiacenti_collinear / fabs (j -
j_esterno)) + (lunghezza_dipolo / fabs (j_esterno - j - 1)) ;
}

Now the function is:
void onda_vert_piano_gp (gsl_matrix_complex *matrice_acc_dipoli,
gsl_vector *elementi_guasti_x, gsl_vector *elementi_guasti_y, int
guasti, int N, int M, int dist_adiacenti_side_by_side, int
dist_adiacenti_collinear, int lunghezza_dipolo, char *parassita)
{
int i, j, i_esterno, j_esterno, guasto = 0 ;
double distanza_collinear, distanza_side_by_side ;
gsl_complex accoppiamento, collinear_x, side_y ;

for (i_esterno = 0 ; i_esterno < M ; i_esterno++)
{
for (j_esterno = 0 ; j_esterno < N ; j_esterno++)
{
for (i = 0 ; i < M ; i++)
{
/* Lungo x sono collinear. */
// distanza_collinear = dist_adiacenti_collinear * fabs
(i_esterno - i) ;
distanza_side_by_side =
dist_adiacenti_side_by_side / fabs (i_esterno - i) ;
for (j = 0 ; j < N ; j++)
{
if ((i_esterno == i) && (j_esterno == j))
{
guasto = ricerca_guasto_piano
(elementi_guasti_x, elementi_guasti_y, guasti, i, j, i_esterno,
j_esterno) ;
if (guasto == 1)
{
if (strcmp (parassita, "ca") == 0)
{
GSL_SET_COMPLEX (&accoppiamento, 10e30,
0.0) ; /* Caso di ca. */
}
else
{
GSL_SET_COMPLEX (&accoppiamento, 0.0,
0.0) ; /* Caso di cc. */
}
guasto = 0 ;
}
else
{
auto_impedenza (&accoppiamento,
lunghezza_dipolo) ;
}
}
else
{
/* Lungo y sono side-by-side. */
if (fabs (j - j_esterno) == 1.0)
{
distanza_collinear = dist_adiacenti_collinear ;
}
else
{
distanza_collinear = (dist_adiacenti_collinear / fabs (j -
j_esterno)) + (lunghezza_dipolo / fabs (j_esterno - j - 1)) ;
}
guasto_piano_d_gp (distanza_collinear,
distanza_side_by_side, lunghezza_dipolo, &side_y, &collinear_x,
&accoppiamento) ;
}
gsl_matrix_complex_set (matrice_acc_dipoli, N *
i_esterno + j_esterno, N * i + j, accoppiamento) ;
}
}
}
}
}

Help Please!!!

Apr 24 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Aleramo" <mo************@yahoo.it> writes:
I hope someone could say me where can i find the meaning of:

gsl: sinint.c:359: ERROR: domain error
Default GSL error handler invoked.
Aborted

or where i can find it.


I would suggest asking questions about GSL in a GSL-specific
newsgroup. comp.lang.c is not a good place to ask.
--
int main(void){char p[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz.\
\n",*q="kl BIcNBFr.NKEzjwCIxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+=strchr(p,*q++)-p;if(i>=(int)sizeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}
Apr 24 '06 #2

P: n/a
Where can i find it?

Apr 24 '06 #3

P: n/a
"Aleramo" <mo************@yahoo.it> writes:
Where can i find it?


Where can you find what? Don't assume that anyone can see the article
to which you're replying. See <http://cfaj.freeshell.org/google/>.

Since I did happen to see what you're replying to, I'll point you to
<http://www.gnu.org/software/gsl/#mailinglists>.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Apr 24 '06 #4

P: n/a
On 24 Apr 2006 14:29:08 -0700, in comp.lang.c , "Aleramo"
<mo************@yahoo.it> wrote:
I hope someone could say me where can i find the meaning of:

gsl: sinint.c:359: ERROR: domain error
Default GSL error handler invoked.
Aborted


You are unlikely to get an answer in comp.lang.c, since GSL (whatever
that is ) is offtopic here. The domain error suggests you're either
dividing by zero, or overflowing a floating point value. Focus on
that, not the GSL message, since thats simply telling you that GSL
invoked its default error handler.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Apr 24 '06 #5

P: n/a
TJW
Hello,

As others have mentioned, this is off-topic here. I have worked with the GNU
Scientific Library (GSL) some so I will make a comment that might help, but in
the future you might have better luck a GSL group.
gsl: sinint.c:359: ERROR: domain error
Default GSL error handler invoked.
Aborted


A quick look at lines 358-360 of file sinint.c reveals:
if(x <= 0.0) {
DOMAIN_ERROR(result);
}
This is in function int gsl_sf_Ci_e(const double x, gsl_sf_result * result);
which means that you are calling Ci(x) with x < 0, which is a domain error. As
I don't see a call to Ci(x) either explicitly or implicitly in the code you
posted, it seems that your error is elsewhere.

In case you deleted the GSL source or simply installed the packages, the
source for this function can be found here:
http://koders.com/c/fid5CD508768B20C...px?s=Chebyshev

Good Luck,
TJW
Apr 24 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more C / C++ Questions on Bytes