Changeset 1b20da0 in mainline for uspace/lib/c/generic/ieee_double.c
- Timestamp:
- 2018-02-28T17:52:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/ieee_double.c
rdf6ded8 r1b20da0 54 54 bits.val = val; 55 55 56 /* 57 * Extract the binary ieee representation of the double. 56 /* 57 * Extract the binary ieee representation of the double. 58 58 * Relies on integers having the same endianness as doubles. 59 59 */ 60 uint64_t num = bits.num; 60 uint64_t num = bits.num; 61 61 62 62 ieee_double_t ret; … … 98 98 ret.pos_val.exponent = raw_exponent - exponent_bias; 99 99 100 /* The predecessor is closer to val than the successor 100 /* The predecessor is closer to val than the successor 101 101 * if val is a normal value of the form 2^k (hence 102 * raw_significand == 0) with the only exception being 103 * the smallest normal (raw_exponent == 1). The smallest 104 * normal's predecessor is the largest denormal and denormals 105 * do not get an extra bit of precision because their exponent 102 * raw_significand == 0) with the only exception being 103 * the smallest normal (raw_exponent == 1). The smallest 104 * normal's predecessor is the largest denormal and denormals 105 * do not get an extra bit of precision because their exponent 106 106 * stays the same (ie it does not decrease from k to k-1). 107 107 */
Note:
See TracChangeset
for help on using the changeset viewer.