Changeset 09ab0a9a in mainline for uspace/lib/c/generic/double_to_str.c
- Timestamp:
- 2018-09-13T12:05:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cc74cb5
- Parents:
- b2aaaa0
- git-author:
- Jiri Svoboda <jiri@…> (2018-09-13 07:09:46)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-09-13 12:05:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/double_to_str.c
rb2aaaa0 r09ab0a9a 52 52 static const int gamma = -32; 53 53 54 55 54 /** Returns true if the most-significant bit of num.significand is set. */ 56 55 static bool is_normalized(fp_num_t num) … … 80 79 return num; 81 80 } 82 83 81 84 82 /** Returns x * y with an error of less than 0.5 ulp. */ … … 130 128 } 131 129 132 133 130 /** Returns a - b. Both must have the same exponent. */ 134 131 static fp_num_t subtract(fp_num_t a, fp_num_t b) … … 144 141 return result; 145 142 } 146 147 143 148 144 /** Returns the interval [low, high] of numbers that convert to binary val. */ … … 248 244 *scaled_upper_bound = upper_scaled; 249 245 } 250 251 246 252 247 /** Rounds the last digit of buf so that it is closest to the converted number.*/ … … 299 294 } 300 295 301 302 296 /** Generates the shortest accurate decimal string representation. 303 297 * … … 478 472 } 479 473 480 481 474 /** Converts a non-special double into its shortest accurate string 482 475 * representation. … … 698 691 } 699 692 } 700 701 693 702 694 /** Converts a non-special double into its string representation. … … 792 784 return len; 793 785 } 794
Note:
See TracChangeset
for help on using the changeset viewer.