summaryrefslogtreecommitdiffstats
path: root/lib/libc/gdtoa/_hdtoa.c
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak the build for arm and powerpc.das2008-04-121-0/+2
| | | | Pointy hat to yours truly.
* Make several changes to the way printf handles hex floating point (%a):das2008-04-121-206/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Previously, printing the number 1.0 could produce 0x1p+0, 0x2p-1, 0x4p-2, or 0x8p-3, depending on what happened to be convenient. This meant that printing a value as a double and printing the same value as a long double could produce different (but equivalent) results. The change is to always make the leading digit a 1, unless the number is 0. This solves the aforementioned problem and has several other advantages. 2. Use the FPU to do rounding. This is far simpler and more portable than manipulating the bits, and it fixes an obsure round-to-even bug. It also raises the exceptions now required by IEEE 754R. The drawbacks are that it is usually slightly slower, and it makes printf less effective as a debugging tool when the FPU is hosed (e.g., due to a buggy softfloat implementation). 3. On i386, twiddle the rounding precision so that (2) works properly for long doubles. 4. Make several simplifications that are now possible due to (2). 5. Split __hldtoa() into a separate file. Thanks to remko for access to a sparc64 box for testing.
* Fix a rounding error.das2007-05-081-1/+1
| | | | Reported by: Bruno Haible
* Fix rounding of 0xf for hex fp formats.das2007-01-031-1/+1
| | | | PR: 90333
* Cut out the gordian handling of subnormals by bit fiddling, anddas2005-01-181-128/+15
| | | | | | | | | | instead use the FPU to convert subnormals to normals. (NB: Further simplification is possible, such as using the FPU for the rounding step.) This fixes a bug reported by stefanf where long double subnormals in the Intel 80-bit format would be output with one fewer digit than necessary when the default precision was used.
* Updated manh shift constant type to 'ULL' for PPC to fixgrehan2004-01-211-1/+1
| | | | | | shift-too-large compile error reviewed by: das
* Implement __hdtoa() and __hldtoa() and enable printf() support for %adas2004-01-181-0/+432
and %A, which print floating-point numbers in hexadecimal.
OpenPOWER on IntegriCloud