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

Pauli Virtanen pav at iki.fi
Fri Jun 23 08:44:56 EDT 2017


GSL has prefactor of sqrt(pi/2).
scipy iirc follows abramowitz&stegun.


Ming Lu kirjoitti 23.06.2017 klo 09:07:
> 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?
> 
> 
> 
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at python.org
> https://mail.python.org/mailman/listinfo/scipy-user
> 


More information about the SciPy-User mailing list