… | |
… | |
587 | |
587 | |
588 | #ifndef ECB_NO_LIBM |
588 | #ifndef ECB_NO_LIBM |
589 | |
589 | |
590 | #include <math.h> /* for frexp*, ldexp*, INFINITY, NAN */ |
590 | #include <math.h> /* for frexp*, ldexp*, INFINITY, NAN */ |
591 | |
591 | |
|
|
592 | /* only the oldest of old doesn't have this one. solaris. */ |
|
|
593 | #ifdef INFINITY |
|
|
594 | #define ECB_INFINITY INFINITY |
|
|
595 | #else |
|
|
596 | #define ECB_INFINITY HUGE_VAL |
|
|
597 | #endif |
|
|
598 | |
592 | #ifdef NEN |
599 | #ifdef NAN |
593 | #define ECB_NAN NAN |
600 | #define ECB_NAN NAN |
594 | #else |
601 | #else |
595 | #define ECB_NAN INFINITY |
602 | #define ECB_NAN ECB_INFINITY |
596 | #endif |
603 | #endif |
597 | |
604 | |
598 | /* converts an ieee half/binary16 to a float */ |
605 | /* converts an ieee half/binary16 to a float */ |
599 | ecb_function_ float ecb_binary16_to_float (uint16_t x) ecb_const; |
606 | ecb_function_ float ecb_binary16_to_float (uint16_t x) ecb_const; |
600 | ecb_function_ float |
607 | ecb_function_ float |