Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
math:start [2022/07/16 20:22] – [Namespace math::fxp] rajit | math:start [2023/04/25 14:23] (current) – [Functions] rajit | ||
---|---|---|---|
Line 2: | Line 2: | ||
This namespace is used to provide support functions for math operations. | This namespace is used to provide support functions for math operations. | ||
+ | |||
+ | ===== Functions ===== | ||
+ | |||
+ | <code act> | ||
+ | template< | ||
+ | </ | ||
+ | |||
+ | This function takes an integer '' | ||
+ | |||
+ | |||
+ | <code act> | ||
+ | template< | ||
+ | </ | ||
+ | |||
+ | This function takes an integer '' | ||
+ | |||
+ | |||
+ | |||
===== Namespace math::fxp ===== | ===== Namespace math::fxp ===== | ||
+ | |||
+ | ==== Functions ==== | ||
The '' | The '' | ||
Line 43: | Line 63: | ||
This returns the negated value of a signed Q(A,B) number '' | This returns the negated value of a signed Q(A,B) number '' | ||
+ | <code act> | ||
+ | template< | ||
+ | </ | ||
+ | This is true if the fixed point number is positive (greater than zero), and false otherwise. | ||
+ | |||
+ | <code act> | ||
+ | template< | ||
+ | </ | ||
+ | This is true if the fixed point number is negative, and false otherwise | ||
+ | |||
+ | <code act> | ||
+ | template< | ||
+ | </ | ||
+ | This tests if the value in '' | ||
+ | |||
+ | <code act> | ||
+ | function conv_to_fxp(pint A, B; preal v) : pint; | ||
+ | </ | ||
+ | This can be used to convert a real constant value into its fixed point representation. Note that since '' | ||