Commit Graph

20 Commits

Author SHA1 Message Date
David Schultz
7f7c29db5e Fix a rounding error.
Reported by: Bruno Haible
2007-05-08 02:59:37 +00:00
Daniel Eischen
5f864214bb Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
David Schultz
ac9913a749 Fix rounding of 0xf for hex fp formats.
PR:	90333
2007-01-03 04:57:58 +00:00
Daniel Eischen
797f4fb875 Don't export __gdtoa. The only known ports that rely on
this or the deprecated POSIX functions {e,g,f}cvt() have
newer versions that do not (rely on them).

Requested by:	marius
2006-04-15 15:35:20 +00:00
Daniel Eischen
9fe1984e64 Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,
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.
2006-04-01 02:56:09 +00:00
Daniel Eischen
6fad3aaf15 Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
Daniel Eischen
cce72e8860 Add symbol maps and initial symbol version definitions to libc.
Reviewed by:	davidxu
2006-03-13 00:53:21 +00:00
David Schultz
2380daafe9 Don't compile the gdtoa package's strtoIg.c into libc.
I never got around to making use of it.
2005-01-27 05:44:16 +00:00
David Schultz
9fd7a48db0 Cut out the gordian handling of subnormals by bit fiddling, and
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.
2005-01-18 18:44:07 +00:00
David Schultz
bd15659f64 Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.
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.
2005-01-15 05:23:58 +00:00
Peter Grehan
b12b51fb53 Updated manh shift constant type to 'ULL' for PPC to fix
shift-too-large compile error

reviewed by: das
2004-01-21 04:51:50 +00:00
David Schultz
8f59277300 Implement __hdtoa() and __hldtoa() and enable printf() support for %a
and %A, which print floating-point numbers in hexadecimal.
2004-01-18 10:32:49 +00:00
David Schultz
d784b0c32c Fix a bug that caused long double subnormals to be printed
incorrectly on architectures without an explicit normalization
bit (sparc64, powerpc).
2004-01-18 07:53:49 +00:00
Ruslan Ermilov
042a0b7e95 Replaced an ugly hack to selectively disable warnings
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.
2004-01-11 10:42:47 +00:00
David E. O'Brien
6a86fe7b72 Add an ulgy hack so that warnings added by non-zero WARNS values won't be
used with the contrib/ gdtoa sources as they aren't WARNS-clean.

Submitted by:	ru
2004-01-10 21:51:48 +00:00
David Schultz
d086ded323 Userland spinlocks bad. Sleep locks good.
Use the latter for gdtoa.

Requested by:	deischen (far too long ago)
2003-06-21 08:20:14 +00:00
David Schultz
fad677445e /strtopx/ s/result/&result/
This is the version I *meant* to commit last week.
2003-04-09 05:58:43 +00:00
David Schultz
92b93b37c0 Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().
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@
2003-04-05 22:10:13 +00:00
David E. O'Brien
120a95cb50 Clean up the way gdtoa sources are found.
OK'ed by:	das
2003-03-13 18:55:14 +00:00
David Schultz
6a66acb565 Replace our ancient dtoa/strtod implementation with the gdtoa
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
2003-03-12 20:30:00 +00:00