http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51133

Jason Dick <dickphd at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25823|0                           |1
        is obsolete|                            |

--- Comment #10 from Jason Dick <dickphd at gmail dot com> 2011-11-15 10:57:49 
UTC ---
Created attachment 25825
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25825
New test case for hermite() using only standard library

Okay, I've coded up a really quick and dirty recursive integration routine and
used that instead of the GSL routine.  This routine is much slower and less
accurate, but it works more or less.  The only difficulty is that this
particular integration routine isn't able to guarantee the total error very
well.  But as long as you use a tolerance on the integration that is a few
orders of magnitude better than you check, the result works well enough.  Here
I've used a tolerance of 1e-10, and checked to ensure that the results agree
with the expected value at 1e-7.  With these parameters, and an integration
range of -16.5 to 16.6, I get the expected result up to n=104 (after which an
inf is encountered in the integration).

As I understand it, you need to be much more clever to produce an integration
routine that is able to guarantee total error even on very complex functions. 
This routine is also susceptible to the possibility of choosing integration
values that just happen to be zero, even though the rest of the integration
interval is far from zero (this is why my integration interval is not even).

If you would like, I would happily support the use of this very simple
integration function.  If this is not good enough as it is, I wouldn't mind
putting a little bit of work into implementing a more complicated routine.  I
am a bit unfamiliar with the practices and conventions at use within GNU
development, though.  So please let me know if anything in particular would be
required on my part to do this.

P.S. I've also noticed that I (foolishly) used both the names hermite_test and
test_hermite, so I've fixed that to only use the name hermite_test.

Reply via email to