You are here : vhdlmath_realsign

sign() - math_real

Returns 1.0 for positive number, 0.0 for 0 and -1.0 for negative number.


Syntax

function SIGN (X: in REAL ) return REAL;


Example


Output / Return Value

Returns 1.0 if X > 0.0; 0.0 if X = 0.0; -1.0 if X < 0.0


Limitations


Alternatives / See Also


Reference

https://standards.ieee.org/downloads/1076/1076.2-1996/math_real.vhdl