Embedded Artistry Framework
Embedded Systems C++ Framework
Classes | Macros | Typedefs | Functions | Variables
gdtoaimp.h File Reference
#include "gd_qnan.h"
#include "gdtoa.h"
#include "stdlib.h"
#include "string.h"
#include "errno.h"
#include "float.h"
#include "math.h"
Include dependency graph for gdtoaimp.h:
This graph shows which files directly or indirectly include this file:

Classes

union  U
 
struct  Bigint
 

Macros

#define Char   void
 
#define MALLOC   malloc
 
#define word0(x)   ((U*)&x)->L[0]
 
#define word1(x)   ((U*)&x)->L[1]
 
#define dval(x)   ((U*)&x)->d
 
#define Storeinc(a, b, c)   (((unsigned short*)a)[0] = (unsigned short)b, ((unsigned short*)a)[1] = (unsigned short)c, a++)
 
#define Sudden_Underflow
 
#define Flt_Rounds   1
 
#define Exp_shift   23
 
#define Exp_shift1   7
 
#define Exp_msk1   0x80
 
#define Exp_msk11   0x800000
 
#define Exp_mask   0x7f80
 
#define P   56
 
#define Bias   129
 
#define Exp_1   0x40800000
 
#define Exp_11   0x4080
 
#define Ebits   8
 
#define Frac_mask   0x7fffff
 
#define Frac_mask1   0xffff007f
 
#define Ten_pmax   24
 
#define Bletch   2
 
#define Bndry_mask   0xffff007f
 
#define Bndry_mask1   0xffff007f
 
#define LSB   0x10000
 
#define Sign_bit   0x8000
 
#define Log2P   1
 
#define Tiny0   0x80
 
#define Tiny1   0
 
#define Quick_max   15
 
#define Int_max   15
 
#define ROUND_BIASED
 
#define rounded_product(a, b)   a *= b
 
#define rounded_quotient(a, b)   a /= b
 
#define Big0   (Frac_mask1 | Exp_msk1 * (DBL_MAX_EXP + Bias - 1))
 
#define Big1   0xffffffff
 
#define Pack_32
 
#define Llong   long long
 
#define ULLong   unsigned Llong
 
#define ULbits   32
 
#define kshift   5
 
#define kmask   31
 
#define ALL_ON   0xffffffff
 
#define ACQUIRE_DTOA_LOCK(n)   /*nothing*/
 
#define FREE_DTOA_LOCK(n)   /*nothing*/
 
#define Kmax   15
 
#define Bcopy(x, y)   memcpy(&x->sign, &y->sign, (size_t)(y->wds) * sizeof(ULong) + 2 * sizeof(int))
 
#define Balloc   Balloc_D2A
 
#define Bfree   Bfree_D2A
 
#define ULtoQ   ULtoQ_D2A
 
#define ULtof   ULtof_D2A
 
#define ULtod   ULtod_D2A
 
#define ULtodd   ULtodd_D2A
 
#define ULtox   ULtox_D2A
 
#define ULtoxL   ULtoxL_D2A
 
#define any_on   any_on_D2A
 
#define b2d   b2d_D2A
 
#define bigtens   bigtens_D2A
 
#define cmp   cmp_D2A
 
#define copybits   copybits_D2A
 
#define d2b   d2b_D2A
 
#define decrement   decrement_D2A
 
#define diff   diff_D2A
 
#define dtoa_result   dtoa_result_D2A
 
#define g__fmt   g__fmt_D2A
 
#define gethex   gethex_D2A
 
#define hexdig   hexdig_D2A
 
#define hexnan   hexnan_D2A
 
#define hi0bits(x)   hi0bits_D2A((ULong)(x))
 
#define i2b   i2b_D2A
 
#define increment   increment_D2A
 
#define lo0bits   lo0bits_D2A
 
#define lshift   lshift_D2A
 
#define match   match_D2A
 
#define mult   mult_D2A
 
#define multadd   multadd_D2A
 
#define nrv_alloc   nrv_alloc_D2A
 
#define pow5mult   pow5mult_D2A
 
#define quorem   quorem_D2A
 
#define ratio   ratio_D2A
 
#define rshift   rshift_D2A
 
#define rv_alloc   rv_alloc_D2A
 
#define s2b   s2b_D2A
 
#define set_ones   set_ones_D2A
 
#define strcp   strcp_D2A
 
#define strtoIg   strtoIg_D2A
 
#define sum   sum_D2A
 
#define tens   tens_D2A
 
#define tinytens   tinytens_D2A
 
#define tinytens   tinytens_D2A
 
#define trailz   trailz_D2A
 
#define ulp   ulp_D2A
 
#define SI   1
 

Typedefs

typedef struct Bigint Bigint
 

Functions

Bigint *Balloc ANSI ((int))
 
void Bfree ANSI ((Bigint *))
 
void ULtof ANSI ((ULong *, const ULong *, Long, int))
 
void ULtodd ANSI ((ULong *, ULong *, Long, int))
 
void ULtox ANSI ((UShort *, const ULong *, Long, int))
 
ULong any_on ANSI ((Bigint *, int))
 
double b2d ANSI ((Bigint *, int *))
 
int cmp ANSI ((Bigint *, Bigint *))
 
void copybits ANSI ((ULong *, int, Bigint *))
 
Bigint *d2b ANSI ((double, int *, int *))
 
char *dtoa ANSI ((double d, int mode, int ndigits, int *decpt, int *sign, char **rve))
 
char *g__fmt ANSI ((char *, char *, const char *, int, ULong))
 
int gethex ANSI ((CONST char **, FPI *, Long *, Bigint **, int))
 
void hexdig_init_D2A (Void)
 
int hexnan ANSI ((CONST char **, FPI *, ULong *))
 
int hi0bits_D2A ANSI ((ULong))
 
int lo0bits ANSI ((ULong *))
 
int match ANSI ((CONST char **, char *))
 
Bigint *multadd ANSI ((Bigint *, int, int))
 
char *nrv_alloc ANSI ((char *, char **, int))
 
Bigint *s2b ANSI ((CONST char *, int, int, ULong))
 
char *strcp ANSI ((char *, const char *))
 
int strtoIg ANSI ((CONST char *, char **, FPI *, Long *, Bigint **, int *))
 
double strtod ANSI ((const char *s00, char **se))
 
double ulp ANSI ((double))
 

Variables

Exactly one of IEEE_8087
 
Exactly one of IEEE_MC68k
 
Exactly one of VAX
 
char * dtoa_result
 
CONST double bigtens []
 
CONST double tens []
 
CONST double tinytens []
 
unsigned char hexdig []
 

Class Documentation

◆ U

union U
Class Members
double d
ULong L[2]

◆ Bigint

struct Bigint
Class Members
int k
int maxwds
struct Bigint * next
int sign
int wds
ULong x[1]

Macro Definition Documentation

◆ ACQUIRE_DTOA_LOCK

#define ACQUIRE_DTOA_LOCK (   n)    /*nothing*/

◆ ALL_ON

#define ALL_ON   0xffffffff

◆ any_on

#define any_on   any_on_D2A

◆ b2d

#define b2d   b2d_D2A

◆ Balloc

#define Balloc   Balloc_D2A

◆ Bcopy

#define Bcopy (   x,
 
)    memcpy(&x->sign, &y->sign, (size_t)(y->wds) * sizeof(ULong) + 2 * sizeof(int))

◆ Bfree

#define Bfree   Bfree_D2A

◆ Bias

#define Bias   129

◆ Big0

#define Big0   (Frac_mask1 | Exp_msk1 * (DBL_MAX_EXP + Bias - 1))

◆ Big1

#define Big1   0xffffffff

◆ bigtens

#define bigtens   bigtens_D2A

◆ Bletch

#define Bletch   2

◆ Bndry_mask

#define Bndry_mask   0xffff007f

◆ Bndry_mask1

#define Bndry_mask1   0xffff007f

◆ Char

#define Char   void

◆ cmp

#define cmp   cmp_D2A

◆ copybits

#define copybits   copybits_D2A

◆ d2b

#define d2b   d2b_D2A

◆ decrement

#define decrement   decrement_D2A

◆ diff

#define diff   diff_D2A

◆ dtoa_result

#define dtoa_result   dtoa_result_D2A

◆ dval

#define dval (   x)    ((U*)&x)->d

◆ Ebits

#define Ebits   8

◆ Exp_1

#define Exp_1   0x40800000

◆ Exp_11

#define Exp_11   0x4080

◆ Exp_mask

#define Exp_mask   0x7f80

◆ Exp_msk1

#define Exp_msk1   0x80

◆ Exp_msk11

#define Exp_msk11   0x800000

◆ Exp_shift

#define Exp_shift   23

◆ Exp_shift1

#define Exp_shift1   7

◆ Flt_Rounds

#define Flt_Rounds   1

◆ Frac_mask

#define Frac_mask   0x7fffff

◆ Frac_mask1

#define Frac_mask1   0xffff007f

◆ FREE_DTOA_LOCK

#define FREE_DTOA_LOCK (   n)    /*nothing*/

◆ g__fmt

#define g__fmt   g__fmt_D2A

◆ gethex

#define gethex   gethex_D2A

◆ hexdig

#define hexdig   hexdig_D2A

◆ hexnan

#define hexnan   hexnan_D2A

◆ hi0bits

#define hi0bits (   x)    hi0bits_D2A((ULong)(x))

◆ i2b

#define i2b   i2b_D2A

◆ increment

#define increment   increment_D2A

◆ Int_max

#define Int_max   15

◆ kmask

#define kmask   31

◆ Kmax

#define Kmax   15

◆ kshift

#define kshift   5

◆ Llong

#define Llong   long long

◆ lo0bits

#define lo0bits   lo0bits_D2A

◆ Log2P

#define Log2P   1

◆ LSB

#define LSB   0x10000

◆ lshift

#define lshift   lshift_D2A

◆ MALLOC

#define MALLOC   malloc

◆ match

#define match   match_D2A

◆ mult

#define mult   mult_D2A

◆ multadd

#define multadd   multadd_D2A

◆ nrv_alloc

#define nrv_alloc   nrv_alloc_D2A

◆ P

#define P   56

◆ Pack_32

#define Pack_32

◆ pow5mult

#define pow5mult   pow5mult_D2A

◆ Quick_max

#define Quick_max   15

◆ quorem

#define quorem   quorem_D2A

◆ ratio

#define ratio   ratio_D2A

◆ ROUND_BIASED

#define ROUND_BIASED

◆ rounded_product

#define rounded_product (   a,
  b 
)    a *= b

◆ rounded_quotient

#define rounded_quotient (   a,
  b 
)    a /= b

◆ rshift

#define rshift   rshift_D2A

◆ rv_alloc

#define rv_alloc   rv_alloc_D2A

◆ s2b

#define s2b   s2b_D2A

◆ set_ones

#define set_ones   set_ones_D2A

◆ SI

#define SI   1

◆ Sign_bit

#define Sign_bit   0x8000

◆ Storeinc

#define Storeinc (   a,
  b,
 
)    (((unsigned short*)a)[0] = (unsigned short)b, ((unsigned short*)a)[1] = (unsigned short)c, a++)

◆ strcp

#define strcp   strcp_D2A

◆ strtoIg

#define strtoIg   strtoIg_D2A

◆ Sudden_Underflow

#define Sudden_Underflow

◆ sum

#define sum   sum_D2A

◆ Ten_pmax

#define Ten_pmax   24

◆ tens

#define tens   tens_D2A

◆ Tiny0

#define Tiny0   0x80

◆ Tiny1

#define Tiny1   0

◆ tinytens [1/2]

#define tinytens   tinytens_D2A

◆ tinytens [2/2]

#define tinytens   tinytens_D2A

◆ trailz

#define trailz   trailz_D2A

◆ ULbits

#define ULbits   32

◆ ULLong

#define ULLong   unsigned Llong

◆ ulp

#define ulp   ulp_D2A

◆ ULtod

#define ULtod   ULtod_D2A

◆ ULtodd

#define ULtodd   ULtodd_D2A

◆ ULtof

#define ULtof   ULtof_D2A

◆ ULtoQ

#define ULtoQ   ULtoQ_D2A

◆ ULtox

#define ULtox   ULtox_D2A

◆ ULtoxL

#define ULtoxL   ULtoxL_D2A

◆ word0

#define word0 (   x)    ((U*)&x)->L[0]

◆ word1

#define word1 (   x)    ((U*)&x)->L[1]

Typedef Documentation

◆ Bigint

typedef struct Bigint Bigint

Function Documentation

◆ ANSI() [1/24]

char *rv_alloc ANSI ( (int)  )

◆ ANSI() [2/24]

int trailz ANSI ( (Bigint *)  )

◆ ANSI() [3/24]

void ULtoxL ANSI ( (ULong *, const ULong *, Long, int)  )

◆ ANSI() [4/24]

void ULtodd ANSI ( (ULong *, ULong *, Long, int)  )

◆ ANSI() [5/24]

void ULtox ANSI ( (UShort *, const ULong *, Long, int)  )

◆ ANSI() [6/24]

Bigint *set_ones ANSI ( (Bigint *, int)  )

◆ ANSI() [7/24]

double b2d ANSI ( (Bigint *, int *)  )

◆ ANSI() [8/24]

Bigint *sum ANSI ( (Bigint *, Bigint *)  )

◆ ANSI() [9/24]

void copybits ANSI ( (ULong *, int, Bigint *)  )

◆ ANSI() [10/24]

Bigint* d2b ANSI ( (double, int *, int *)  )

◆ ANSI() [11/24]

char* dtoa ANSI ( (double d, int mode, int ndigits, int *decpt, int *sign, char **rve)  )

◆ ANSI() [12/24]

char* g__fmt ANSI ( (char *, char *, const char *, int, ULong )

◆ ANSI() [13/24]

int gethex ANSI ( (CONST char **, FPI *, Long *, Bigint **, int)  )

◆ ANSI() [14/24]

int hexnan ANSI ( (CONST char **, FPI *, ULong *)  )

◆ ANSI() [15/24]

int hi0bits_D2A ANSI ( (ULong )

◆ ANSI() [16/24]

int lo0bits ANSI ( (ULong *)  )

◆ ANSI() [17/24]

int match ANSI ( (CONST char **, char *)  )

◆ ANSI() [18/24]

Bigint* multadd ANSI ( (Bigint *, int, int)  )

◆ ANSI() [19/24]

char* nrv_alloc ANSI ( (char *, char **, int)  )

◆ ANSI() [20/24]

Bigint* s2b ANSI ( (CONST char *, int, int, ULong )

◆ ANSI() [21/24]

char* strcp ANSI ( (char *, const char *)  )

◆ ANSI() [22/24]

int strtoIg ANSI ( (CONST char *, char **, FPI *, Long *, Bigint **, int *)  )

◆ ANSI() [23/24]

double strtod ANSI ( (const char *s00, char **se)  )

◆ ANSI() [24/24]

double ulp ANSI ( (double)  )

◆ hexdig_init_D2A()

void hexdig_init_D2A ( Void  )

References hexdig, htinit(), and USC.

Referenced by gethex(), and hexnan().

Here is the caller graph for this function:

Variable Documentation

◆ bigtens

CONST double bigtens[]

◆ dtoa_result

char* dtoa_result

Referenced by freedtoa(), and rv_alloc().

◆ hexdig

unsigned char hexdig[]

Referenced by hexdig_init_D2A().

◆ IEEE_8087

Exactly one of IEEE_8087

◆ IEEE_MC68k

Exactly one of IEEE_MC68k

◆ tens

CONST double tens[]

◆ tinytens

CONST double tinytens[]

◆ VAX

Exactly one of VAX