… | |
… | |
724 | |
724 | |
725 | /* handle large numbers and infinity */ |
725 | /* handle large numbers and infinity */ |
726 | if (ecb_expect_true (0x477fefff < x && x <= 0x7f800000)) |
726 | if (ecb_expect_true (0x477fefff < x && x <= 0x7f800000)) |
727 | return s | 0x7c00; |
727 | return s | 0x7c00; |
728 | |
728 | |
729 | /* handle zero and subnormals */ |
729 | /* handle zero, subnormals and small numbers */ |
730 | if (ecb_expect_true (x < 0x38800000)) |
730 | if (ecb_expect_true (x < 0x38800000)) |
731 | { |
731 | { |
732 | /* zero */ |
732 | /* zero */ |
733 | if (ecb_expect_true (!x)) |
733 | if (ecb_expect_true (!x)) |
734 | return s; |
734 | return s; |
735 | |
735 | |
736 | /* handle subnormals */ |
736 | /* handle subnormals */ |
|
|
737 | |
|
|
738 | /* too small, will be zero */ |
|
|
739 | if (e < (14 - 24)) /* might not be sharp, but is good enough */ |
|
|
740 | return s; |
737 | |
741 | |
738 | m |= 0x00800000; /* make implicit bit explicit */ |
742 | m |= 0x00800000; /* make implicit bit explicit */ |
739 | |
743 | |
740 | /* very tricky - we need to round to the nearest e (+10) bit value */ |
744 | /* very tricky - we need to round to the nearest e (+10) bit value */ |
741 | { |
745 | { |