词条 | ceil |
释义 | C语言数学函数ceil简介函数名: ceil 用 法: double ceil(double x); 功 能: 返回大于或者等于指定表达式的最小整数 头文件:math.h 程序例#include <stdio.h> #include <math.h> int main(void) { double number = 123.54; double down, up; down = floor(number); up = ceil(number); printf("original number %5.2lf\", number); printf("number rounded down %5.2lf\", down); printf("number rounded up %5.2lf\", up); return 0; } 运行结果: original number 123.54 number rounded down 123.00 number rounded up 124.00 matlab函数ceil简介funcion nameceil functionRound symbolic matrix toward positive infinity Syntaxceil(x) 即向正方向舍入取整 function descriptionY = ceil(X) is the matrix of the smallest integers greater than or equal to X. Examplex = sym(-5/2) [fix(x) floor(x) round(x) ceil(x) frac(x)] = [ -2, -3, -3, -2, -1/2] |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。