[liba] isinf/isnan both work on double

Change-Id: I08e0c338e343a5357b91ed3a3f2e63db37efc983
This commit is contained in:
Romain Goyet
2017-08-03 14:51:00 +02:00
parent 878518b697
commit a1f1e2df6a
8 changed files with 47 additions and 10 deletions

View File

@@ -13,13 +13,15 @@ LIBA_BEGIN_DECLS
/* The C99 standard requires isinf and isnan to be defined as macros that can
* handle arbitrary precision float numbers. The names of the functions called
* by those macros (depending on the argument size) are not standardized though.
* We're chosing isinff/isnanf for single-precision functions (which is the only
* case we're actually handling). */
* We're chosing isinff/isnanf for single-precision functions, and isinfd/isnand
* for double-precision functions. */
int isinff(float x);
#define isinf(x) isinff(x)
int isinfd(double d);
#define isinf(x) (sizeof(x) == sizeof(float) ? isinff(x) : isinfd(x))
int isnanf(float x);
#define isnan(x) isnanf(x)
int isnand(double x);
#define isnan(x) (sizeof(x) == sizeof(float) ? isnanf(x) : isnand(x))
float acosf(float x);
float acoshf(float x);

View File

@@ -3,7 +3,10 @@
#include <stdint.h>
uint32_t ieee754man(float x);
uint8_t ieee754exp(float x);
uint32_t ieee754man32(float x);
uint8_t ieee754exp32(float x);
uint64_t ieee754man64(double x);
uint16_t ieee754exp64(double x);
#endif