Math#
2026-10-23
1 min read time
This page covers the math extended API, providing integer arithmetic utilities including ceiling division, rounding, and integer logarithm functions.
Header |
Content |
Since |
|---|---|---|
Ceiling division |
libhipcxx 2.7 |
|
Round up to the next multiple |
libhipcxx 3.0 |
|
Round down to the previous multiple |
libhipcxx 3.0 |
|
Integer logarithm to the base 2 |
libhipcxx 3.0 |
|
Integer logarithm to the base 10 |
libhipcxx 3.0 |
|
Integer power |
libhipcxx 3.4 |
|
If the value is a power of two |
libhipcxx 3.4 |
|
Integer square root |
libhipcxx 3.4 |
|
Integer negation |
libhipcxx 3.4 |
|
Next power of two |
libhipcxx 3.4 |
|
Previous power of two |
libhipcxx 3.4 |
|
Unsigned absolute value |
libhipcxx 3.4 |
|
Fast Modulo/Division |
libhipcxx 3.4 |
|
Most significant half of the product |
libhipcxx 3.4 |
|
Computes sine and cosine of a value at the same time. |
libhipcxx 3.4 |