北京地铁一号线价格表:数学中的取绝对值是什么意思啊?

来源:百度文库 编辑:神马品牌网 时间:2024/05/05 22:08:31
|a+b|
C语言中
ads(a+b)
是什么意思啊?
我知道啊,就是不知道绝对值是什么意思啊~
PS:我只有初2学历

1.绝对值的代数定义

一个正数的绝对值是它本身;一个负数的绝对值是它的相反数;零的绝对值是零.

2.绝对值的几何定义

在数轴上表示一个数的点离开原点的距离,叫做这个数的绝对值.

abs() 函数 是用来求绝对值的

其函数代码

abs
Calculates the absolute value.

int abs( int n );

Routine Required Header Compatibility
abs <stdlib.h> or <math.h> ANSI, Win 95, Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

The abs function returns the absolute value of its parameter. There is no error return.

Parameter

n

Integer value

Example

/* ABS.C: This program computes and displays
* the absolute values of several numbers.
*/

#include <stdio.h>
#include <math.h>
#include <stdlib.h>

void main( void )
{
int ix = -4, iy;
long lx = -41567L, ly;
double dx = -3.141593, dy;

iy = abs( ix );
printf( "The absolute value of %d is %d\n", ix, iy);

ly = labs( lx );
printf( "The absolute value of %ld is %ld\n", lx, ly);

dy = fabs( dx );
printf( "The absolute value of %f is %f\n", dx, dy );
}

Output

The absolute value of -4 is 4
The absolute value of -41567 is 41567
The absolute value of -3.141593 is 3.141593

绝对值用概念来说就是数轴上对应的一个点到原定的距离
一般说:正数的绝对值是它本身
零的绝对值还是零
负数的绝对值是他的相反数(相反数就是两个只有符号不同的两个数,比如说3和-3等)
多也可以得出,所有数的绝对值都是非负数(因为包括零)、
我六年级啊,水平可能不够,仅供参考啦

不是ads(a+b) ,是abs(a+b),意思就是取得绝对值

www.793.net.cn

免费刷网站IP,刷世界排名

欢迎注册!

劝你在什么年龄做什么年龄的事