Skip to content

Commit

Permalink
Change documentation format from Doxygen to ReadTheDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
joobog committed Oct 9, 2023
1 parent e47d12e commit 9af40ca
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
5 changes: 3 additions & 2 deletions src/grib_ibmfloat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ static ibm_table_t ibm_table = { 0, {0,}, {0,}, 0, 0 };


/**
* @brief (see the documentation for init_ieee_float() in grib_ieeefloat.cc)
*/
.. seealso::
Documentation for ``init_ieee_float()`` in ``grib_ieeefloat.cc``
*/

static void init_ibm_table()
{
Expand Down
46 changes: 27 additions & 19 deletions src/grib_ieeefloat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,33 @@ static ieee_table_t ieee_table = { 0, {0,}, {0,}, 0, 0 };


/**
* @brief Initializes the ieee_table with IEE754 single precision (32-bit) values.
*
* Nearest smaller values (e.g., reference values for grid_simple and grid_ccsds)
* are taken from this table.
*
* @details The table layout is as follows:
*
* | idx (i) | multiplier (e) | value (v = mmin * e) |
* |---------|----------------|----------------------|
* | 1 | 2^(-149) | 0x800000 * 2^(-149) |
* | 2 | 2^(-148) | 0x800000 * 2^(-148) |
* | ... | ... | ... |
* | 253 | 2^103 | 0x800000 * 2^103 |
* | 254 | 2^104 | 0x800000 * 2^104 |
*
* The vmin and vmax boundaries are defined as:
* - vmin = 0x800000 * 2^(-149)
* - vmax = 0xffffff * 2^104
*/
.. _init_ieee_table:
Init IEEE Table
===============
Initializes the ieee_table with IEEE754 single precision (32-bit) values. Nearest smaller values (e.g., reference values for grid_simple and grid_ccsds) are taken from this table.
Details
-------
The table layout is as follows:
+-------+----------------+----------------------+
| idx (i) | multiplier (e) | value (v = mmin * e) |
+-------+----------------+----------------------+
| 1 | 2^(-149) | 0x800000 * 2^(-149) |
| 2 | 2^(-148) | 0x800000 * 2^(-148) |
| ... | ... | ... |
| 253 | 2^103 | 0x800000 * 2^103 |
| 254 | 2^104 | 0x800000 * 2^104 |
+-------+----------------+----------------------+
The vmin and vmax boundaries are defined as:
- vmin = 0x800000 * 2^(-149)
- vmax = 0xffffff * 2^104
*/

static void init_ieee_table()
{
Expand Down

0 comments on commit 9af40ca

Please sign in to comment.