电脑爱好者,提供IT资讯信息及各类编程知识文章介绍,欢迎大家来本站学习电脑知识。 最近更新 | 联系我们 RSS订阅本站最新文章
电脑爱好者
站内搜索: 
当前位置:首页>> delphi技术>>Delphi中的算术运算函数(2):

Delphi中的算术运算函数(2)

来源:www.cncfan.com | 2006-1-10 | (有2782人读过)

函数名 Frexp
简要介绍: Separates the Mantissa and Exponent of X(分解开X的尾数和指数。)
所属单元: Math
定义: procedure Frexp(X: Extended; var Mantissa: Extended; var Exponent: Integer) register;
详细解释:




Frexp returns the mantissa of X as Mantissa and the exponent as Exponent.(Frexp函数返回X的尾数用变量Mantissa和指数用变量Exponent)。



函数名 int
简要介绍: Returns the integer part of a real number.(返回一个实数类型的整数部分)
所属单元: System
定义: function Int(X: Extended): Extended;
详细解释:




Int returns the integer part of X; that is, X rounded toward zero. X is a real-type expression.(Int函数返回参数X的整数部分,X为实数类型,函数结果为X经过负向舍入(向0舍入)实数。)


范例: var

R: Real;
begin
R := Int(123.456); { 123.0 }
R := Int(-123.456); { -123.0 }
end;



函数名 Intpower
简要介绍: Calculates the integral power of a base value.(计算基数的整数幂。)
所属单元: Math
定义: function IntPower(Base: Extended; Exponent: Integer): Extended register;
详细解释:




IntPower raises Base to the power specified by Exponent

(计算基数的整数幂。base为基数,Exponent为指数)

范例:


函数名 Ldexp
简要介绍: Calculates X * (2**P)
所属单元: Math
定义: function Ldexp(X: Extended; P: Integer): Extended register;
详细解释:



Ldexp returns X times (2 to the power of P).
(Ldexp计算X*(2**P),返回X的(2的P次幂)次幂。)



函数名 Max
简要介绍: Returns the greater of two numeric values.(取两个数中的最大值)
所属单元: Math
定义: function Max(A,B: Integer): Integer; overload;
function Max(A,B: Int64): Int64; overload;
function Max(A,B: Single): Single; overload;
function Max(A,B: Double): Double; overload;
function Max(A,B: Extended): Extended; overload;
详细解释:



Call Max to compare two numeric values. Max returns the greater value of the two.
(返回两个数值中的最大值。调用Max比较两个数值。它返回二者中较大的一个值。)



函数名 Min
简要介绍: Returns the lesser of two numeric values.(取两个数的最小值)
所属单元: Math
定义: function Min(A,B: Integer): Integer; overload;
function Min(A,B: Int64): Int64; overload;
function Min(A,B: Single): Single; overload;
function Min(A,B: Double): Double; overload;
function Min(A,B: Extended): Extended; overload;
详细解释:



Call Min to compare two numeric values. Min returns the smaller value of the two.
(返回两个数值中的最小值。调用Max比较两个数值,它返回二者中较小的一个值。)



函数名 pi
简要介绍: Returns 3.1415926535897932385. (返回3.1415926535897932385.)
所属单元: System
定义: function Pi: Extended;
详细解释:



Use Pi in mathematical calculations that require pi, the ratio of a circle's circumference to its diameter. Pi is approximated as 3.1415926535897932385.
(使用Pi函数精确计算返回圆周率Pi,圆周率是一个圆的周长除以它的直径。Pi的值近似于3.1415926535897932385.)


delphi技术热门文章排行
网站赞助商
购买此位置

 

关于我们 | 网站地图 | 文档一览 | 友情链接| 联系我们

Copyright © 2003-2024 电脑爱好者 版权所有 备案号:鲁ICP备09059398号