MMgr v2.3.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches
transformo.h File Reference

Decimal to binary conversion, the limits, the arguments, and the muto dispatch table. More...

#include "fractio/fractio.h"
#include "mmgr.h"
#include "pow5/pow5.h"

Go to the source code of this file.

Data Structures

struct  TransformoCfg
 Arguments for the four muto calls. More...
struct  TransformoNs
 Type of the muto dispatch table. More...

Macros

#define MMGR_MUTO_MANT_MAX
 Expands to the largest mantissa mmgr_muto_take will extend, which is (~0 - 9) / 10.
#define MMGR_MUTO_EXP_LIMIT
 Expands to 400, the count at which a parsed decimal exponent stops its growth.

Functions

static EMBED_HOST_DEVICE unsigned int mmgr_muto_digit_value (uint8_t character)
 The value of an ASCII digit in a base up to 36.
EMBED_HOST_DEVICE embed_bool mmgr_muto_take (const TransformoCfg *args)
 Appends args->digit to *args->mant as one more decimal digit.
EMBED_HOST_DEVICE double mmgr_muto_scale (const TransformoCfg *args)
 Turns *args->mant times ten raised to args->ex into a double, signed by args->neg.
EMBED_HOST_DEVICE embed_u64 mmgr_muto_scale_to_u64 (const TransformoCfg *args)
 Turns *args->mant times two raised to args->e2 times ten raised to args->ex into a rounded 64-bit integer.
EMBED_HOST_DEVICE embed_bool mmgr_muto_take_in (const TransformoCfg *args)
 Appends args->digit to *args->mant as one more digit in base args->base.

Variables

static const TransformoNs muto
 Dispatch table instance named muto, with each member set to its mmgr_muto_ function.

Detailed Description

Decimal to binary conversion, the limits, the arguments, and the muto dispatch table.

Author
dstroy0 (Douglas Quigg) dquig.nosp@m.g123.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Date
2026-08-29
Note
take builds a mantissa one digit at a time, and take_in does the same in a base from 2 to 36.
scale turns one into a double, and scale_to_u64 turns one into an integer.

Definition in file transformo.h.