Math Processor Unit Library

libmpu – library of arithmetic functions for integer, real, and complex numbers of increased digit capacity

16 Commits   0 Branches   2 Tags

#ifndef   __REAL_INTERNAL_BIN_EXP_EMU64LSB
#define   __REAL_INTERNAL_BIN_EXP_EMU64LSB

#if BITS_PER_EMUSHORT == 64

/***************************************************************
  Определения для МАКСИМАЛЬНОЙ двоичной Экспоненты чисел
  типа real.
 ***************************************************************/

/* REAL_32_MAX_MAX_BIN_EXP      = 128; */
static EMUSHORT _max_max_bin_exp_32_[NPIE_32+1] =
{
  0x0000000000000080,
  0x0000000000000000
};
/* REAL_64_MAX_MAX_BIN_EXP      = 1024; */
static EMUSHORT _max_max_bin_exp_64_[NPIE_64+1] =
{
  0x0000000000000400,
  0x0000000000000000
};
/* REAL_128_MAX_MAX_BIN_EXP     = 1073741824; */
static EMUSHORT _max_max_bin_exp_128_[NPIE_128+1] =
{
  0x0000000040000000,
  0x0000000000000000
};
/* REAL_256_MAX_MAX_BIN_EXP     = 1073741824; */
static EMUSHORT _max_max_bin_exp_256_[NPIE_256+1] =
{
  0x0000000040000000,
  0x0000000000000000
};

/* REAL_512_MAX_MAX_BIN_EXP     = 4611686018427387904; */
static EMUSHORT _max_max_bin_exp_512_[NPIE_512+1] =
{
  0x4000000000000000,
  0x0000000000000000
};
/* REAL_1024_MAX_MAX_BIN_EXP    = 4611686018427387904; */
static EMUSHORT _max_max_bin_exp_1024_[NPIE_1024+1] =
{
  0x4000000000000000,
  0x0000000000000000
};

/* REAL_2048_MAX_MAX_BIN_EXP    = 85070591730234615865843651857942052864; */
static EMUSHORT _max_max_bin_exp_2048_[NPIE_2048+1] =
{
  0, 0x4000000000000000,
  0x0000000000000000
};
/* REAL_4096_MAX_MAX_BIN_EXP    = 85070591730234615865843651857942052864; */
static EMUSHORT _max_max_bin_exp_4096_[NPIE_4096+1] =
{
  0, 0x4000000000000000,
  0x0000000000000000
};

/* REAL_8192_MAX_MAX_BIN_EXP    =  28948022309329048855892746252171976963\
                                  317496166410141009864396001978282409984; */
static EMUSHORT _max_max_bin_exp_8192_[NPIE_8192+1] =
{
  0, 0,
  0, 0x4000000000000000,
  0x0000000000000000
};
/* REAL_16384_MAX_MAX_BIN_EXP   =  28948022309329048855892746252171976963\
                                  317496166410141009864396001978282409984; */
static EMUSHORT _max_max_bin_exp_16384_[NPIE_16384+1] =
{
  0, 0,
  0, 0x4000000000000000,
  0x0000000000000000
};

/* REAL_32768_MAX_MAX_BIN_EXP   =  33519519824856492748935062495514615318\
                                  698414551480983444308903609304410075183\
                                  867442004685745417258569225079645466215\
                                  12713438470702986642486608412251521024; */
static EMUSHORT _max_max_bin_exp_32768_[NPIE_32768+1] =
{
  0, 0,
  0, 0,
  0, 0,
  0, 0x4000000000000000,
  0x0000000000000000
};
/* REAL_65536_MAX_MAX_BIN_EXP   =  33519519824856492748935062495514615318\
                                  698414551480983444308903609304410075183\
                                  867442004685745417258569225079645466215\
                                  12713438470702986642486608412251521024; */
static EMUSHORT _max_max_bin_exp_65536_[NPIE_65536+1] =
{
  0, 0,
  0, 0,
  0, 0,
  0, 0x4000000000000000,
  0x0000000000000000
};

/* REAL_131072_MAX_MAX_BIN_EXP  = 449423283715578976932326297697256183404\
                                  494244735576643183575202894331689513752\
                                  407831771193306018840052800284699678483\
                                  394146974422036041556232118576598685310\
                                  944419733562163713190755549003115235298\
                                  632707380212514422095376705856157203684\
                                  782776352068092908376276711465745599868\
                                  11484619929076208839082406056034304; */
static EMUSHORT _max_max_bin_exp_131072_[NPIE_131072+1] =
{
  0, 0,
  0, 0,
  0, 0,
  0, 0,
  0, 0,
  0, 0,
  0, 0,
  0, 0x4000000000000000,
  0x0000000000000000
};


/***************************************************************
  Определения для Максимальной двоичной Экспоненты чисел
  типа real.
 ***************************************************************/

/* REAL_32_MAX_BIN_EXP      = +127; */
static EMUSHORT _max_bin_exp_32_[NPIE_32+1] =
{
  0x000000000000007f,
  0x0000000000000000
};
/* REAL_64_MAX_BIN_EXP      = +1023; */
static EMUSHORT _max_bin_exp_64_[NPIE_64+1] =
{
  0x00000000000003ff,
  0x0000000000000000
};
/* REAL_128_MAX_BIN_EXP     = +1073741823; */
static EMUSHORT _max_bin_exp_128_[NPIE_128+1] =
{
  0x000000003fffffff,
  0x0000000000000000
};
/* REAL_256_MAX_BIN_EXP     = +1073741823; */
static EMUSHORT _max_bin_exp_256_[NPIE_256+1] =
{
  0x000000003fffffff,
  0x0000000000000000
};

/* REAL_512_MAX_BIN_EXP     = +4611686018427387903; */
static EMUSHORT _max_bin_exp_512_[NPIE_512+1] =
{
  0x3fffffffffffffff,
  0x0000000000000000
};
/* REAL_1024_MAX_BIN_EXP    = +4611686018427387903; */
static EMUSHORT _max_bin_exp_1024_[NPIE_1024+1] =
{
  0x3fffffffffffffff,
  0x0000000000000000
};

/* REAL_2048_MAX_BIN_EXP    = +85070591730234615865843651857942052863; */
static EMUSHORT _max_bin_exp_2048_[NPIE_2048+1] =
{
  0xffffffffffffffff, 0x3fffffffffffffff,
  0x0000000000000000
};
/* REAL_4096_MAX_BIN_EXP    = +85070591730234615865843651857942052863; */
static EMUSHORT _max_bin_exp_4096_[NPIE_4096+1] =
{
  0xffffffffffffffff, 0x3fffffffffffffff,
  0x0000000000000000
};

/* REAL_8192_MAX_BIN_EXP    = +28948022309329048855892746252171976963\
                              317496166410141009864396001978282409983; */
static EMUSHORT _max_bin_exp_8192_[NPIE_8192+1] =
{
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0x3fffffffffffffff,
  0x0000000000000000
};
/* REAL_16384_MAX_BIN_EXP   = +28948022309329048855892746252171976963\
                              317496166410141009864396001978282409983; */
static EMUSHORT _max_bin_exp_16384_[NPIE_16384+1] =
{
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0x3fffffffffffffff,
  0x0000000000000000
};

/* REAL_32768_MAX_BIN_EXP   = +33519519824856492748935062495514615318\
                              698414551480983444308903609304410075183\
                              867442004685745417258569225079645466215\
                              12713438470702986642486608412251521023; */
static EMUSHORT _max_bin_exp_32768_[NPIE_32768+1] =
{
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0x3fffffffffffffff,
  0x0000000000000000
};
/* REAL_65536_MAX_BIN_EXP   = +33519519824856492748935062495514615318\
                              698414551480983444308903609304410075183\
                              867442004685745417258569225079645466215\
                              12713438470702986642486608412251521023; */
static EMUSHORT _max_bin_exp_65536_[NPIE_65536+1] =
{
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0x3fffffffffffffff,
  0x0000000000000000
};

/* REAL_131072_MAX_BIN_EXP  = +449423283715578976932326297697256183404\
                               494244735576643183575202894331689513752\
                               407831771193306018840052800284699678483\
                               394146974422036041556232118576598685310\
                               944419733562163713190755549003115235298\
                               632707380212514422095376705856157203684\
                               782776352068092908376276711465745599868\
                               11484619929076208839082406056034303; */
static EMUSHORT _max_bin_exp_131072_[NPIE_131072+1] =
{
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0xffffffffffffffff,
  0xffffffffffffffff, 0x3fffffffffffffff,
  0x0000000000000000
};


/***************************************************************
  Определения для Минимальной двоичной Экспоненты чисел
  типа real.
 ***************************************************************/

/* REAL_32_MIN_BIN_EXP      = -126; */
static EMUSHORT _min_bin_exp_32_[NPIE_32+1] =
{
  0xffffffffffffff82,
  0xffffffffffffffff
};
/* REAL_64_MIN_BIN_EXP      = -1022; */
static EMUSHORT _min_bin_exp_64_[NPIE_64+1] =
{
  0xfffffffffffffc02,
  0xffffffffffffffff
};
/* REAL_128_MIN_BIN_EXP     = -1073741822; */
static EMUSHORT _min_bin_exp_128_[NPIE_128+1] =
{
  0xffffffffc0000002,
  0xffffffffffffffff
};
/* REAL_256_MIN_BIN_EXP     = -1073741822; */
static EMUSHORT _min_bin_exp_256_[NPIE_256+1] =
{
  0xffffffffc0000002,
  0xffffffffffffffff
};

/* REAL_512_MIN_BIN_EXP     = -4611686018427387902; */
static EMUSHORT _min_bin_exp_512_[NPIE_512+1] =
{
  0xc000000000000002,
  0xffffffffffffffff
};
/* REAL_1024_MIN_BIN_EXP    = -4611686018427387902; */
static EMUSHORT _min_bin_exp_1024_[NPIE_1024+1] =
{
  0xc000000000000002,
  0xffffffffffffffff
};

/* REAL_2048_MIN_BIN_EXP    = -85070591730234615865843651857942052862; */
static EMUSHORT _min_bin_exp_2048_[NPIE_2048+1] =
{
  2, 0xc000000000000000,
  0xffffffffffffffff
};
/* REAL_4096_MIN_BIN_EXP    = -85070591730234615865843651857942052862; */
static EMUSHORT _min_bin_exp_4096_[NPIE_4096+1] =
{
  2, 0xc000000000000000,
  0xffffffffffffffff
};

/* REAL_8192_MIN_BIN_EXP    = -28948022309329048855892746252171976963\
                              317496166410141009864396001978282409982; */
static EMUSHORT _min_bin_exp_8192_[NPIE_8192+1] =
{
  2, 0,
  0, 0xc000000000000000,
  0xffffffffffffffff
};
/* REAL_16384_MIN_BIN_EXP   = -28948022309329048855892746252171976963\
                              317496166410141009864396001978282409982; */
static EMUSHORT _min_bin_exp_16384_[NPIE_16384+1] =
{
  2, 0,
  0, 0xc000000000000000,
  0xffffffffffffffff
};

/* REAL_32768_MIN_BIN_EXP   = -33519519824856492748935062495514615318\
                              698414551480983444308903609304410075183\
                              867442004685745417258569225079645466215\
                              12713438470702986642486608412251521022; */
static EMUSHORT _min_bin_exp_32768_[NPIE_32768+1] =
{
  2, 0,
  0, 0,
  0, 0,
  0, 0xc000000000000000,
  0xffffffffffffffff
};
/* REAL_65536_MIN_BIN_EXP   = -33519519824856492748935062495514615318\
                              698414551480983444308903609304410075183\
                              867442004685745417258569225079645466215\
                              12713438470702986642486608412251521022; */
static EMUSHORT _min_bin_exp_65536_[NPIE_65536+1] =
{
  2, 0,
  0, 0,
  0, 0,
  0, 0xc000000000000000,
  0xffffffffffffffff
};

/* REAL_131072_MIN_BIN_EXP  = -449423283715578976932326297697256183404\
                               494244735576643183575202894331689513752\
                               407831771193306018840052800284699678483\
                               394146974422036041556232118576598685310\
                               944419733562163713190755549003115235298\
                               632707380212514422095376705856157203684\
                               782776352068092908376276711465745599868\
                               11484619929076208839082406056034302; */
static EMUSHORT _min_bin_exp_131072_[NPIE_131072+1] =
{
  2, 0,
  0, 0,
  0, 0,
  0, 0,
  0, 0,
  0, 0,
  0, 0,
  0, 0xc000000000000000,
  0xffffffffffffffff
};

#else  /* BITS_PER_EMUSHORT != 64 */
#error lbin_exp_emu64lsb.dfn: ERROR: Failed size of EMUSHORT data type.
#endif /* BITS_PER_EMUSHORT == 64 */

#endif /* __REAL_INTERNAL_BIN_EXP_EMU64LSB */