Math387.Sign / Signf Method

Overload List

#SignatureDescription
1function Sign(const Z: TCplx): TCplx;Changes the sign of a complex number.
2function Sign(const Z: TSCplx): TSCplx;
3function Sign(const a: Double; const b: Double): Double;Fortran sign function.
4function Sign(const a: Single; const b: Single): Single;
5function Signf(const a: Single; const b: Single): Single;

Overload 1: function Sign(const Z: TCplx): TCplx;

Changes the sign of a complex number.

#NameTypeDescription
1ZTCplx

Returns: TCplx (complex)

Overload 2: function Sign(const Z: TSCplx): TSCplx;

#NameTypeDescription
1ZTSCplx

Returns: TSCplx

Overload 3: function Sign(const a: Double; const b: Double): Double;

Fortran sign function.

#NameTypeDescription
1aDouble
2bDouble

Returns: Double - It uses slightly different definition for changing sign of a complex number: * if b>=0, it returns |a|, * otherwise, -|a|.

Overload 4: function Sign(const a: Single; const b: Single): Single;

#NameTypeDescription
1aSingle
2bSingle

Returns: Single

Overload 5: function Signf(const a: Single; const b: Single): Single;

#NameTypeDescription
1aSingle
2bSingle

Returns: Single