Correct unity math for ARMC6

The assumed that isnan and isinf would be macros, but they are functions
in ARMC6.
pull/4949/head
Jimmy Brisson 2017-09-11 10:14:58 -05:00
parent 8a9d79bcbd
commit 33113ae207
1 changed files with 5 additions and 0 deletions

View File

@ -227,6 +227,9 @@ typedef _US64 _U_SINT;
#endif
typedef UNITY_FLOAT_TYPE _UF;
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
#else
#ifndef isinf
#define isinf(n) (((1.0f / f_zero) == n) ? 1 : 0) || (((-1.0f / f_zero) == n) ? 1 : 0)
#define UNITY_FLOAT_NEEDS_ZERO
@ -236,6 +239,8 @@ typedef UNITY_FLOAT_TYPE _UF;
#define isnan(n) ((n != n) ? 1 : 0)
#endif
#endif /* ARMC6 */
#ifndef isneg
#define isneg(n) ((n < 0.0f) ? 1 : 0)
#endif