Mercurial > hg > octave-nkf
comparison liboctave/Quad.cc @ 4180:84fe3ca3a246
[project @ 2002-11-15 04:47:01 by jwe]
author | jwe |
---|---|
date | Fri, 15 Nov 2002 04:47:02 +0000 |
parents | 47d3baea432d |
children | 5719210fff4c |
comparison
equal
deleted
inserted
replaced
4179:8734ba917fea | 4180:84fe3ca3a246 |
---|---|
29 #endif | 29 #endif |
30 | 30 |
31 #include "Quad.h" | 31 #include "Quad.h" |
32 #include "f77-fcn.h" | 32 #include "f77-fcn.h" |
33 #include "lo-error.h" | 33 #include "lo-error.h" |
34 #include "quit.h" | |
34 #include "sun-utils.h" | 35 #include "sun-utils.h" |
35 | 36 |
36 static integrand_fcn user_fcn; | 37 static integrand_fcn user_fcn; |
37 | 38 |
38 // XXX FIXME XXX -- would be nice to not have to have this global | 39 // XXX FIXME XXX -- would be nice to not have to have this global |
57 const int&, int&, int*, double*); | 58 const int&, int&, int*, double*); |
58 | 59 |
59 static int | 60 static int |
60 user_function (double *x, int& ierr, double *result) | 61 user_function (double *x, int& ierr, double *result) |
61 { | 62 { |
63 BEGIN_INTERRUPT_WITH_EXCEPTIONS; | |
64 | |
62 #if defined (sun) && defined (__GNUC__) | 65 #if defined (sun) && defined (__GNUC__) |
63 double xx = access_double (x); | 66 double xx = access_double (x); |
64 #else | 67 #else |
65 double xx = *x; | 68 double xx = *x; |
66 #endif | 69 #endif |
75 *result = xresult; | 78 *result = xresult; |
76 #endif | 79 #endif |
77 | 80 |
78 if (quad_integration_error) | 81 if (quad_integration_error) |
79 ierr = -1; | 82 ierr = -1; |
83 | |
84 END_INTERRUPT_WITH_EXCEPTIONS; | |
80 | 85 |
81 return 0; | 86 return 0; |
82 } | 87 } |
83 | 88 |
84 double | 89 double |