Math387.Sqrt / Sqrtf Method

Overload List

#SignatureDescription
1function Sqrt(const X: Double): Double;Square root.
2function Sqrt(const Src: Integer): Double;
3function Sqrt(const Src: Int64): Double;
4function Sqrt(const Src: Single): Single;
5function Sqrtf(const Src: Integer): Single;
6function Sqrtf(const Src: Int64): Single;
7function Sqrtf(const X: Single): Single;Square root.

Overload 1: function Sqrt(const X: Double): Double;

Square root.

#NameTypeDescription
1XDouble

Returns: Double - Returns double precision square root of the given number X.

Remarks:

Math387.Sqrt uses SSE2 SQRTSD on Win32/Win64 (single hardware instruction) via the SVML override path; non-Windows targets fall back to System.Sqrt through the PURE_PASCAL include. Faster than the x87-FPU FSQRT that Delphi's built-in System.Sqrt historically used.

Overload 2: function Sqrt(const Src: Integer): Double;

#NameTypeDescription
1SrcInteger

Returns: Double

Overload 3: function Sqrt(const Src: Int64): Double;

#NameTypeDescription
1SrcInt64

Returns: Double

Overload 4: function Sqrt(const Src: Single): Single;

#NameTypeDescription
1SrcSingle

Returns: Single

Overload 5: function Sqrtf(const Src: Integer): Single;

#NameTypeDescription
1SrcInteger

Returns: Single

Overload 6: function Sqrtf(const Src: Int64): Single;

#NameTypeDescription
1SrcInt64

Returns: Single

Overload 7: function Sqrtf(const X: Single): Single;

Square root.

#NameTypeDescription
1XSingle

Returns: Single - Returns single precision square root of the given number X.