diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-11-07 22:20:38 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-11-07 22:20:38 +0000 |
commit | f38ce04c0ab9b0b4b93ad6d79ce1d9410201611d (patch) | |
tree | b1cf3e38a532e7948c11ed7a2093bfa3a16a7025 | |
parent | 383c232bc2f1661923177437e48ea4cf6bd4e304 (diff) | |
download | pack-f38ce04c0ab9b0b4b93ad6d79ce1d9410201611d.tar.gz pack-f38ce04c0ab9b0b4b93ad6d79ce1d9410201611d.tar.xz pack-f38ce04c0ab9b0b4b93ad6d79ce1d9410201611d.zip |
ieee754b.c: small cleanup
-rw-r--r-- | ieee754b.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -20,12 +20,10 @@ type ieee754b##total##_deserialise(uintmax_t b) \ n = b & BITMASK(nfrac); \ \ if (exp == BITMASK(nexp)) { \ - if (n) { \ - return NAN; \ - } else { \ - return isneg ? -INFINITY : INFINITY; \ - } \ - } else if (exp == 0) { \ + if (n) return NAN; \ + return isneg ? -INFINITY : INFINITY; \ + } \ + if (exp == 0) { \ if (n == 0) \ return isneg ? -0.0 : 0.0; \ exp = -(int)(BITMASK(nexp) / 2 - 1); \ |