[SciPy-User] scipy.special.mathieu_modcem1 is not equal to the corresponding function in gsl

Ming Lu fizis at outlook.com
Fri Jun 23 03:07:30 EDT 2017


Consider this code in python:


import scipy.special as sp
q=24
x=1.83
sp.mathieu_modcem1(0,q,x)[0]


the result is: -0.094807461318619515


Translate into c++ with gsl:


# include <iostream>
# include <gsl/gsl_sf.h>

int main()  {
    double q = 24;
    double x = 1.83;
    double y = gsl_sf_mathieu_Mc(1,0,q,x);
    std::cout << y << std::endl;
    return 0;
}


the result is: -0.118824


What's the problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20170623/158432bc/attachment.html>


More information about the SciPy-User mailing list