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

/***************************************************************
  __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 */