搜索
bottom↓
回复: 6

求Keil C51 完整的自带c文件

[复制链接]

出0入0汤圆

发表于 2012-9-23 13:06:22 | 显示全部楼层 |阅读模式
用到math.h文件内的函数,没对应的C文件,编译居然通过了。。。为虾米?

怎么搜都搜不到match.h内函数的定义,求Keil C51 完整的自带c文件

阿莫论坛20周年了!感谢大家的支持与爱护!!

知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)

出0入0汤圆

发表于 2012-9-23 14:27:28 | 显示全部楼层
文件太大了,,要不给个邮箱,我把整个(51)的文件夹给你!!

出0入0汤圆

 楼主| 发表于 2012-9-23 17:49:04 | 显示全部楼层
Ye_叶 发表于 2012-9-23 14:27
文件太大了,,要不给个邮箱,我把整个(51)的文件夹给你!!

多谢楼上大哥了,其实我是想找math.h内声明的函数的定义,只是不知道有没有math.c这个文件
如果仅仅是c和h文本文件应该不会太大

出0入0汤圆

发表于 2012-9-23 19:41:08 | 显示全部楼层
/*--------------------------------------------------------------------------
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 char  cabs  (char  val);
extern int    abs  (int   val);
extern long  labs  (long  val);
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

出0入0汤圆

发表于 2012-9-23 20:36:14 | 显示全部楼层
直接点开帮助  搜索math.h  里面Cx51 Use's Guide :math.h 右边 就可以看到各种math。h里的函数了

出0入0汤圆

 楼主| 发表于 2012-9-24 11:30:15 | 显示全部楼层
z903057128 发表于 2012-9-23 20:36
直接点开帮助  搜索math.h  里面Cx51 Use's Guide :math.h 右边 就可以看到各种math。h里的函数了 ...

h文件里都是声明啊,哪里有定义?
help找过了,有说明有例子,就是没定义(definition)

出0入0汤圆

 楼主| 发表于 2012-9-24 11:34:22 | 显示全部楼层
看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);
}
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-7-23 22:14

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表