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_DEC_EXP_EMU32LSB
#define   __REAL_INTERNAL_DEC_EXP_EMU32LSB

#if BITS_PER_EMUSHORT == 32

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

/* REAL_32_MAX_DEC_EXP      = 38; */
static EMUSHORT _max_dec_exp_32_[NPIE_32+1] =
{
  0x00000026,
  0x00000000
};
/* REAL_64_MAX_DEC_EXP      = 308; */
static EMUSHORT _max_dec_exp_64_[NPIE_64+1] =
{
  0x00000134,
  0x00000000
};
/* REAL_128_MAX_DEC_EXP     = 323228496; */
static EMUSHORT _max_dec_exp_128_[NPIE_128+1] =
{
  0x13441350,
  0x00000000
};
/* REAL_256_MAX_DEC_EXP     = 323228496; */
static EMUSHORT _max_dec_exp_256_[NPIE_256+1] =
{
  0x13441350,
  0x00000000
};

/* REAL_512_MAX_DEC_EXP     = 1388255822130839283; */
static EMUSHORT _max_dec_exp_512_[NPIE_512+1] =
{
  0x9f79fef3, 0x13441350,
  0x00000000
};
/* REAL_1024_MAX_DEC_EXP    = 1388255822130839283; */
static EMUSHORT _max_dec_exp_1024_[NPIE_1024+1] =
{
  0x9f79fef3, 0x13441350,
  0x00000000
};

/* REAL_2048_MAX_DEC_EXP    = 25608799859684840937503027312525808175; */
static EMUSHORT _max_dec_exp_2048_[NPIE_2048+1] =
{
  0x816f922f, 0x11f12b35, 0x9f79fef3, 0x13441350,
  0x00000000
};
/* REAL_4096_MAX_DEC_EXP    = 25608799859684840937503027312525808175; */
static EMUSHORT _max_dec_exp_4096_[NPIE_4096+1] =
{
  0x816f922f, 0x11f12b35, 0x9f79fef3, 0x13441350,
  0x00000000
};

/* REAL_8192_MAX_DEC_EXP    = 87142230302581544824664289252326044991\
                              25871092238398896386086649085145222265; */
static EMUSHORT _max_dec_exp_8192_[NPIE_8192+1] =
{
  0xd6f98c79, 0x314bcde4, 0xa87a3e69, 0x04d5a618,
  0x816f922f, 0x11f12b35, 0x9f79fef3, 0x13441350,
  0x00000000
};
/* REAL_16384_MAX_DEC_EXP   = 87142230302581544824664289252326044991\
                              25871092238398896386086649085145222265; */
static EMUSHORT _max_dec_exp_16384_[NPIE_16384+1] =
{
  0xd6f98c79, 0x314bcde4, 0xa87a3e69, 0x04d5a618,
  0x816f922f, 0x11f12b35, 0x9f79fef3, 0x13441350,
  0x00000000
};

/* REAL_32768_MAX_DEC_EXP   = 100903809075352817242282879963567487875\
                              892099021734287898338535355230181019603\
                              864364986397683765368543149769469684639\
                              4562057154816912385935155623782668889; */
static EMUSHORT _max_dec_exp_32768_[NPIE_32768+1] =
{
  0xa4aa5a59, 0xcb16a4fe, 0xb6317243, 0x5228e692,
  0x668e37a2, 0x13cb978e, 0x3233f57a, 0x650d45b0,
  0xd6f98c79, 0x314bcde4, 0xa87a3e69, 0x04d5a618,
  0x816f922f, 0x11f12b35, 0x9f79fef3, 0x13441350,
  0x00000000
};
/* REAL_65536_MAX_DEC_EXP   = 100903809075352817242282879963567487875\
                              892099021734287898338535355230181019603\
                              864364986397683765368543149769469684639\
                              4562057154816912385935155623782668889; */
static EMUSHORT _max_dec_exp_65536_[NPIE_65536+1] =
{
  0xa4aa5a59, 0xcb16a4fe, 0xb6317243, 0x5228e692,
  0x668e37a2, 0x13cb978e, 0x3233f57a, 0x650d45b0,
  0xd6f98c79, 0x314bcde4, 0xa87a3e69, 0x04d5a618,
  0x816f922f, 0x11f12b35, 0x9f79fef3, 0x13441350,
  0x00000000
};

/* REAL_131072_MAX_DEC_EXP  = 135289889148192929926396705879397085897\
                              289585448728420527912857292534983632920\
                              892390565864459960588805664323238032415\
                              039482253220245990514340092162621997241\
                              131037226858003884184847076362850336738\
                              763387861134927266253983334997968052515\
                              115732240463573024754589210939947951624\
                              90520947274478376589561024881824149; */
static EMUSHORT _max_dec_exp_131072_[NPIE_131072+1] =
{
  0xf91f1195, 0x7bdd462e, 0x279e991f, 0x2d46cf70,
  0xb2835704, 0x01610678, 0xb3d62a7b, 0x8091afd4,
  0x62b25b3b, 0x9d722253, 0xfbce205e, 0xba4d84e5,
  0x1880c05c, 0x939e3a32, 0xc04aab97, 0x8bf06fbd,
  0xa4aa5a59, 0xcb16a4fe, 0xb6317243, 0x5228e692,
  0x668e37a2, 0x13cb978e, 0x3233f57a, 0x650d45b0,
  0xd6f98c79, 0x314bcde4, 0xa87a3e69, 0x04d5a618,
  0x816f922f, 0x11f12b35, 0x9f79fef3, 0x13441350,
  0x00000000
};


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

/* REAL_32_MIN_DEC_EXP      = -37; */
static EMUSHORT _min_dec_exp_32_[NPIE_32+1] =
{
  0xffffffdb, /* -38 = 0xffda; */
  0xffffffff
};
/* REAL_64_MIN_DEC_EXP      = -307; */
static EMUSHORT _min_dec_exp_64_[NPIE_64+1] =
{
  0xfffffecd, /* -308 = 0xfecc; */
  0xffffffff
};
/* REAL_128_MIN_DEC_EXP     = -323228524; */
static EMUSHORT _min_dec_exp_128_[NPIE_128+1] =
{
  0xecbbec94,
  0xffffffff
};
/* REAL_256_MIN_DEC_EXP     = -323228563; */
static EMUSHORT _min_dec_exp_256_[NPIE_256+1] =
{
  0xecbbec6d,
  0xffffffff
};

/* REAL_512_MIN_DEC_EXP     = -1388255822130839417; */
static EMUSHORT _min_dec_exp_512_[NPIE_512+1] =
{
  0x60860087, 0xecbbecaf,
  0xffffffff
};
/* REAL_1024_MIN_DEC_EXP    = -1388255822130839571; */
static EMUSHORT _min_dec_exp_1024_[NPIE_1024+1] =
{
  0x6085ffed, 0xecbbecaf,
  0xffffffff
};

/* REAL_2048_MIN_DEC_EXP    = -25608799859684840937503027312525808752; */
static EMUSHORT _min_dec_exp_2048_[NPIE_2048+1] =
{
  0x7e906b90, 0xee0ed4ca, 0x6086010c, 0xecbbecaf,
  0xffffffff
};
/* REAL_4096_MIN_DEC_EXP    = -25608799859684840937503027312525809368; */
static EMUSHORT _min_dec_exp_4096_[NPIE_4096+1] =
{
  0x7e906928, 0xee0ed4ca, 0x6086010c, 0xecbbecaf,
  0xffffffff
};

/* REAL_8192_MIN_DEC_EXP    = -87142230302581544824664289252326044991\
                               25871092238398896386086649085145224653; */
static EMUSHORT _min_dec_exp_8192_[NPIE_8192+1] =
{
  0x29066a33, 0xceb4321b, 0x5785c196, 0xfb2a59e7,
  0x7e906dd0, 0xee0ed4ca, 0x6086010c, 0xecbbecaf,
  0xffffffff
};
/* REAL_16384_MIN_DEC_EXP   = -87142230302581544824664289252326044991\
                               25871092238398896386086649085145227119; */
static EMUSHORT _min_dec_exp_16384_[NPIE_16384+1] =
{
  0x29066091, 0xceb4321b, 0x5785c196, 0xfb2a59e7,
  0x7e906dd0, 0xee0ed4ca, 0x6086010c, 0xecbbecaf,
  0xffffffff
};

/* REAL_32768_MIN_DEC_EXP   = -100903809075352817242282879963567487875\
                               892099021734287898338535355230181019603\
                               864364986397683765368543149769469684639\
                               4562057154816912385935155623782678598; */
static EMUSHORT _min_dec_exp_32768_[NPIE_32768+1] =
{
  0x5b557fba, 0x34e95b01, 0x49ce8dbc, 0xadd7196d,
  0x9971c85d, 0xec346871, 0xcdcc0a85, 0x9af2ba4f,
  0x29067386, 0xceb4321b, 0x5785c196, 0xfb2a59e7,
  0x7e906dd0, 0xee0ed4ca, 0x6086010c, 0xecbbecaf,
  0xffffffff
};
/* REAL_65536_MIN_DEC_EXP   = -100903809075352817242282879963567487875\
                               892099021734287898338535355230181019603\
                               864364986397683765368543149769469684639\
                               4562057154816912385935155623782688463; */
static EMUSHORT _min_dec_exp_65536_[NPIE_65536+1] =
{
  0x5b555931, 0x34e95b01, 0x49ce8dbc, 0xadd7196d,
  0x9971c85d, 0xec346871, 0xcdcc0a85, 0x9af2ba4f,
  0x29067386, 0xceb4321b, 0x5785c196, 0xfb2a59e7,
  0x7e906dd0, 0xee0ed4ca, 0x6086010c, 0xecbbecaf,
  0xffffffff
};

/* REAL_131072_MIN_DEC_EXP  = -135289889148192929926396705879397085897\
                               289585448728420527912857292534983632920\
                               892390565864459960588805664323238032415\
                               039482253220245990514340092162621997241\
                               131037226858003884184847076362850336738\
                               763387861134927266253983334997968052515\
                               115732240463573024754589210939947951624\
                               90520947274478376589561024881863297; */
static EMUSHORT _min_dec_exp_131072_[NPIE_131072+1] =
{
  0x06e0557f, 0x8422b9d1, 0xd86166e0, 0xd2b9308f,
  0x4d7ca8fb, 0xfe9ef987, 0x4c29d584, 0x7f6e502b,
  0x9d4da4c4, 0x628dddac, 0x0431dfa1, 0x45b27b1a,
  0xe77f3fa3, 0x6c61c5cd, 0x3fb55468, 0x740f9042,
  0x5b55a5a6, 0x34e95b01, 0x49ce8dbc, 0xadd7196d,
  0x9971c85d, 0xec346871, 0xcdcc0a85, 0x9af2ba4f,
  0x29067386, 0xceb4321b, 0x5785c196, 0xfb2a59e7,
  0x7e906dd0, 0xee0ed4ca, 0x6086010c, 0xecbbecaf,
  0xffffffff
};

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

#endif /* __REAL_INTERNAL_DEC_EXP_EMU32LSB */