From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6d7a86bff9319841 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!u14g2000yqg.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Where I find Bessel function for Ada ? Date: Wed, 26 Nov 2008 08:12:21 -0800 (PST) Organization: http://groups.google.com Message-ID: <111195bd-6d60-42e6-8ce1-bf7c27a2f665@u14g2000yqg.googlegroups.com> References: NNTP-Posting-Host: 94.108.182.255 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1227715942 331 127.0.0.1 (26 Nov 2008 16:12:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 26 Nov 2008 16:12:22 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u14g2000yqg.googlegroups.com; posting-host=94.108.182.255; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.17) Gecko/20080829 Iceape/1.1.12 (Debian-1.1.12-1),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:3785 Date: 2008-11-26T08:12:21-08:00 List-Id: On Nov 26, 4:09 pm, Ken Thomas wrote: > On Nov 26, 1:08 pm, Paul Cole Gloster > wrote: > > > > > Reinert submitted: > > > |----------------------------------------------------------------| > > |"I want to use the modified Bessel function of order 0 in my Ada| > > > |program. | > > > | | > > > |Where I find it ?" | > > |----------------------------------------------------------------| > > > It may be best to write your own version so that you could justifiably > > have an accurate level of confidence of it. > > > Gautier responded: > > > !---------------------------------------------------------------! > > !"It is in the Numerical Recipes in Pascal, chapter 6.4, pp 191.! > > > !All you need to pick the right Pascal source, like bessj0.pas ! > > > !and put it through th P2Ada translator:http://p2ada.sf.net/ ! > > > !The NR sources are freely available on the Internet." ! > > !---------------------------------------------------------------! > > > I have not thoroughly assessed that particular part of "Numerical > > > Recipes", but some parts of "Numerical Recipes" are > > untrustworthy. Early in 2009 on > > WWW.ACCU.org > > a review by myself which is almost ready for publication should be > > available. > > The source for the Pascal version of Numerical Recipes can be found athttp://archives.math.utk.edu/software/msdos/numerical.analysis/nrpas1... > > As the code for bessj0 is very short, translation to Ada is a small > exercise. On the other hand, the code seems to deal with only single > precision arithmetic so does not promise high accuracy. I suppose this is easy to fix by making the Ada implementation generic. The user then instantiates it for any floating-point type with the required accuracy. -- Ludovic Brenta.