【错误】 y1重定义,以前的定义是“函数”

今天敲代码发现这个错误,找半天也没发现到底是哪里重定义了,y1重定义
把错误列表往上拉了一下,才发现…
错误声明
我是个憨憨,原来这个y1在math.h里定义过了。有点神奇,居然写了个这么常用的命名方式做它的函数名。

继续打开math.h - corecrt_math.h ,让我来看看到底是哪个神奇函数在作怪,定义的y1
然后你会发现,不仅是y1,连j0,j1,jn,y0,yn都被定义了,

作用:

Function: double j0 (double x)
j0 returns the Bessel function of the first kind of order 0 of x. It may signal underflow if x is too large.

Function: double j1 (double x)
j1 returns the Bessel function of the first kind of order 1 of x. It may signal underflow if x is too large.

Function: double jn (int n, double x)
jn returns the Bessel function of the first kind of order n of x. It may signal underflow if x is too large.

Function: double y0 (double x)
y0 returns the Bessel function of the second kind of order 0 of x. It may signal underflow if x is too large. If x is negative, y0 signals a domain error; if it is zero, y0 signals overflow and returns -∞.

Function: double y1 (double x)y1 returns the Bessel function of the second kind of order 1 of x. It may signal underflow if x is too large. If x is negative, y1 signals a domain error; if it is zero, y1 signals overflow and returns -∞.

Function: double yn (int n, double x)yn returns the Bessel function of the second kind of order n of x. It may signal underflow if x is too large. If x is negative, yn signals a domain error; if it is zero, yn signals overflow and returns -∞.

大概意思就是返回一个贝塞尔函数什么什么的(没学过贝塞尔,不乱翻译了)

参考:

  • Standard library header < math >
  • These are some more exotic mathematical functions .

你可能感兴趣的:(错误列表,math)