| 746 | } |
| 747 | |
| 748 | uint64_t FPOne(bool sign, int N) |
| 749 | { |
| 750 | // width should be 16, 32, 64 |
| 751 | int E, F, exp; |
| 752 | |
| 753 | switch (N) |
| 754 | { |
| 755 | case 16: |
| 756 | E = 5; |
| 757 | case 32: |
| 758 | E = 8; |
| 759 | default: |
| 760 | E = 11; |
| 761 | } |
| 762 | |
| 763 | F = N - (E + 1); |
| 764 | exp = BITMASK(E - 1) << 1; |
| 765 | return (sign << (E - 1 + F)) | (exp << F); |
| 766 | } |
| 767 | |
| 768 | uint64_t FPTwo(bool sign, int N) |
| 769 | { |
no outgoing calls
no test coverage detected