shithub: femtolisp

ref: 2479b2254aacacf40b210db48d8665f99a11ef02
dir: /llt.h/

View raw version
#pragma once

#include "platform.h"
#include "utf8.h"
#include "ios.h"
#include "bitvector.h"

#include "htableh.inc"
HTPROT(ptrhash)

#define DBL_MAXINT (1LL<<53)
#define FLT_MAXINT (1<<24)
#define BIT63 0x8000000000000000ULL
#define BIT31 0x80000000UL

#ifdef BITS64
#define TOP_BIT BIT63
typedef uint64_t lltuint_t;
typedef int64_t lltint_t;
#else
#define TOP_BIT BIT31
typedef uint32_t lltuint_t;
typedef int32_t lltint_t;
#endif

#define LOG2_10 3.3219280948873626
#define rel_zero(a, b) (fabs((a)/(b)) < DBL_EPSILON)
#define LLT_ALIGN(x, sz) (((x) + (sz-1)) & (-sz))

extern double D_PNAN, D_NNAN, D_PINF, D_NINF;
extern float F_PNAN, F_NNAN, F_PINF, F_NINF;

int flmain(const char *boot, int bootsz, int argc, char **argv);