double modstruve_wrap(double v, double x) { double out; int flag=0; if ((x < 0) & (floor(v)!=v)) return NPY_NAN; if (v==0.0) { if (x < 0) {x = -x; flag=1;} F_FUNC(stvl0,STVL0)(&x,&out); CONVINF("modstruve", out); if (flag) out = -out; return out; } if (v==1.0) { if (x < 0) x=-x; F_FUNC(stvl1,STVL1)(&x,&out); CONVINF("modstruve", out); return out; } if (x<0) { x = -x; flag = 1; } F_FUNC(stvlv,STVLV)(&v,&x,&out); CONVINF("modstruve", out); if (flag && (!((int)floor(v) % 2))) out = -out; return out; }
double expi_wrap(double x) { double out; F_FUNC(eix,EIX)(&x, &out); CONVINF("expi", out); return out; }
double exp1_wrap(double x) { double out; F_FUNC(e1xb,E1XB)(&x, &out); CONVINF("exp1", out); return out; }
double itmodstruve0_wrap(double x) { double out; if (x<0) x=-x; F_FUNC(itsl0,ITSL0)(&x,&out); CONVINF("itmodstruve0", out); return out; }
double itstruve0_wrap(double x) { double out; if (x<0) x=-x; F_FUNC(itsh0,ITSH0)(&x,&out); CONVINF(out); return out; }
double pmv_wrap(double m, double v, double x){ int int_m; double out; if (m != floor(m)) return NPY_NAN; int_m = (int ) m; F_FUNC(lpmv,LPMV)(&v, &int_m, &x, &out); CONVINF("pmv", out); return out; }
double it2struve0_wrap(double x) { double out; int flag=0; if (x<0) {x=-x; flag=1;} F_FUNC(itth0,ITTH0)(&x,&out); CONVINF("it2struve0", out); if (flag) { out = NPY_PI - out; } return out; }
double struve_wrap(double v, double x) { double out; double rem; int flag=0; if (x < 0) { rem = fmod(v, 2.0); if (rem == 0) { x = -x; flag = 1; } else if (rem == 1 || rem == -1) { x = -x; flag = 0; } else { /* non-integer v and x < 0 => complex-valued */ return NPY_NAN; } } if ((v<-8.0) || (v>12.5)) { out = cephes_struve(v, x); /* from cephes */ } else if (v==0.0) { F_FUNC(stvh0,STVH0)(&x,&out); CONVINF("struve", out); } else if (v==1.0) { F_FUNC(stvh1,STVH1)(&x,&out); CONVINF("struve", out); } else { F_FUNC(stvhv,STVHV)(&v,&x,&out); CONVINF("struve", out); } if (flag) out = -out; return out; }