70,037
社区成员
发帖
与我相关
我的任务
分享
#ifndef __math_h
#define __math_h
//...
#define _ARMABI __declspec(__nothrow)
#define _ARMABI_PURE __declspec(__nothrow) __attribute__((const))
//...
/* C99 float versions of functions. math.h has always reserved these
identifiers for this purpose (7.13.4). */
extern _ARMABI float sinf(float /*x*/);
extern _ARMABI float cosf(float /*x*/);
extern _ARMABI float (float /*x*/);
inline float atan(float __x) { return atanf(__x); }
void LPF2pSetCutoffFreq_1(float sample_freq, float cutoff_freq)
{
float fr =0;
float ohm =0;
float c =0;
fr= sample_freq/cutoff_freq;
//在这里调用
ohm=tanf(M_PI_F/fr);
//......
}
选中这个函数以后,右键选择Go to definition of 'tanf',IDE提示 undefined Definiton我试了试 右键选择Go to Refernece to 'tanf',然后就跳转到了这个math.h 文件,我之前想查看引用的某个函数的定义,都是选择Go to definition of 'tanf',就可以跳转到函数的具体实现部分,这个为什么这么特别?(顺利编译没有报错)
#ifndef __USE_C99_MATH
#if defined(__USE_C99_ALL) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__)
#define __USE_C99_MATH 1
#endif
#endif
#define _ARMABI __declspec(__nothrow)
#ifdef __TARGET_ARCH_AARCH64
# define _ARMABI_SOFTFP __declspec(__nothrow)
#else
# define _ARMABI_SOFTFP __declspec(__nothrow) __attribute__((__pcs__("aapcs")))
# define __HAVE_LONGDOUBLE 1
#endif
#define _ARMABI_PURE __declspec(__nothrow) __attribute__((const))
#ifdef __FP_FENV_EXCEPTIONS
# define _ARMABI_FPEXCEPT _ARMABI
#else
# define _ARMABI_FPEXCEPT _ARMABI __attribute__((const))
#endif
/* C99 float versions of functions. math.h has always reserved these
identifiers for this purpose (7.13.4). */
extern _ARMABI_PURE float _fabsf(float); /* old ARM name */
_ARMABI_INLINE _ARMABI_PURE float fabsf(float __f) { return _fabsf(__f); }
extern _ARMABI float sinf(float /*x*/);
extern _ARMABI float cosf(float /*x*/);
extern _ARMABI float tanf(float /*x*/);
extern _ARMABI float acosf(float /*x*/);
extern _ARMABI float asinf(float /*x*/);
extern _ARMABI float atanf(float /*x*/);
extern _ARMABI float atan2f(float /*y*/, float /*x*/);
extern _ARMABI float sinhf(float /*x*/);
extern _ARMABI float coshf(float /*x*/);
extern _ARMABI float tanhf(float /*x*/);
extern _ARMABI float expf(float /*x*/);
extern _ARMABI float logf(float /*x*/);
extern _ARMABI float log10f(float /*x*/);
extern _ARMABI float powf(float /*x*/, float /*y*/);
extern _ARMABI float sqrtf(float /*x*/);
extern _ARMABI float ldexpf(float /*x*/, int /*exp*/);
extern _ARMABI float frexpf(float /*value*/, int * /*exp*/) __attribute__((__nonnull__(2)));
extern _ARMABI_PURE float ceilf(float /*x*/);
extern _ARMABI_PURE float floorf(float /*x*/);
extern _ARMABI float fmodf(float /*x*/, float /*y*/);
extern _ARMABI float modff(float /*value*/, float * /*iptr*/) __attribute__((__nonnull__(2)));
#ifdef __cplusplus
extern "C++" {
inline float abs(float __x) { return fabsf(__x); }
inline float acos(float __x) { return acosf(__x); }
inline float asin(float __x) { return asinf(__x); }
inline float atan(float __x) { return atanf(__x); }
inline float atan2(float __y, float __x) { return atan2f(__y,__x); }
inline float ceil(float __x) { return ceilf(__x); }
inline float cos(float __x) { return cosf(__x); }
inline float cosh(float __x) { return coshf(__x); }
inline float exp(float __x) { return expf(__x); }
inline float fabs(float __x) { return fabsf(__x); }
inline float floor(float __x) { return floorf(__x); }
inline float fmod(float __x, float __y) { return fmodf(__x, __y); }
float frexp(float __x, int* __exp) __attribute__((__nonnull__(2)));
inline float frexp(float __x, int* __exp) { return frexpf(__x, __exp); }
inline float ldexp(float __x, int __exp) { return ldexpf(__x, __exp);}
inline float log(float __x) { return logf(__x); }
inline float log10(float __x) { return log10f(__x); }
float modf(float __x, float* __iptr) __attribute__((__nonnull__(2)));
inline float modf(float __x, float* __iptr) { return modff(__x, __iptr); }
inline float pow(float __x, float __y) { return powf(__x,__y); }
inline float pow(float __x, int __y) { return powf(__x, (float)__y); }
inline float sin(float __x) { return sinf(__x); }
inline float sinh(float __x) { return sinhf(__x); }
inline float sqrt(float __x) { return sqrtf(__x); }
inline float _sqrt(float __x) { return _sqrtf(__x); }
inline float tan(float __x) { return tanf(__x); }
inline float tanh(float __x) { return tanhf(__x); }
inline double abs(double __x) { return fabs(__x); }
inline double pow(double __x, int __y)
{ return pow(__x, (double) __y); }