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
author: kx <kx@radix-linux.su> 2024-12-20 16:11:07 +0300 committer: kx <kx@radix-linux.su> 2024-12-20 16:11:07 +0300 commit: 868b2b66b564b5c00e3a74d10be45db7151627ac parent: cce2ae8d3312493b7653358bb4af201d3271377b
Commit Summary:
Version 1.0.14
Diffstat:
2 files changed, 52 insertions, 0 deletions
diff --git a/mpu/math/exp/emu00128/ei_exp_001_emu32lsb.dfn b/mpu/math/exp/emu00128/ei_exp_001_emu32lsb.dfn
new file mode 100644
index 0000000..023df09
--- /dev/null
+++ b/mpu/math/exp/emu00128/ei_exp_001_emu32lsb.dfn
@@ -0,0 +1,32 @@
+
+#ifndef   __REAL_EINTERNAL_EXP_001_32LSB
+#define   __REAL_EINTERNAL_EXP_001_32LSB
+
+#if BITS_PER_EMUSHORT == 32
+
+#define N_EXP_E128  13
+
+static EMUSHORT _ei_exp__E_128_[N_EXP_E128][NPIR_128] =
+{
+/*   lgw         S i g n i f i c a n d               hgw         Exp         Sign     */
+/*  ==========  ==================================  ==========  ==========  ==========*/
+  { 0x00000000, 0xdca88512, 0x4bd512cd, 0xfb1def6a, 0x00000000, 0x3fffffbb, 0x00000000 }, /*  6.647009908783537744979139599E-21 */
+  { 0x00000000, 0x0a4d7b05, 0xcd3c1c50, 0xa48231c6, 0x00000000, 0x3fffffc1, 0xffffffff }, /* -2.786883612306202715643179308E-19 */
+  { 0x00000000, 0xf551e05f, 0x0514948c, 0xcb3e3998, 0x00000000, 0x3fffffc6, 0x00000000 }, /*  1.101782870190783944472646271E-17 */
+  { 0x00000000, 0x62a8048a, 0x1e37f018, 0xfabeca5f, 0x00000000, 0x3fffffcb, 0xffffffff }, /* -4.349737158044827848614818995E-16 */
+  { 0x00000000, 0x623d40f4, 0x7643e027, 0x9aac38ec, 0x00000000, 0x3fffffd1, 0x00000000 }, /*  1.717212412115858460235198633E-14 */
+  { 0x00000000, 0xb86030ad, 0xd09481d1, 0xbed270fb, 0x00000000, 0x3fffffd6, 0xffffffff }, /* -6.779360592677529912799322081E-13 */
+  { 0x00000000, 0x8555776a, 0x048bc9e7, 0xeb6d9627, 0x00000000, 0x3fffffdb, 0x00000000 }, /*  2.676507306136943280840145641E-11 */
+  { 0x00000000, 0x7f105ecb, 0x2133f3ff, 0x91402eb2, 0x00000000, 0x3fffffe1, 0xffffffff }, /* -1.056838027737498540555296909E-9  */
+  { 0x00000000, 0x28d3768c, 0xb875ed12, 0xb354795f, 0x00000000, 0x3fffffe6, 0x00000000 }, /*  4.175351397573619795024489494E-8  */
+  { 0x00000000, 0x36d5ebc7, 0xa7785563, 0xddebbc99, 0x00000000, 0x3fffffeb, 0xffffffff }, /* -1.653439153439153439154557443E-6  */
+  { 0x00000000, 0x008bc7cc, 0x08ab355e, 0x8ab355e0, 0x00000000, 0x3ffffff1, 0x00000000 }, /*  6.613756613756613756613767518E-5  */
+  { 0x00000000, 0x60b60afc, 0x0b60b60b, 0xb60b60b6, 0x00000000, 0x3ffffff6, 0xffffffff }, /* -2.777777777777777777777777773E-3  */
+  { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000, 0x3ffffffc, 0x00000000 }  /*  1.666666666666666666666666667E-1  */
+};
+
+#else  /* BITS_PER_EMUSHORT != 32 */
+#error ei_exp_001_emu32lsb.dfn: ERROR: Failed size of EMUSHORT data type.
+#endif /* BITS_PER_EMUSHORT == 32 */
+
+#endif /* __REAL_EINTERNAL_EXP_001_32LSB */
diff --git a/mpu/math/exp/emu00128/ei_exp_001_emu32msb.dfn b/mpu/math/exp/emu00128/ei_exp_001_emu32msb.dfn
new file mode 100644
index 0000000..2698a9f
--- /dev/null
+++ b/mpu/math/exp/emu00128/ei_exp_001_emu32msb.dfn
@@ -0,0 +1,32 @@
+
+#ifndef   __REAL_EINTERNAL_EXP_001_32MSB
+#define   __REAL_EINTERNAL_EXP_001_32MSB
+
+#if BITS_PER_EMUSHORT == 32
+
+#define N_EXP_E128  13
+
+static EMUSHORT _ei_exp__E_128_[N_EXP_E128][NPIR_128] =
+{
+/*   Sign        Exp         hgw         S i g n i f i c a n d               lgw      */
+/*  ==========  ==========  ==========  ==================================  ==========*/
+  { 0x00000000, 0x3fffffbb, 0x00000000, 0xfb1def6a, 0x4bd512cd, 0xdca88512, 0x00000000 }, /*  6.647009908783537744979139599E-21 */
+  { 0xffffffff, 0x3fffffc1, 0x00000000, 0xa48231c6, 0xcd3c1c50, 0x0a4d7b05, 0x00000000 }, /* -2.786883612306202715643179308E-19 */
+  { 0x00000000, 0x3fffffc6, 0x00000000, 0xcb3e3998, 0x0514948c, 0xf551e05f, 0x00000000 }, /*  1.101782870190783944472646271E-17 */
+  { 0xffffffff, 0x3fffffcb, 0x00000000, 0xfabeca5f, 0x1e37f018, 0x62a8048a, 0x00000000 }, /* -4.349737158044827848614818995E-16 */
+  { 0x00000000, 0x3fffffd1, 0x00000000, 0x9aac38ec, 0x7643e027, 0x623d40f4, 0x00000000 }, /*  1.717212412115858460235198633E-14 */
+  { 0xffffffff, 0x3fffffd6, 0x00000000, 0xbed270fb, 0xd09481d1, 0xb86030ad, 0x00000000 }, /* -6.779360592677529912799322081E-13 */
+  { 0x00000000, 0x3fffffdb, 0x00000000, 0xeb6d9627, 0x048bc9e7, 0x8555776a, 0x00000000 }, /*  2.676507306136943280840145641E-11 */
+  { 0xffffffff, 0x3fffffe1, 0x00000000, 0x91402eb2, 0x2133f3ff, 0x7f105ecb, 0x00000000 }, /* -1.056838027737498540555296909E-9  */
+  { 0x00000000, 0x3fffffe6, 0x00000000, 0xb354795f, 0xb875ed12, 0x28d3768c, 0x00000000 }, /*  4.175351397573619795024489494E-8  */
+  { 0xffffffff, 0x3fffffeb, 0x00000000, 0xddebbc99, 0xa7785563, 0x36d5ebc7, 0x00000000 }, /* -1.653439153439153439154557443E-6  */
+  { 0x00000000, 0x3ffffff1, 0x00000000, 0x8ab355e0, 0x08ab355e, 0x008bc7cc, 0x00000000 }, /*  6.613756613756613756613767518E-5  */
+  { 0xffffffff, 0x3ffffff6, 0x00000000, 0xb60b60b6, 0x0b60b60b, 0x60b60afc, 0x00000000 }, /* -2.777777777777777777777777773E-3  */
+  { 0x00000000, 0x3ffffffc, 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }  /*  1.666666666666666666666666667E-1  */
+};
+
+#else  /* BITS_PER_EMUSHORT != 32 */
+#error ei_exp_001_emu32msb.dfn: ERROR: Failed size of EMUSHORT data type.
+#endif /* BITS_PER_EMUSHORT == 32 */
+
+#endif /* __REAL_EINTERNAL_EXP_001_32MSB */