summaryrefslogtreecommitdiffstats
path: root/lib/libc/gdtoa
Commit message (Collapse)AuthorAgeFilesLines
* Implement xlocale APIs from Darwin, mainly for use by libc++. This adds atheraven2011-11-203-6/+23
| | | | | | | | | | | | load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit locale parameter. Also adds support for per-thread locales. This work was funded by the FreeBSD Foundation. Please test any code you have that uses the C standard locale functions! Reviewed by: das (gdtoa changes) Approved by: dim (mentor)
* Unbreak the build for arm and powerpc.das2008-04-122-0/+3
| | | | Pointy hat to yours truly.
* Make several changes to the way printf handles hex floating point (%a):das2008-04-123-207/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Export gdtoa's __ULto{x,Q}_D2A routine in a private namespace sodas2007-12-161-0/+5
| | | | libm can use it.
* Fix handling of subnormals on i386/ia64/amd64.das2007-12-091-2/+0
| | | | PR: 85080
* In scanf, round according to the current rounding mode.das2007-12-033-4/+16
|
* Use an intermediate pointer to avoid a strict aliasing warning.jb2007-11-211-1/+2
| | | | | | Note that ULong in this code is actually defined as an unsigned integer across all arches so that the gdtoa() function always processes 32 bit data despite the unfortunate naming of "ULong".
* Remove symbols that should not be exported.deischen2007-10-131-29/+0
| | | | | Submitted by: das MFC after re@ approval
* Fix a rounding error.das2007-05-081-1/+1
| | | | Reported by: Bruno Haible
* Use C comments since we now preprocess these files with CPP.deischen2007-04-291-4/+8
|
* Fix rounding of 0xf for hex fp formats.das2007-01-031-1/+1
| | | | PR: 90333
* Don't export __gdtoa. The only known ports that rely ondeischen2006-04-151-5/+1
| | | | | | | this or the deprecated POSIX functions {e,g,f}cvt() have newer versions that do not (rely on them). Requested by: marius
* Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,deischen2006-04-011-0/+4
| | | | | | | | this is used by some 3rd party applications when {e,f,g}cvt() are not found. POSIX defines the xcvt() funtions but says they are deprecated in favor or sprintf(). We'll import these functions from OpenBSD and remove __gdtoa() from the exported interfaces when libc version is bumped.
* Add each directory's symbol map file to SYM_MAPS.deischen2006-03-131-0/+2
|
* Add symbol maps and initial symbol version definitions to libc.deischen2006-03-131-0/+39
| | | | Reviewed by: davidxu
* Don't compile the gdtoa package's strtoIg.c into libc.das2005-01-271-1/+1
| | | | I never got around to making use of it.
* 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.
* Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.das2005-01-151-4/+1
| | | | | The purpose of having a separate file involved an abandoned scheme that would have kept contrib/gdtoa out of the include path for the rest of libc.
* 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-182-1/+433
| | | | and %A, which print floating-point numbers in hexadecimal.
* Fix a bug that caused long double subnormals to be printeddas2004-01-181-0/+3
| | | | | incorrectly on architectures without an explicit normalization bit (sparc64, powerpc).
* Replaced an ugly hack to selectively disable warningsru2004-01-111-3/+0
| | | | | | | in contributed sources with just a hack made possible by bsd.sys.mk,v 1.33. This is better because it just nulls out the warning flags rather than adding gcc(1) specific -w option to CFLAGS.
* Add an ulgy hack so that warnings added by non-zero WARNS values won't beobrien2004-01-101-0/+3
| | | | | | used with the contrib/ gdtoa sources as they aren't WARNS-clean. Submitted by: ru
* Userland spinlocks bad. Sleep locks good.das2003-06-211-2/+5
| | | | | | Use the latter for gdtoa. Requested by: deischen (far too long ago)
* /strtopx/ s/result/&result/das2003-04-092-2/+2
| | | | This is the version I *meant* to commit last week.
* Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().das2003-04-052-1/+98
| | | | | | | In support of this, add some MD macros to assist in converting long doubles to the format expected by gdtoa(). Reviewed by: silence on standards@
* Clean up the way gdtoa sources are found.obrien2003-03-131-1/+6
| | | | OK'ed by: das
* Replace our ancient dtoa/strtod implementation with the gdtoadas2003-03-125-0/+159
package, a more recent, generalized set of routines. Among the changes: - Declare strtof() and strtold() in stdlib.h. - Add glue to libc to support these routines for all kinds of ``long double''. - Update printf() to reflect the fact that dtoa works slightly differently now. As soon as I see that nothing has blown up, I will kill src/lib/libc/stdlib/strtod.c. Soon printf() will be able to use the new routines to output long doubles without loss of precision, but numerous bugs in the existing code must be addressed first. Reviewed by: bde (briefly), mike (mentor), obrien
OpenPOWER on IntegriCloud