本文整理自网络,侵删。
delphi X 的 Y 次方
var
x,y,z: Real;
begin
x := 2;
y := 3;
{ 使用 Math.Power }
z := Math.Power(x, y);
ShowMessage(FloatToStr(z)); //8
{ 不想 uses Math, 就用 System.Exp、System.Ln }
z := Exp(Ln(x) * y);
ShowMessage(FloatToStr(z)); //8
end;
相关阅读 >>
Delphi 通过memorystream 传递image1数据
Delphi的unicode与gb2312转转换,汉字unicode转gb2312
Delphi 获取适合微信使用的当前日期,以int64表示,是当前时间和1970-01-01 00:00:00之间的秒差
Delphi setwindowshookex - 设置钩子 unhookwindowshookex - 卸掉钩子
Delphi trestclient + trestrequest + trestresponse
更多相关阅读请进入《Delphi》频道 >>