Conversion of floating-point numbers from binary into string format
Abstract
A method, system, and computer program product that convert a real number from a floating point representation to a character string. Mantissa bits are extracted from the floating-point representation of a value into an integer format. The mantissa bits of the integer format may be shifted left by a number of positions that is equal to a base 2 exponent of a first representation of the value. Prior to converting the value, the floating-point representation of the value can be divided by 2 n , where n is the number of the mantissa bits in the floating-point representation of the value. A set of operations can then be performed to convert a result of the division to a number greater than or equal to 1.0 and less than 10.0. The set of operations may include multiplication operations and/or retrieving a constant from a lookup table.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 11.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method comprising: causing a processor of a web server to retrieve a floating-point value from a memory, wherein the processor and the memory are communicatively coupled to one another, and the floating-point value is stored in the memory in a floating-point format; causing the processor to convert the floating-point value into a character string, comprising causing the processor to extract mantissa bits from the floating-point value, wherein the mantissa bits are bits of a mantissa of the floating-point value, causing the processor to store the mantissa bits in a first integer variable, whe
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (11 of 11 total)
References Cited — Backward Prior Art (5)
Non-Patent Literature (1)
- Burger, Robert G. and Dybvig, R. Kent, Printing Floating-Point Numbers Quickly and Accurately, Indiana University Computer Science Department, Lindley Hall 215, Bloomington, Indiana, Proceedings of the SIGPLAN '96 Conference on Programming Language Design and Implementation, pp. 108-116, May 1996.