Block: Sign



PIC




Inports


In

Input u






Outports


Out

Value corresponding to sign of u




Description:

Signum function.

Calculation:

                  {

Out  = sgn (In) =  1     In ≥  0
                   - 1   In <  0

Implementations:
FiP8 8 Bit Fixed Point Implementation
FiP16 16 Bit Fixed Point Implementation
FiP32 32 Bit Fixed Point Implementation

Implementation: FiP8


8 Bit Fixed Point Implementation



Inports Data Type


In

int8






Outports Data Type


Out

int8




Implementation: FiP16


16 Bit Fixed Point Implementation



Inports Data Type


In

int16






Outports Data Type


Out

int16




Implementation: FiP32


32 Bit Fixed Point Implementation



Inports Data Type


In

int32






Outports Data Type


Out

int32