当我运行我的程序时,会发生错误:
program lab_1_27;
uses crt;
var
x, y, z: real;
a: integer;
function pow_udf(m, n:real) : real;
var
result: real;
begin
result:= exp(y * ln(x));
end;
begin
clrscr;
readln(x);
readln(y);
z:= pow_udf(x, y);
a:= round(z); (* a cursor is in this line after terminating the program *)
writeln(a);
readkey;
end.
错误:
Error 207: invalid floating point operation.
请告诉我这种行为的原因是什么,因为我无法资助它......