From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6943 invoked by alias); 16 Mar 2009 21:29:14 -0000 Received: (qmail 6423 invoked by uid 22791); 16 Mar 2009 21:29:13 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_50 X-Spam-Check-By: sourceware.org Received: from qmta06.emeryville.ca.mail.comcast.net (HELO QMTA06.emeryville.ca.mail.comcast.net) (76.96.30.56) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Mar 2009 21:29:06 +0000 Received: from OMTA11.emeryville.ca.mail.comcast.net ([76.96.30.36]) by QMTA06.emeryville.ca.mail.comcast.net with comcast id ToxP1b0060mlR8UA6xV5DZ; Mon, 16 Mar 2009 21:29:05 +0000 Received: from hippogriff.homeunix.org ([24.8.141.236]) by OMTA11.emeryville.ca.mail.comcast.net with comcast id TxV41b00R56DT748XxV5qT; Mon, 16 Mar 2009 21:29:05 +0000 Received: by hippogriff.homeunix.org (Postfix, from userid 1000) id 0DD5BCB71C; Mon, 16 Mar 2009 15:31:38 -0600 (MDT) Date: Mon, 16 Mar 2009 21:29:00 -0000 From: Patrick Alken To: gsl-discuss@sourceware.org Subject: New extension for Associated Legendre Functions (ALFs) Message-ID: <20090316213137.GA4277@hippogriff.homeunix.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00020.txt.bz2 Hello all, Most current implementations of associated Legendre functions (ALFs), including the current GSL version fail due to underflow above degree and order (L,M) 1900. A 2002 paper by Holmes and Featherstone shows that with a very simple scaling modification this limit can be extended to 2700 in double precision. I have recently needed to compute high degree ALFs so I have implemented their algorithm and made a new GSL extension if others are interested. There are several other advantages in this extension over the current GSL implementation: 1) I have included support for several normalization conventions: - Schmidt semi-normalized ALFs - Spherical harmonic normalized ALFs (GSL already has this) - Fully normalized ALFs - Unnormalized ALFs (GSL has this) 2) The user can choose whether to compute the Condon-Shortley phase of (-1)^m 3) The GSL array versions currently only compute ALFs for a fixed order m and multiple degrees l. This extension now efficiently computes all ALFs for a given maximum degree lmax for all (l,m) up to lmax. 4) The routines in this extension use a workspace which precomputes various factors in the recurrence relations which should lead to a (minor) speedup in the calculations. This extension includes a complete test suite and documentation. The docs contain a plot which shows how the current GSL implementation fails for L,M = 2700. I have put a link on the main GSL webpage for the extension. Patrick Alken