求Keil C51 完整的自带c文件
用到math.h文件内的函数,没对应的C文件,编译居然通过了。。。为虾米?怎么搜都搜不到match.h内函数的定义,求Keil C51 完整的自带c文件{:cry:} 文件太大了,,要不给个邮箱,我把整个(51)的文件夹给你!!{:smile:} Ye_叶 发表于 2012-9-23 14:27 static/image/common/back.gif
文件太大了,,要不给个邮箱,我把整个(51)的文件夹给你!!
多谢楼上大哥了,其实我是想找math.h内声明的函数的定义,只是不知道有没有math.c这个文件
如果仅仅是c和h文本文件应该不会太大 /*--------------------------------------------------------------------------
MATH.H
Prototypes for mathematic functions.
Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
All rights reserved.
--------------------------------------------------------------------------*/
#ifndef __MATH_H__
#define __MATH_H__
#pragma SAVE
#pragma REGPARMS
extern charcabs(charval);
extern int abs(int val);
extern longlabs(longval);
extern float fabs(float val);
extern float sqrt(float val);
extern float exp (float val);
extern float log (float val);
extern float log10 (float val);
extern float sin (float val);
extern float cos (float val);
extern float tan (float val);
extern float asin(float val);
extern float acos(float val);
extern float atan(float val);
extern float sinh(float val);
extern float cosh(float val);
extern float tanh(float val);
extern float atan2 (float y, float x);
extern float ceil(float val);
extern float floor (float val);
extern float modf(float val, float *n);
extern float fmod(float x, float y);
extern float pow (float x, float y);
#pragma RESTORE
#endif
直接点开帮助搜索math.h里面Cx51 Use's Guide :math.h 右边 就可以看到各种math。h里的函数了 z903057128 发表于 2012-9-23 20:36 static/image/common/back.gif
直接点开帮助搜索math.h里面Cx51 Use's Guide :math.h 右边 就可以看到各种math。h里的函数了 ...
h文件里都是声明啊,哪里有定义?
help找过了,有说明有例子,就是没定义(definition){:sad:}
看fmod的help说明:
Summary #include <math.h>
float fmod (
float x, /* value to calculate modulo for */
float y); /* integer portion of modulo */
Description The fmod function returns a value f such that f has the same sign as x, the absolute value of f is less than the absolute value of y, and there exists an integer k such that:
k * y + f = x
If the quotient x / y cannot be represented, the result is undefined.
Return Value The fmod function returns the floating-point remainder of x / y. 说具体点,谁能帮忙找到这里的C代码?
Example #include <math.h>
#include <stdio.h> /* for printf */
void tst_fmod (void) {
float f;
f = fmod (15.0, 4.0);
printf ("fmod (15.0, 4.0) = %f\n", f);
}
页:
[1]