slatec bessel_k(n, %i*x): lack of precision for large x
Subject: slatec bessel_k(n, %i*x): lack of precision for large x
From: Edwin Woollett
Date: Sat, 3 Mar 2012 11:04:29 -0800
On Mar. 2, 2012, Raymond Toy wrote:
------------------------------------
>> /* this calculation also agrees with Mma, but the zbesk
>> error messages clutter up the output, and
>> show why it is desireable to have a way to
>> surpress the printing of these messages to
>> the screen! */
>>
>
>What would you want? No messages so you have no way of knowing that
>something potentially bad happened? Signal an (annoying?) error?
-------------------------------------
Normally, zbesk sends a error message to the screen, which is
needed to alert the user in a normal mode.
For a package, like nint, which seeks to produce a clean answer
or (false plus coherent overall error message), there could be a
global switch and a global list, say spfun_flag and spfun_err_list.
A package programmer could then change the normal setting
of spfun_flag, (e.g., on entering nint)
which would cause each slatec special function
to cons an error code into spfun_list (instead of sending a ierr
message to the screen) whenever the normal error code is > 0, say.
The package programmer would set the global list
spfun_err_list: [] at the start of the calculation, and
would look at the list contents at the end of the
calculation, to interpret the reliability of the results.
The global switch would be returned to its default setting
by the package programmer at the end of the calculation
(e.g., before nint returns a result to the screen).
Ted