示例#1
0
文件: amos_wrappers.c 项目: 87/scipy
double cbesk_wrap_real( double v, double z) {
  Py_complex cy, w;
  if (z < 0) {
    return NPY_NAN;
  } else {
    w.real = z;
    w.imag = 0;
    cy = cbesk_wrap(v, w);
    return cy.real;
  }
}
示例#2
0
double cbesk_wrap_real( double v, double z) {
  npy_cdouble cy, w;
  if (z < 0) {
    return NPY_NAN;
  }
  else if (z > 710 * (1 + fabs(v))) {
      /* Underflow. See uniform expansion http://dlmf.nist.gov/10.41
       * This condition is not a strict bound (it can underflow earlier),
       * rather, we are here working around a restriction in AMOS.
       */
      return 0;
  }
  else {
    w.real = z;
    w.imag = 0;
    cy = cbesk_wrap(v, w);
    return cy.real;
  }
}