mirror of https://github.com/ARMmbed/mbed-os.git
Correct unity math for ARMC6
The assumed that isnan and isinf would be macros, but they are functions in ARMC6.pull/4949/head
parent
8a9d79bcbd
commit
33113ae207
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue