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, 72 insertions, 0 deletions
diff --git a/mpu/math/cos/emu00256/ei_cos_002_emu32lsb.dfn b/mpu/math/cos/emu00256/ei_cos_002_emu32lsb.dfn
new file mode 100644
index 0000000..ffb750a
--- /dev/null
+++ b/mpu/math/cos/emu00256/ei_cos_002_emu32lsb.dfn
@@ -0,0 +1,42 @@
+
+#ifndef   __REAL_EINTERNAL_COS_002_32LSB
+#define   __REAL_EINTERNAL_COS_002_32LSB
+
+#if BITS_PER_EMUSHORT == 32
+
+#define N_COS_C256  23
+
+static EMUSHORT _ei_cos__C_256_[N_COS_C256][NPIR_256] =
+{
+/*   lgw         S i g n i f i c a n d                                                               hgw         Exp         Sign     */
+/*  ==========  ==================================================================================  ==========  ==========  ==========*/
+  { 0x00000000, 0x2bdee2af, 0xf65be4c3, 0x8881fe5b, 0x69df11c6, 0xa9621ab3, 0xfd61dc2f, 0x848da605, 0x00000000, 0x3fffff34, 0x00000000 }, /*  8.055481461673524966502597823067978905903039273098736005729833625726E-62 */
+  { 0x00000000, 0x03a8cfa1, 0xa3599030, 0x296b7ebe, 0x5e3bdedc, 0x21660e18, 0x6b7a0355, 0x92040974, 0x00000000, 0x3fffff3f, 0xffffffff }, /* -1.817316725930111061950482998091364278924963779469929519632558141797E-58 */
+  { 0x00000000, 0x4703143d, 0xaa4a4a34, 0x91c93eb6, 0xede7c2ea, 0x43519669, 0xff36859e, 0x93958d81, 0x00000000, 0x3fffff4a, 0x00000000 }, /*  3.761842881231223207788337687750894271668710369252962202851082755231E-55 */
+  { 0x00000000, 0x7d412119, 0x5bed2592, 0xcb448b22, 0xa130c018, 0xc226197f, 0x983dd1c6, 0x8857a93a, 0x00000000, 0x3fffff55, 0xffffffff }, /* -7.117406731289092137781448234088523241387778219404863625617909594258E-52 */
+  { 0x00000000, 0x3ed71f81, 0x7df79c2b, 0xe16e2460, 0x7c4ec054, 0x62fda4f1, 0x09571802, 0xe5476a15, 0x00000000, 0x3fffff5f, 0x00000000 }, /*  1.225617439128385849540254682258987707267552243042853242227744862081E-48 */
+  { 0x00000000, 0xb516690d, 0xcb49ba2e, 0xf6223f76, 0x74e6043e, 0x341c1590, 0x061d574a, 0xaea565ce, 0x00000000, 0x3fffff6a, 0xffffffff }, /* -1.911963205040281925341376979297200306235304666886748032017395045680E-45 */
+  { 0x00000000, 0xeadb9143, 0xdfba0142, 0x96b4e227, 0x8b3dbbb6, 0x35c6802f, 0x61654958, 0xefcc1948, 0x00000000, 0x3fffff74, 0x00000000 }, /*  2.688220266286636386691615576605115080660239645532462611133431480366E-42 */
+  { 0x00000000, 0xf42973da, 0xa2d5415d, 0xd95d65c8, 0xe8e27138, 0xc5159d2c, 0x07ebd09f, 0x9388118e, 0x00000000, 0x3fffff7f, 0xffffffff }, /* -3.387157535521161847231435575458475813325223828844869548653365042289E-39 */
+  { 0x00000000, 0x6220c0aa, 0xd85e26ce, 0xfef39115, 0x6005b479, 0x0f7237d3, 0x1fade217, 0xa1a6973c, 0x00000000, 0x3fffff89, 0x00000000 }, /*  3.800390754854743592593670892788454605270983303734948241331244251066E-36 */
+  { 0x00000000, 0xbfd40a6a, 0xade66e5d, 0xae2e0879, 0xc51d0399, 0x56f6a614, 0x3eb07306, 0x9c996282, 0x00000000, 0x3fffff93, 0xffffffff }, /* -3.769987628815905643852921525646174846653751464983174755129050457776E-33 */
+  { 0x00000000, 0x2b398087, 0x0417b92c, 0xa83b632e, 0xa546a151, 0xe2e28e1a, 0xa842e9b9, 0x850c5131, 0x00000000, 0x3fffff9d, 0x00000000 }, /*  3.279889237069837910152041727312111927793674313779332472172056965636E-30 */
+  { 0x00000000, 0x3a21021f, 0x0ae54df8, 0x87a250fb, 0x580a4a31, 0x790285d3, 0x5272cd1c, 0xc4742fe3, 0x00000000, 0x3fffffa6, 0xffffffff }, /* -2.479596263224797460074943545847956617402122695324918208462260279943E-27 */
+  { 0x00000000, 0xe33897ea, 0xf361386f, 0x9ff58f78, 0x4ec51033, 0x25a033e5, 0x97abbe65, 0xf96780cb, 0x00000000, 0x3fffffaf, 0x00000000 }, /*  1.611737571096118349048713304801171801324726105869562080469603753943E-24 */
+  { 0x00000000, 0x6028ac9b, 0x03d627d3, 0xd43a6713, 0x9c763abb, 0x86485bf9, 0xbfc294a2, 0x8671cb6d, 0x00000000, 0x3fffffb9, 0xffffffff }, /* -8.896791392450573286748897442502468343312488127348551340433828913579E-22 */
+  { 0x00000000, 0x9ea29d36, 0x9f342cb0, 0xf9014d1b, 0x785d5dfe, 0x4e5695fc, 0x1011283d, 0xf2a15d20, 0x00000000, 0x3fffffc1, 0x00000000 }, /*  4.110317623312164858477990618436140374610369495913051985972182149849E-19 */
+  { 0x00000000, 0x89cfa018, 0x7f95d33d, 0x3ccef73a, 0x61554bc3, 0x80244351, 0xcbecbbdd, 0xb413c31d, 0x00000000, 0x3fffffca, 0xffffffff }, /* -1.561920696858622646221636435005733342351940408446956349197282497215E-16 */
+  { 0x00000000, 0xd8bb88cb, 0xed943c11, 0x5eaf6383, 0x4657f48f, 0xc32b5877, 0x9dc0f88e, 0xd73f9f39, 0x00000000, 0x3fffffd2, 0x00000000 }, /*  4.779477332387385297438207491117544027596937649847702757760761388623E-14 */
+  { 0x00000000, 0xfdcdd414, 0xaebaf85d, 0x68c46d4b, 0xd1f27546, 0xd6f8a2ef, 0x03e4e905, 0xc9cba546, 0x00000000, 0x3fffffda, 0xffffffff }, /* -1.147074559772972471385169797868210566623265035963448661865656789707E-11 */
+  { 0x00000000, 0xa55b348b, 0xce38ec85, 0x0e7ba5b3, 0x7f425f60, 0x26d4c3d6, 0xc6c4bdaa, 0x8f76c77f, 0x00000000, 0x3fffffe2, 0x00000000 }, /*  2.087675698786809897921009032120143231254342365453476564587675695741E-9  */
+  { 0x00000000, 0xd284bb92, 0x6caab3e9, 0x0eef82e1, 0x333c725b, 0x780b69f5, 0xc4fae397, 0x93f27dbb, 0x00000000, 0x3fffffe9, 0xffffffff }, /* -2.755731922398589065255731922398589065255731922398589065255731903046E-7  */
+  { 0x00000000, 0xd00d00d0, 0x00d00d00, 0x0d00d00d, 0xd00d00d0, 0x00d00d00, 0x0d00d00d, 0xd00d00d0, 0x00000000, 0x3fffffef, 0x00000000 }, /*  2.480158730158730158730158730158730158730158730158730158730158730159E-5  */
+  { 0x00000000, 0xb60b60b6, 0x60b60b60, 0x0b60b60b, 0xb60b60b6, 0x60b60b60, 0x0b60b60b, 0xb60b60b6, 0x00000000, 0x3ffffff5, 0xffffffff }, /* -1.388888888888888888888888888888888888888888888888888888888888888889E-3  */
+  { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000, 0x3ffffffa, 0x00000000 }  /*  4.166666666666666666666666666666666666666666666666666666666666666666E-2  */
+};
+
+#else  /* BITS_PER_EMUSHORT != 32 */
+#error ei_cos_002_emu32lsb.dfn: ERROR: Failed size of EMUSHORT data type.
+#endif /* BITS_PER_EMUSHORT == 32 */
+
+#endif /* __REAL_EINTERNAL_COS_002_32LSB */
diff --git a/mpu/math/cos/emu00256/ei_cos_002_emu32msb.dfn b/mpu/math/cos/emu00256/ei_cos_002_emu32msb.dfn
new file mode 100644
index 0000000..cbd33b7
--- /dev/null
+++ b/mpu/math/cos/emu00256/ei_cos_002_emu32msb.dfn
@@ -0,0 +1,42 @@
+
+#ifndef   __REAL_EINTERNAL_COS_002_32MSB
+#define   __REAL_EINTERNAL_COS_002_32MSB
+
+#if BITS_PER_EMUSHORT == 32
+
+#define N_COS_C256  23
+
+static EMUSHORT _ei_cos__C_256_[N_COS_C256][NPIR_256] =
+{
+/*   Sign        Exp         hgw         S i g n i f i c a n d                                                               lgw      */
+/*  ==========  ==========  ==========  ==================================================================================  ==========*/
+  { 0x00000000, 0x3fffff34, 0x00000000, 0x848da605, 0xfd61dc2f, 0xa9621ab3, 0x69df11c6, 0x8881fe5b, 0xf65be4c3, 0x2bdee2af, 0x00000000 }, /*  8.055481461673524966502597823067978905903039273098736005729833625726E-62 */
+  { 0xffffffff, 0x3fffff3f, 0x00000000, 0x92040974, 0x6b7a0355, 0x21660e18, 0x5e3bdedc, 0x296b7ebe, 0xa3599030, 0x03a8cfa1, 0x00000000 }, /* -1.817316725930111061950482998091364278924963779469929519632558141797E-58 */
+  { 0x00000000, 0x3fffff4a, 0x00000000, 0x93958d81, 0xff36859e, 0x43519669, 0xede7c2ea, 0x91c93eb6, 0xaa4a4a34, 0x4703143d, 0x00000000 }, /*  3.761842881231223207788337687750894271668710369252962202851082755231E-55 */
+  { 0xffffffff, 0x3fffff55, 0x00000000, 0x8857a93a, 0x983dd1c6, 0xc226197f, 0xa130c018, 0xcb448b22, 0x5bed2592, 0x7d412119, 0x00000000 }, /* -7.117406731289092137781448234088523241387778219404863625617909594258E-52 */
+  { 0x00000000, 0x3fffff5f, 0x00000000, 0xe5476a15, 0x09571802, 0x62fda4f1, 0x7c4ec054, 0xe16e2460, 0x7df79c2b, 0x3ed71f81, 0x00000000 }, /*  1.225617439128385849540254682258987707267552243042853242227744862081E-48 */
+  { 0xffffffff, 0x3fffff6a, 0x00000000, 0xaea565ce, 0x061d574a, 0x341c1590, 0x74e6043e, 0xf6223f76, 0xcb49ba2e, 0xb516690d, 0x00000000 }, /* -1.911963205040281925341376979297200306235304666886748032017395045680E-45 */
+  { 0x00000000, 0x3fffff74, 0x00000000, 0xefcc1948, 0x61654958, 0x35c6802f, 0x8b3dbbb6, 0x96b4e227, 0xdfba0142, 0xeadb9143, 0x00000000 }, /*  2.688220266286636386691615576605115080660239645532462611133431480366E-42 */
+  { 0xffffffff, 0x3fffff7f, 0x00000000, 0x9388118e, 0x07ebd09f, 0xc5159d2c, 0xe8e27138, 0xd95d65c8, 0xa2d5415d, 0xf42973da, 0x00000000 }, /* -3.387157535521161847231435575458475813325223828844869548653365042289E-39 */
+  { 0x00000000, 0x3fffff89, 0x00000000, 0xa1a6973c, 0x1fade217, 0x0f7237d3, 0x6005b479, 0xfef39115, 0xd85e26ce, 0x6220c0aa, 0x00000000 }, /*  3.800390754854743592593670892788454605270983303734948241331244251066E-36 */
+  { 0xffffffff, 0x3fffff93, 0x00000000, 0x9c996282, 0x3eb07306, 0x56f6a614, 0xc51d0399, 0xae2e0879, 0xade66e5d, 0xbfd40a6a, 0x00000000 }, /* -3.769987628815905643852921525646174846653751464983174755129050457776E-33 */
+  { 0x00000000, 0x3fffff9d, 0x00000000, 0x850c5131, 0xa842e9b9, 0xe2e28e1a, 0xa546a151, 0xa83b632e, 0x0417b92c, 0x2b398087, 0x00000000 }, /*  3.279889237069837910152041727312111927793674313779332472172056965636E-30 */
+  { 0xffffffff, 0x3fffffa6, 0x00000000, 0xc4742fe3, 0x5272cd1c, 0x790285d3, 0x580a4a31, 0x87a250fb, 0x0ae54df8, 0x3a21021f, 0x00000000 }, /* -2.479596263224797460074943545847956617402122695324918208462260279943E-27 */
+  { 0x00000000, 0x3fffffaf, 0x00000000, 0xf96780cb, 0x97abbe65, 0x25a033e5, 0x4ec51033, 0x9ff58f78, 0xf361386f, 0xe33897ea, 0x00000000 }, /*  1.611737571096118349048713304801171801324726105869562080469603753943E-24 */
+  { 0xffffffff, 0x3fffffb9, 0x00000000, 0x8671cb6d, 0xbfc294a2, 0x86485bf9, 0x9c763abb, 0xd43a6713, 0x03d627d3, 0x6028ac9b, 0x00000000 }, /* -8.896791392450573286748897442502468343312488127348551340433828913579E-22 */
+  { 0x00000000, 0x3fffffc1, 0x00000000, 0xf2a15d20, 0x1011283d, 0x4e5695fc, 0x785d5dfe, 0xf9014d1b, 0x9f342cb0, 0x9ea29d36, 0x00000000 }, /*  4.110317623312164858477990618436140374610369495913051985972182149849E-19 */
+  { 0xffffffff, 0x3fffffca, 0x00000000, 0xb413c31d, 0xcbecbbdd, 0x80244351, 0x61554bc3, 0x3ccef73a, 0x7f95d33d, 0x89cfa018, 0x00000000 }, /* -1.561920696858622646221636435005733342351940408446956349197282497215E-16 */
+  { 0x00000000, 0x3fffffd2, 0x00000000, 0xd73f9f39, 0x9dc0f88e, 0xc32b5877, 0x4657f48f, 0x5eaf6383, 0xed943c11, 0xd8bb88cb, 0x00000000 }, /*  4.779477332387385297438207491117544027596937649847702757760761388623E-14 */
+  { 0xffffffff, 0x3fffffda, 0x00000000, 0xc9cba546, 0x03e4e905, 0xd6f8a2ef, 0xd1f27546, 0x68c46d4b, 0xaebaf85d, 0xfdcdd414, 0x00000000 }, /* -1.147074559772972471385169797868210566623265035963448661865656789707E-11 */
+  { 0x00000000, 0x3fffffe2, 0x00000000, 0x8f76c77f, 0xc6c4bdaa, 0x26d4c3d6, 0x7f425f60, 0x0e7ba5b3, 0xce38ec85, 0xa55b348b, 0x00000000 }, /*  2.087675698786809897921009032120143231254342365453476564587675695741E-9  */
+  { 0xffffffff, 0x3fffffe9, 0x00000000, 0x93f27dbb, 0xc4fae397, 0x780b69f5, 0x333c725b, 0x0eef82e1, 0x6caab3e9, 0xd284bb92, 0x00000000 }, /* -2.755731922398589065255731922398589065255731922398589065255731903046E-7  */
+  { 0x00000000, 0x3fffffef, 0x00000000, 0xd00d00d0, 0x0d00d00d, 0x00d00d00, 0xd00d00d0, 0x0d00d00d, 0x00d00d00, 0xd00d00d0, 0x00000000 }, /*  2.480158730158730158730158730158730158730158730158730158730158730159E-5  */
+  { 0xffffffff, 0x3ffffff5, 0x00000000, 0xb60b60b6, 0x0b60b60b, 0x60b60b60, 0xb60b60b6, 0x0b60b60b, 0x60b60b60, 0xb60b60b6, 0x00000000 }, /* -1.388888888888888888888888888888888888888888888888888888888888888889E-3  */
+  { 0x00000000, 0x3ffffffa, 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }  /*  4.166666666666666666666666666666666666666666666666666666666666666666E-2  */
+};
+
+#else  /* BITS_PER_EMUSHORT != 32 */
+#error ei_cos_002_emu32msb.dfn: ERROR: Failed size of EMUSHORT data type.
+#endif /* BITS_PER_EMUSHORT == 32 */
+
+#endif /* __REAL_EINTERNAL_COS_002_32MSB */