ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 03 Jan 2013 10:39:18 +0100Arbitrary precision BesselYhttps://ask.sagemath.org/question/9679/arbitrary-precision-bessely/Hi,
I consider using Sage for some calculations which contain Bessel functions of complex arguments. Since I have to mix Bessel functions with very small and very large arguments I require precision higher than 15 digits.
Unfortunately, I recognized that BesselY is not implemented in PARI. But BesselJ and BesselH1 are. My physicists understanding of math tells me, I could just use "(BesselH1-BesselJ)/i". But I am surprised that this has not been discussed before (at least I couldn't find it), since this would allow a quick implementation of BesselY. Am I missing something that's obvious for math experts? Or can I just use above definition to get an arbitrary precision BesselY?
Many thanks
Frank
Thu, 03 Jan 2013 09:52:57 +0100https://ask.sagemath.org/question/9679/arbitrary-precision-bessely/Answer by FrankSt for <p>Hi,
I consider using Sage for some calculations which contain Bessel functions of complex arguments. Since I have to mix Bessel functions with very small and very large arguments I require precision higher than 15 digits.</p>
<p>Unfortunately, I recognized that BesselY is not implemented in PARI. But BesselJ and BesselH1 are. My physicists understanding of math tells me, I could just use "(BesselH1-BesselJ)/i". But I am surprised that this has not been discussed before (at least I couldn't find it), since this would allow a quick implementation of BesselY. Am I missing something that's obvious for math experts? Or can I just use above definition to get an arbitrary precision BesselY?</p>
<p>Many thanks
Frank</p>
https://ask.sagemath.org/question/9679/arbitrary-precision-bessely/?answer=14421#post-id-14421Didn't know about mpmath. It seems to provide all I need.
Many thanks
Frank
Thu, 03 Jan 2013 10:39:18 +0100https://ask.sagemath.org/question/9679/arbitrary-precision-bessely/?answer=14421#post-id-14421Answer by achrzesz for <p>Hi,
I consider using Sage for some calculations which contain Bessel functions of complex arguments. Since I have to mix Bessel functions with very small and very large arguments I require precision higher than 15 digits.</p>
<p>Unfortunately, I recognized that BesselY is not implemented in PARI. But BesselJ and BesselH1 are. My physicists understanding of math tells me, I could just use "(BesselH1-BesselJ)/i". But I am surprised that this has not been discussed before (at least I couldn't find it), since this would allow a quick implementation of BesselY. Am I missing something that's obvious for math experts? Or can I just use above definition to get an arbitrary precision BesselY?</p>
<p>Many thanks
Frank</p>
https://ask.sagemath.org/question/9679/arbitrary-precision-bessely/?answer=14420#post-id-14420Try:
sage: import mpmath
sage: mpmath.bessely?
(mpmath is multiprecision package)Thu, 03 Jan 2013 10:16:23 +0100https://ask.sagemath.org/question/9679/arbitrary-precision-bessely/?answer=14420#post-id-14420Comment by kcrisman for <p>Try:</p>
<pre><code>sage: import mpmath
sage: mpmath.bessely?
</code></pre>
<p>(mpmath is multiprecision package)</p>
https://ask.sagemath.org/question/9679/arbitrary-precision-bessely/?comment=18447#post-id-18447Also note that when http://trac.sagemath.org/sage_trac/ticket/4102 is finished, mpmath will be the default evaluation mode and so asking for as much precision as you want *should* work.Thu, 03 Jan 2013 10:24:51 +0100https://ask.sagemath.org/question/9679/arbitrary-precision-bessely/?comment=18447#post-id-18447