xref: /aosp_15_r20/external/pigweed/pw_numeric/docs.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker.. _module-pw_numeric:
2*61c4878aSAndroid Build Coastguard Worker
3*61c4878aSAndroid Build Coastguard Worker==========
4*61c4878aSAndroid Build Coastguard Workerpw_numeric
5*61c4878aSAndroid Build Coastguard Worker==========
6*61c4878aSAndroid Build Coastguard Worker.. pigweed-module::
7*61c4878aSAndroid Build Coastguard Worker   :name: pw_numeric
8*61c4878aSAndroid Build Coastguard Worker
9*61c4878aSAndroid Build Coastguard Worker``pw_numeric`` is a collection of mathematical utilities optimized for embedded
10*61c4878aSAndroid Build Coastguard Workersystems.
11*61c4878aSAndroid Build Coastguard Worker
12*61c4878aSAndroid Build Coastguard Worker**What belongs in this module?**
13*61c4878aSAndroid Build Coastguard Worker
14*61c4878aSAndroid Build Coastguard WorkerAny standalone mathematical, numerical, or statisitical utilities that are
15*61c4878aSAndroid Build Coastguard Workeroptimized for embedded belong in ``pw_numeric``. This encompasses a broad area,
16*61c4878aSAndroid Build Coastguard Workerbut since the C++ standard library provides many mathematical utilities already,
17*61c4878aSAndroid Build Coastguard Workerthis module is not anticipated to be too large. If the module does grow
18*61c4878aSAndroid Build Coastguard Workersubstantially, some features may be moved to other modules (e.g.
19*61c4878aSAndroid Build Coastguard Worker``pw_statistics``).
20*61c4878aSAndroid Build Coastguard Worker
21*61c4878aSAndroid Build Coastguard Worker**What does NOT belong in this module?**
22*61c4878aSAndroid Build Coastguard Worker
23*61c4878aSAndroid Build Coastguard Worker- Features available in the C++ standard library (``<cmath>``, ``<numeric>``,
24*61c4878aSAndroid Build Coastguard Worker  ``<bit>``, etc.) should not be duplicated.
25*61c4878aSAndroid Build Coastguard Worker- Pseudo-random number generation belongs in :ref:`module-pw_random`.
26*61c4878aSAndroid Build Coastguard Worker- Data integrity checking belongs in :ref:`module-pw_checksum`.
27*61c4878aSAndroid Build Coastguard Worker- Bit / byte manipulation belong in :ref:`module-pw_bytes`.
28*61c4878aSAndroid Build Coastguard Worker
29*61c4878aSAndroid Build Coastguard Worker-----------------
30*61c4878aSAndroid Build Coastguard WorkerC++ API reference
31*61c4878aSAndroid Build Coastguard Worker-----------------
32*61c4878aSAndroid Build Coastguard Worker
33*61c4878aSAndroid Build Coastguard Workerpw_numeric/integer_division.h
34*61c4878aSAndroid Build Coastguard Worker=============================
35*61c4878aSAndroid Build Coastguard Worker.. doxygenfunction:: pw::IntegerDivisionRoundNearest
36