135-1821-9792

c语言math函数表 c语言 math函数

C语言中的math函数

一些数学计算的公式的具体实现是放在math.h里,具体有:

10年积累的网站制作、网站建设经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先做网站后付款的网站建设流程,更有鹿邑免费网站建设让你可以放心的选择与我们合作。

double sin (double x); x的正弦值

double cos (double x); x的余弦值

double tan (double x); x的正切值

double asin (double x); 结果介于[-PI/2, PI/2],x值域为[-1,1]

double acos (double x); 结果介于[0, PI],x值域为[-1,1]

double atan (double x); 反正切(主值), 结果介于[-PI/2, PI/2]

double atan2 (double y, double x); 反正切(整圆值), 结果介于[-PI, PI]

double sinh (double x); x的双曲正弦值

double cosh (double x); x的双曲余弦值

double tanh (double x); x的双曲正切值

double exp (double x); 幂函数e^x

double pow (double x, double y); x^y,如果x=0且y=0,或者x0且y不是整型数,将产生定义域错误

double sqrt (double x); x的平方根,其中x=0

double log (double x); 以e为底的对数,自然对数,x0

double log10 (double x); 以10为底的对数,x0

double ceil (double x); 取上整

double floor (double x); 取下整

double fabs (double x); x的绝对值

double frexp (double x, int *exp); 标准化浮点数, x = f * 2^exp, 已知x求f, exp ( x介于[0.5, 1] )并返回f值

double ldexp (double x, int exp); 与frexp相反, 已知x, exp求x*2^exp

double modf (double x, double *ip); 将参数的整数部分通过指针回传, 返回小数部分,整数部分保存在*ip中

double fmod (double x, double y); 返回两参数相除x/y的余数,符号与x相同。如果y为0,则结果与具体的额实现有关

C语言的math函数有哪些

在C语言里面按一下CTRL+F1,选择header file、math.h就可以看到你要的东西,我看到了粘贴如下:

Functions

abs floor

acos fmod

asin frexp

atan hypot

atan2 labs

atof ldexp

cabs log

ceil log10

cos matherr

cosh modf

exp poly

fabs pow

pow10 sqrt

sin tan

sinh tanh

Constants, data types, and global variables

complex exception

EDOM HUGE_VAL

ERANGE _mexcep

c语言中math头文件中的函数有哪些?

数学函数库,一些数学计算的公式的具体实现是放在math.h里,具体有:

1 三角函数

double sin (double);

double cos (double);

double tan (double);

2 反三角函数

double asin (double); 结果介于[-PI/2, PI/2]

double acos (double); 结果介于[0, PI]

double atan (double); 反正切(主值), 结果介于[-PI/2, PI/2]

double atan2 (double, double); 反正切(整圆值), 结果介于[-PI/2, PI/2]

3 双曲三角函数

double sinh (double);

double cosh (double);

double tanh (double);

4 指数与对数

double exp (double);

double sqrt (double);

double log (double); 以e为底的对数

double log10 (double);

double pow(double x, double y)//计算以x为底数的y次幂

5 取整

double ceil (double); 取上整

double floor (double); 取下整

6 绝对值

double fabs (double);

double cabs(struct complex znum) //求复数的绝对值

7 标准化浮点数

double frexp (double f, int *p); 标准化浮点数, f = x * 2^p, 已知f求x, p ( x介于[0.5, 1] )

double ldexp (double x, int p); 与frexp相反, 已知x, p求f

8 取整与取余

double modf (double, double*); 将参数的整数部分通过指针回传, 返回小数部分

double fmod (double, double); 返回两参数相除的余数

9其他

double hypot(double x, double y);//已知直角三角形两个直角边长度,求斜边长度

double ldexp(double x, int exponent);//计算x*(2的exponent次幂)

double poly(double x, int degree, double coeffs [] )//计算多项式

nt matherr(struct exception *e)//数学错误计算处理程序

source: 《C C++ Code Capsules》

求 c语言库函数表

常用的(1)I/O 函数。包括各种控制台I/O、缓冲型文件I/O和UNIX式非缓冲型文件I/O操作。 需要的包含文件:stdio.h 例如: getchar,putchar,printf,scanf,fopen,fclose,fgetc,fgets,fprintf,fsacnf,fputc,fputs,fseek,fread,fwrite等。 (2)字符串、内存和字符函数。包括对字符串进行各种操作和对字符进行操作的函数。 需要的包含文件:string.h、mem.h、ctype.h或string.h 例如:用于检查字符的函数:isalnum,isalpha,isdigit,islower,isspace等。用于字符串操作函数:strcat,strchr,strcmp,strcpy,strlen,strstr等。 (3)数学函数。包括各种常用的三角函数、双曲线函数、指数和对数函数等。 需要的包含文件:math.h 例如:sin,cos,exp(e的x次方),log,sqrt(开平方),pow(x的y次方)等。 (4)时间、日期和与系统有关的函数。对时间、日期的操作和设置计算机系统状态等。 需要的包含文件:time.h 例如:time返回系统的时间;asctime返回以字符串形式表示的日期和时间。 (5)动态存储分配。包括"申请分配"和"释放"内存空间的函数。 需要的包含文件:alloc.h或stdlib.h 例如:calloc,free,malloc,realloc等。


当前题目:c语言math函数表 c语言 math函数
文章地址:http://kswsj.com/article/doogjih.html

其他资讯



Copyright © 2009-2022 www.kswsj.com 成都快上网科技有限公司 版权所有 蜀ICP备19037934号