Linux C函数库参考手册之数学计算函数

abs(计算整型数的绝对值)

#include <stdlib.h>
int abs(int j);

acos(取反余弦函数值)

#include <math.h>
double acos(double x);

asin(取反正弦函数值)

#include <math.h>
double asin(double x);

atan(取反正切函数值)

#include <math.h>
double atan(double x);

atan2(取得反正切函数值)

#include <math.h>
double atan2(double y, double x);

ceil(取不小于参数的最小整型数)

#include <math.h>
double ceil(double x);

cos(取余弦函数值)

#include <math.h>
double cos(double x);

cosh(取双曲线余弦函数值)

#include <math.h>
double cosh(double x);

div(取得两整型数相除后的商及余数)

#include <stdlib.h>
div_t div(int numerator, int denominator);

exp(计算指数)

#include <math.h>
double exp(double x);

fabs(计算浮点型数的绝对值)

#include <math.h>
double fabs(double x);

frexp(将浮点型数分为底数与指数)

#include <math.h>
double frexp(double x, int *exp);

hypot(计算直角三角形斜边长)

#include <math.h>
double hypot(double x, double y);

labs(计算长整型数的绝对值)

#include <stdlib.h>
long int labs(long int j);

ldexp(计算2的次方值)

#include <math.h>
double ldexp(double x, int exp);

ldiv(取得两长整数相除后的商及余数)

#include <stdlib.h>
ldiv_t ldiv(long numerator, long denominator);

log(计算以e为底的对数值)

#include <math.h>
double log(double x);

log10(计算以10为底的对数值)

#include <math.h>
double log10(double x);

modf(将浮点型数分解成整数与小数)

#include <math.h>
double modf(double x, double *iptr);

pow(计算次方值)

#include <math.h>
double pow(double x, double y);

sin(取正弦函数值)

#include <math.h>
double sin(double x);

sinh(取双曲线正弦函数值)

#include <math.h>
double sinh(double x);

sqrt(计算平方根值)

#include <math.h>
double sqrt(double x);

tan(取正切函数值)

#include <math.h>
double tan(double x);

tanh(取双曲线正切函数值)

include <math.h>
double tanh(double x);

Leave a Reply

Your email address will not be published. Required fields are marked *