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;

posted on 2009-12-19 09:54  万一  阅读(5187)  评论(1编辑  收藏  举报