Embedded Artistry Framework
Embedded Systems C++ Framework
Macros | Functions | Variables
misc.c File Reference
#include "gdtoaimp.h"
Include dependency graph for misc.c:

Macros

#define PRIVATE_MEM   2304
 
#define PRIVATE_mem   ((PRIVATE_MEM + sizeof(double) - 1) / sizeof(double))
 
#define d0   word0(d)
 
#define d1   word1(d)
 
#define d0   word0(d)
 
#define d1   word1(d)
 

Functions

BigintBalloc (int k)
 
void Bfree (Bigint *v)
 
int lo0bits (ULong *y)
 
Bigintmultadd (Bigint *b, int m, int a)
 
int hi0bits_D2A (register ULong x)
 
Biginti2b (int i)
 
Bigintmult (Bigint *a, Bigint *b)
 
Bigintpow5mult (Bigint *b, int k)
 
Bigintlshift (Bigint *b, int k)
 
int cmp (Bigint *a, Bigint *b)
 
Bigintdiff (Bigint *a, Bigint *b)
 
double b2d (Bigint *a, int *e)
 
Bigintd2b (double d, int *e, int *bits)
 
char * strcp_D2A (char *a, CONST char *b)
 

Variables

static Bigintfreelist [Kmax+1]
 
static double private_mem [PRIVATE_mem]
 
static double * pmem_next = private_mem
 
static Bigintp5s
 
CONST double bigtens [] = {1e16, 1e32}
 
CONST double tinytens [] = {1e-16, 1e-32}
 
CONST double tens []
 

Macro Definition Documentation

◆ d0 [1/2]

#define d0   word0(d)

◆ d0 [2/2]

#define d0   word0(d)

◆ d1 [1/2]

#define d1   word1(d)

◆ d1 [2/2]

#define d1   word1(d)

◆ PRIVATE_MEM

#define PRIVATE_MEM   2304

◆ PRIVATE_mem

#define PRIVATE_mem   ((PRIVATE_MEM + sizeof(double) - 1) / sizeof(double))

Function Documentation

◆ b2d()

double b2d ( Bigint a,
int *  e 
)

References a, d0, d1, dval, Ebits, Exp_1, hi0bits, k, w, word0, word1, and z.

Referenced by gdtoa(), and ratio().

◆ Balloc()

Bigint* Balloc ( int  k)

◆ Bfree()

void Bfree ( Bigint v)

◆ cmp()

int cmp ( Bigint a,
Bigint b 
)

References a, and b.

Referenced by _qsort(), bsearch(), diff(), dtoa(), gdtoa(), qsort(), quorem(), strtod(), and strtodg().

◆ d2b()

Bigint* d2b ( double  d,
int *  e,
int *  bits 
)

◆ diff()

Bigint* diff ( Bigint a,
Bigint b 
)

◆ hi0bits_D2A()

int hi0bits_D2A ( register ULong  x)

References k.

◆ i2b()

Bigint* i2b ( int  i)

References b, and Balloc().

Referenced by dtoa(), gdtoa(), pow5mult(), strtod(), and strtodg().

◆ lo0bits()

int lo0bits ( ULong y)

References k.

Referenced by d2b(), g_ddfmt(), mantbits(), strtodg(), and trailz().

◆ lshift()

Bigint* lshift ( Bigint b,
int  k 
)

References b, b1, Balloc(), Bfree(), k, kmask, kshift, n, and z.

Referenced by dtoa(), g_ddfmt(), gdtoa(), gethex(), rvOK(), strtod(), strtodg(), and strtoIg().

◆ mult()

Bigint* mult ( Bigint a,
Bigint b 
)

References a, b, Balloc(), k, Storeinc, UL, ULLong, Bigint::wds, Bigint::x, and z.

Referenced by dtoa(), gdtoa(), pow5mult(), strtod(), and strtodg().

◆ multadd()

Bigint* multadd ( Bigint b,
int  m,
int  a 
)

References a, b, b1, Balloc(), Bcopy, Bfree(), UL, ULLong, and z.

Referenced by dtoa(), gdtoa(), pow5mult(), and s2b().

◆ pow5mult()

Bigint* pow5mult ( Bigint b,
int  k 
)

◆ strcp_D2A()

char* strcp_D2A ( char *  a,
CONST char *  b 
)

References a, and b.

Variable Documentation

◆ bigtens

CONST double bigtens[] = {1e16, 1e32}

◆ freelist

Bigint* freelist[Kmax+1]
static

Referenced by Balloc(), and Bfree().

◆ p5s

Bigint* p5s
static

Referenced by pow5mult().

◆ pmem_next

double * pmem_next = private_mem
static

Referenced by Balloc().

◆ private_mem

double private_mem[PRIVATE_mem]
static

Referenced by Balloc().

◆ tens

CONST double tens[]
Initial value:
= {1e0,
1e1,
1e2,
1e3,
1e4,
1e5,
1e6,
1e7,
1e8,
1e9,
1e10,
1e11,
1e12,
1e13,
1e14,
1e15,
1e16,
1e17,
1e18,
1e19,
1e20,
1e21,
1e22
}

◆ tinytens

CONST double tinytens[] = {1e-16, 1e-32}