public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Patrick Alken <patrick.alken@Colorado.EDU>
To: gsl-discuss@sourceware.org
Subject: Re: Issue with Mathieu Function Code
Date: Mon, 09 Sep 2013 17:50:00 -0000	[thread overview]
Message-ID: <522E0A6F.3040400@colorado.edu> (raw)
In-Reply-To: <522231C2.1060908@gladman.plus.com>

This sounds like a good idea, but we need to maintain binary 
compatibility in future releases of GSL. It seems we could easily add 
functions with _e names, since they are already implemented. But we need 
to maintain the old interfaces as well, or at least mark them as 
deprecated, so that people can link their programs to the new library 
version without needing to recompile.

This would be a good thing to add to a list of features for v2.0. I 
think Brian Gough had planned to break binary compatibility for v2.0 and 
do all these sorts of things that needed doing.

Patrick

On 08/31/2013 12:11 PM, Brian Gladman wrote:
> The GSL special functions are each supposed to have two alternative
> functional interfaces, a pure one:
>
> double function(x, ...)
>
> and one allowing for full error returns:
>
> int function_e(x, ...  gsl_sf_result * result)
>
> But the Mathieu function code doesn't follow this convention.
>
> It doesn't offer the former interface at all and uses the second
> convention for all its functions BUT without the '_e' name extension on
> its function declarations.
>
> This is quite error prone since it is easy to assume that *gsl_sf_result
> is simply a reference to a double when in fact it is a structure that is
> longer than this (a library user on Windows made exactly this mistake
> and wondered why his code was causing an illegal access exception).
>
> I am doubtful that this is an intentional feature of the Mathieu
> function code so I have created the attached patch to update the code to
> use the normal conventions of the GSL special functions.  (this needs
> testing since I have only tried it on WIndows).
>
> If this is adopted, the documentation will need updating as well
> (unfortunately I am unable to do this).
>
>    with my best regards,
>
>        Brian Gladman
>

  reply	other threads:[~2013-09-09 17:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-31 18:11 Brian Gladman
2013-09-09 17:50 ` Patrick Alken [this message]
2013-09-09 19:04   ` Brian Gladman
2013-09-09 19:25     ` Brian Gladman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=522E0A6F.3040400@colorado.edu \
    --to=patrick.alken@colorado.edu \
    --cc=gsl-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).