Forum Discussion
Altera_Forum
Honored Contributor
15 years agoAbsolute Value and Square Root implementations in fixed point
Hi, I know that there exists a MegaFunction for absolute value in floating point. But I am looking for an implementation to get the absolute value/modulus in fixed point. Another implement...
Altera_Forum
Honored Contributor
15 years agoabsolute value of 2's complement is straight forward. For positive numbers it is the number value itself. For negative numbers invert each magnitude bit then add 1.
For square root, there are many iterative methods (google square root in FPGA). You may also consider using the square rather than the its root if your application can do with it.