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:
1 file changed, 45 insertions, 0 deletions
diff --git a/mpu/mpu-math-errno.h b/mpu/mpu-math-errno.h
new file mode 100644
index 0000000..9646733
--- /dev/null
+++ b/mpu/mpu-math-errno.h
@@ -0,0 +1,68 @@
+
+/***************************************************************
+  __MPU_MATH_ERRNO.H
+
+       This file contains MATH ERRNO SUPPRESS operation
+       functions & data declarations.
+
+       PART OF : MPU - library .
+
+       USAGE   : Internal only .
+
+       NOTE    : Include "libmpu.h" before this FILE .
+
+       Copyright (C) 2000 - 2024  by Andrew V.Kosteltsev.
+       All Rights Reserved.
+ ***************************************************************/
+
+#ifndef   __MPU_MATH_ERRNO_H
+#define   __MPU_MATH_ERRNO_H
+
+/***************************************************************
+  Macro for perror, strerror, and _strerror
+  NOTE:
+     Unknown error is == (__mpu_char8_t *)0;
+ ***************************************************************/
+#define   __MPU_INTEGER_ERR_MSG(m) \
+          __mpu_integer_errlist[(((m)<0)||((m)>=__mpu_integer_nerr)? \
+          __mpu_integer_nerr:(m))]
+
+#define   __MPU_REAL_ERR_MSG(m) \
+          __mpu_real_errlist[(((m)<0)||((m)>=__mpu_real_nerr)? \
+          __mpu_real_nerr:(m))]
+
+#define   __MPU_COMPLEX_ERR_MSG(m) \
+          __mpu_complex_errlist[(((m)<0)||((m)>=__mpu_complex_nerr)? \
+          __mpu_complex_nerr:(m))]
+
+#define   __MPU_MATH_ERR_MSG(m) \
+          __mpu_math_errlist[(((m)<0)||((m)>=__mpu_math_nerr)? \
+          __mpu_math_nerr:(m))]
+
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+
+extern const __mpu_char8_t *const   __mpu_integer_errlist[];
+extern const __mpu_error_t          __mpu_integer_nerr;
+
+extern const __mpu_char8_t *const   __mpu_real_errlist[];
+extern const __mpu_error_t          __mpu_real_nerr;
+
+extern const __mpu_char8_t *const   __mpu_complex_errlist[];
+extern const __mpu_error_t          __mpu_complex_nerr;
+
+extern const __mpu_char8_t *const   __mpu_math_errlist[];
+extern const __mpu_error_t          __mpu_math_nerr;
+
+
+extern int __mpu_math_errnotab[];
+
+
+#ifdef  __cplusplus
+}   /* ... extern "C" */
+#endif
+
+#endif /* __MPU_MATH_ERRNO_H */