mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
Add math library definition for isfinite. From Brennan Ashton.
This commit is contained in:
@@ -89,12 +89,13 @@
|
|||||||
|
|
||||||
/* General Constants ********************************************************/
|
/* General Constants ********************************************************/
|
||||||
|
|
||||||
#define INFINITY (1.0/0.0)
|
#define INFINITY (1.0/0.0)
|
||||||
#define NAN (0.0/0.0)
|
#define NAN (0.0/0.0)
|
||||||
#define HUGE_VAL INFINITY
|
#define HUGE_VAL INFINITY
|
||||||
|
|
||||||
#define isnan(x) ((x) != (x))
|
#define isnan(x) ((x) != (x))
|
||||||
#define isinf(x) (((x) == INFINITY) || ((x) == -INFINITY))
|
#define isinf(x) (((x) == INFINITY) || ((x) == -INFINITY))
|
||||||
|
#define isfinite(x) (!(isinf(x)) && (x != NAN))
|
||||||
|
|
||||||
/* Exponential and Logarithmic constants ************************************/
|
/* Exponential and Logarithmic constants ************************************/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user