16#ifndef MMGR_TRANSFORMO_H
17#define MMGR_TRANSFORMO_H
37#define MMGR_MUTO_MANT_MAX ((embed_u64)((~(embed_u64)0 - 9u) / 10u))
48#define MMGR_MUTO_EXP_LIMIT 400
82EMBED_TABLE_LAYOUT(
TransformoNs, take, scale, scale_to_u64, take_in);
93 const unsigned int decimal = (
unsigned int)character - (
unsigned int)
'0';
95 const unsigned int letter = ((
unsigned int)character | 0x20u) - (
unsigned int)
'a';
96 return (decimal < 10u) ? decimal : ((letter < 26u) ? (letter + 10u) : 36u);
The binary64 field layout and scale bounds, the assertions that pin them, the six entry points and th...
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.
static const TransformoNs muto
Dispatch table instance named muto, with each member set to its mmgr_muto_ function.
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_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 int...
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_bool mmgr_muto_take(const TransformoCfg *args)
Appends args->digit to *args->mant as one more decimal digit.
The embedded_types headers every module builds on.
Powers of five as 128-bit significands, for the scale of a decimal mantissa into a binary one.