1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| #pragma mark ---truncf... /* ====================== long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or higher if you need these functions returning long longs ====================== */ //TODO: 截断参数为整数部分,返回参数的整数部分 extern float truncf(float); extern double trunc(double); extern long double truncl(long double);
//TODO: 求两数整除后的余数 extern float fmodf(float, float); extern double fmod(double, double); extern long double fmodl(long double, long double);
//TODO: 计算余数 _X 除 _Y extern float remainderf(float, float); extern double remainder(double, double); extern long double remainderl(long double, long double);
//TODO: 计算第一个指定参数除以第二个指定参数的余数。也要计算出第一指定参数的有效位数除以第二指定参数的有效位数的商,然后使用在第三参数中指定的位置返回该商。 extern float remquof(float, float, int *); extern double remquo(double, double, int *); extern long double remquol(long double, long double, int *);
//TODO: 用_X的大小和_Y的符号来返回值 extern float copysignf(float, float); extern double copysign(double, double); extern long double copysignl(long double, long double);
//TODO: 用_X中指示的内容返回清扫NaN, extern float nanf(const char *); extern double nan(const char *); extern long double nanl(const char *);
extern float nextafterf(float, float); extern double nextafter(double, double); extern long double nextafterl(long double, long double);
extern double nexttoward(double, long double); extern float nexttowardf(float, long double); extern long double nexttowardl(long double, long double);
//TODO: 计算参数之间的正整数差异。(如果 _X 比 _Y 大,_X 和 _Y 之间的差异;否则,+0。) extern float fdimf(float, float); extern double fdim(double, double); extern long double fdiml(long double, long double);
//TODO: 求最大值 extern float fmaxf(float, float); extern double fmax(double, double); extern long double fmaxl(long double, long double);
//TODO: 求最小值 extern float fminf(float, float); extern double fmin(double, double); extern long double fminl(long double, long double);
//TODO: 计算第一个和第二个指定的参数的产品,然后将第三个指定的参数添加到结果;整个计算是作为单个操作执行的。表达式 (_X x _Y) + _Z 的结果。整个计算都作为单个操作执行,即子表达式计算到无限精度并且仅对最终结果四舍五入。 extern float fmaf(float, float, float); extern double fma(double, double, double); extern long double fmal(long double, long double, long double);
|