March 2000
Intermediate to advanced
576 pages
18h 13m
English
Sqrt Function
function Sqrt(Number: Floating-point type): Extended;The Sqrt
function returns the positive square
root of its argument. It is not a real function, but is expanded
inline by the compiler.
Delphi automatically converts Integer and
Variant arguments to floating point. To convert an
Int64 argument to floating point, add 0.0.
If Number is positive infinity, the result is
positive infinity.
If Number is negative zero, the result is negative
zero.
If Number is negative non-zero, negative infinity,
or a signaling NaN, Delphi raises runtime error 6
(EInvalidOp).
If Number is a quiet NaN, the result is
Number.
function Hypotenuse(X, Y: Double): Double; begin Result := Sqrt(Sqr(X) + Sqr(Y)); end;
| Extended Type, Sqr Function |
Read now
Unlock full access