… | |
… | |
760 | =item uint16_t ecb_binary32_to_binary16 (uint32_t x) |
760 | =item uint16_t ecb_binary32_to_binary16 (uint32_t x) |
761 | |
761 | |
762 | =item uint32_t ecb_binary16_to_binary32 (uint16_t x) |
762 | =item uint32_t ecb_binary16_to_binary32 (uint16_t x) |
763 | |
763 | |
764 | Convert a IEEE binary32/single precision to binary16/half format, and vice |
764 | Convert a IEEE binary32/single precision to binary16/half format, and vice |
765 | versa, handling all details (round-to-even, subnormals, infinity and NaNs) |
765 | versa, handling all details (round-to-nearest-even, subnormals, infinity |
766 | correctly. |
766 | and NaNs) correctly. |
767 | |
767 | |
768 | These are functions are available under C<-DECB_NO_LIBM>, since |
768 | These are functions are available under C<-DECB_NO_LIBM>, since |
769 | they do not rely on the platform floating point format. The |
769 | they do not rely on the platform floating point format. The |
770 | C<ecb_float_to_binary16> and C<ecb_binary16_to_float> functions are |
770 | C<ecb_float_to_binary16> and C<ecb_binary16_to_float> functions are |
771 | usually what you want. |
771 | usually what you want. |