XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
dtoa.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <inttypes.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include <sys/time.h>
#include <math.h>
#include <setjmp.h>
#include "cutils.h"
#include "dtoa.h"
Include dependency graph for dtoa.c:

Classes

struct  mpb_t
 

Macros

#define USE_POW5_TABLE
 
#define USE_FAST_INT
 
#define LIMB_LOG2_BITS   5
 
#define LIMB_BITS   (1 << LIMB_LOG2_BITS)
 
#define LIMB_DIGITS   9
 
#define JS_RADIX_MAX   36
 
#define DBIGNUM_LEN_MAX   52 /* ~ 2^(1072+53)*36^100 (dtoa) */
 
#define MANT_LEN_MAX   18 /* < 36^100 */
 
#define MUL_LOG2_RADIX_BASE_LOG2   24
 

Typedefs

typedef int32_t slimb_t
 
typedef uint32_t limb_t
 
typedef uint64_t dlimb_t
 
typedef intptr_t mp_size_t
 

Enumerations

enum  { JS_RNDN , JS_RNDNA , JS_RNDZ }
 

Functions

size_t u32toa (char *buf, uint32_t n)
 
size_t i32toa (char *buf, int32_t n)
 
size_t u64toa (char *buf, uint64_t n)
 
size_t i64toa (char *buf, int64_t n)
 
size_t u64toa_radix (char *buf, uint64_t n, unsigned int radix)
 
size_t i64toa_radix (char *buf, int64_t n, unsigned int radix)
 
int js_dtoa_max_len (double d, int radix, int n_digits, int flags)
 
int js_dtoa (char *buf, double d, int radix, int n_digits, int flags, JSDTOATempMem *tmp_mem)
 
double js_atod (const char *str, const char **pnext, int radix, int flags, JSATODTempMem *tmp_mem)
 

Macro Definition Documentation

◆ DBIGNUM_LEN_MAX

#define DBIGNUM_LEN_MAX   52 /* ~ 2^(1072+53)*36^100 (dtoa) */

◆ JS_RADIX_MAX

#define JS_RADIX_MAX   36

◆ LIMB_BITS

#define LIMB_BITS   (1 << LIMB_LOG2_BITS)

◆ LIMB_DIGITS

#define LIMB_DIGITS   9

◆ LIMB_LOG2_BITS

#define LIMB_LOG2_BITS   5

◆ MANT_LEN_MAX

#define MANT_LEN_MAX   18 /* < 36^100 */

◆ MUL_LOG2_RADIX_BASE_LOG2

#define MUL_LOG2_RADIX_BASE_LOG2   24

◆ USE_FAST_INT

#define USE_FAST_INT

◆ USE_POW5_TABLE

#define USE_POW5_TABLE

Typedef Documentation

◆ dlimb_t

typedef uint64_t dlimb_t

◆ limb_t

typedef uint32_t limb_t

◆ mp_size_t

◆ slimb_t

typedef int32_t slimb_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
JS_RNDN 
JS_RNDNA 
JS_RNDZ 

Function Documentation

◆ i32toa()

size_t i32toa ( char *  buf,
int32_t  n 
)

◆ i64toa()

size_t i64toa ( char *  buf,
int64_t  n 
)

◆ i64toa_radix()

size_t i64toa_radix ( char *  buf,
int64_t  n,
unsigned int  radix 
)

◆ js_atod()

double js_atod ( const char *  str,
const char **  pnext,
int  radix,
int  flags,
JSATODTempMem *  tmp_mem 
)

◆ js_dtoa()

int js_dtoa ( char *  buf,
double  d,
int  radix,
int  n_digits,
int  flags,
JSDTOATempMem *  tmp_mem 
)

◆ js_dtoa_max_len()

int js_dtoa_max_len ( double  d,
int  radix,
int  n_digits,
int  flags 
)

◆ u32toa()

size_t u32toa ( char *  buf,
uint32_t  n 
)

◆ u64toa()

size_t u64toa ( char *  buf,
uint64_t  n 
)

◆ u64toa_radix()

size_t u64toa_radix ( char *  buf,
uint64_t  n,
unsigned int  radix 
)