| 62 | } |
| 63 | |
| 64 | hc_fix_t hc_fix_sub(const hc_fix_t x, const hc_fix_t y) { |
| 65 | const uint8_t xe = hc_fix_exp(x); |
| 66 | const uint8_t ye = hc_fix_exp(y); |
| 67 | |
| 68 | if (xe == ye) { |
| 69 | return hc_fix(xe, hc_fix_val(x) - hc_fix_val(y)); |
| 70 | } |
| 71 | |
| 72 | return hc_fix(xe, hc_fix_val(x) - |
| 73 | hc_fix_val(y) * hc_scale(xe) / hc_scale(ye)); |
| 74 | } |
| 75 | |
| 76 | hc_fix_t hc_fix_mul(const hc_fix_t x, const hc_fix_t y) { |
| 77 | return hc_fix(hc_fix_exp(x), hc_fix_val(x) * |