Ok. I made a function that uses Sqrt, and a few others. The question is, how, when using other numbers, multiplication, division, and addition, does it come out to be the same result?
Example:
Code:
Successfully compiled (61 ms)
Original number : 81
Number after Result := (((Result + Result) + 5) / 2) - 2.5; : 9
Successfully executed
Here's the actual script.
SCAR Code:
program SqrtEx;
function SqrtEx(num: Integer): Extended;
begin
WriteLn('Original number : ' + IntToStr(num));
Result := Sqrt(num);
Result := (((Result + Result) + 5) / 2) - 2.5;
WriteLn('Number after Result := (((Result + Result) + 5) / 2) - 2.5; : ' + FloatToStr(Result));
end;
begin
SqrtEx(81);
end.