Commit Graph

52 Commits

Author SHA1 Message Date
Ken Smith
85a8b887df Bump the library version numbers for the following libraries:
/lib/{libm,libreadline}
	/usr/lib/{libhistory,libopie,libpcap}

in preparation for doing the same thing to RELENG_5.  HUGE amounts of
help for determining what to bump provided by kris.

Discussed on:	freebsd-current
Approved by:	re (not required for commit but something like this should be)
2004-10-01 15:38:07 +00:00
Stefan Farfeleder
bef5493789 Add man pages for the cimag(), conj() and creal() functions. 2004-08-07 23:03:36 +00:00
David Schultz
2208ce0a06 Replace s_isnan.c and s_isnanf.c with the more compact s_isnan.c from
libc.  The externally-visible effect of this is to add __isnanl() to
libm, which means that libm.so.2 can once again link against libc.so.4
when LD_BIND_NOW is set.  This was broken by the addition of fdiml(),
which calls __isnanl().
2004-08-05 01:46:11 +00:00
David Schultz
ec79bc0da9 Fix two bugs in the signbit() macro, which was implemented last year:
- It was added to libc instead of libm.  Hopefully no programs rely
  on this mistake.

- It didn't work properly on large long doubles because its argument
  was converted to type double, resulting in undefined behavior.
2004-07-19 08:16:10 +00:00
David Schultz
240dbabfa8 Implement the classification macros isfinite(), isinf(), isnan(), and
isnormal() the hard way, rather than relying on fpclassify().  This is
a lose in the sense that we need a total of 12 functions, but it is
necessary for binary compatibility because we have never bumped libm's
major version number.  In particular, isinf(), isnan(), and isnanf()
were BSD libc functions before they were C99 macros, so we can't
reimplement them in terms of fpclassify() without adding a dependency
on libc.so.5.  I have tried to arrange things so that programs that
could be compiled in FreeBSD 4.X will generate the same external
references when compiled in 5.X.  At the same time, the new macros
should remain C99-compliant.

The isinf() and isnan() functions remain in libc for historical
reasons; however, I have moved the functions that implement the macros
isfinite() and isnormal() to libm where they belong.  Moreover,
half a dozen MD versions of isinf() and isnan() have been replaced
with MI versions that work equally well.

Prodded by:	kris
2004-07-09 03:32:40 +00:00
David Schultz
9428e108c9 Add C99's nearbyint{,f}() functions as wrappers around rint().
These trivial implementations are about 25 times slower than
rint{,f}() on x86 due to the FP environment save/restore.
They should eventually be redone in terms of fegetround() and
bit fiddling.
2004-07-06 04:46:08 +00:00
David Schultz
4f82cb46c4 Implement and document fdim{,f,l}, fmax{,f,l}, and fmin{,f,l}. 2004-06-30 07:04:01 +00:00
Marcel Moolenaar
c987479dd0 s/ARCH/ARCH_SUBDIR/g -- This reduces the chance of possible conflicts
with the user's environment.

Wondered why his cross-builds kept failing: marcel
2004-06-24 00:02:32 +00:00
Stefan Farfeleder
c8764bba5a Completely remove s_ilogb.S as the assembler implementation gives very little
speed improvement to none at all over the MI version.

Submitted by:	bde
2004-06-20 10:42:23 +00:00
David Schultz
209547598d Connect scalbln(), trunc(), and the associated documentation to the build. 2004-06-20 09:27:03 +00:00
David Schultz
d0f1363370 Add round(3) and roundf(3) and the associated documentation.
PR:		59797
Submitted by:	"Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Reviewed by:	bde (earlier version, last year)
2004-06-07 08:05:36 +00:00
David Schultz
54dd6976a8 Add fenv.h, fenv.c, and the associated documentation to the libm
build.  To facilitate this, add ${.CURDIR}/${ARCH} to make's search
path unconditionally.

Reviewed by:	standards@
2004-06-06 10:06:57 +00:00
Stefan Farfeleder
8b5cd5a662 Add implementations for cimag{,f,l}, creal{,f,l} and conj{,f,l}. They are
needed for cases where GCC's builtin functions cannot be used and for
compilers that don't know about them.

Approved by:	das (mentor)
2004-05-30 09:21:56 +00:00
Stefan Farfeleder
b60cb13f76 Add an implementation of copysignl(), a long double version of copysign().
Approved by:	das (mentor)
2004-05-07 18:56:31 +00:00
Stefan Farfeleder
325152e8fb Add an MLINK for fabsl().
Approved by:	das (mentor)
2004-05-07 17:55:07 +00:00
Dag-Erling Smørgrav
e334ea2edc - fabsl.c should be named s_fabsl.c for consistency with libmsun's
documented naming scheme (unfortunately the documentation isn't in the
   tree as far as I can tell); no repocopy is required as there is no
   history to preserve.

 - replace simple and almost-correct implementation with slightly hackish
   but definitely correct implementation (tested on i386, alpha, sparc64)
   which requires pulling in fpmath.h and the MD _fpmath.h from libc.

 - try not to make a mess of the Makefile in the process.

 - enterprising minds are encouraged to implement more C99 long double
   functions.
2003-10-25 09:32:18 +00:00
Dag-Erling Smørgrav
4318dce616 Connect fabsl.c to the build. 2003-10-23 08:23:51 +00:00
Gordon Tetlow
41d8423f71 Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.
2003-08-17 08:28:46 +00:00
Bruce Evans
262e4c00bd Fixed some style bugs (misplacement and misformatting of some commented-out
code).
2003-07-23 09:24:44 +00:00
Peter Wemm
3819e84017 Only provide one copy of the math functions. If we provide a MD function,
do not also provide a __generic_XXX version as well.  This is how we
used to runtime select the generic vs i387 versions on the i386 platform.

This saves a pile of #defines in the src/math_private.h file to undo the
__generic_XXX renames in some of the *.c files.
2003-07-23 04:53:47 +00:00
Peter Wemm
d48084b9e5 No longer need the internal __get_hw_float() function. 2003-07-23 04:25:04 +00:00
Peter Wemm
c3e6df78e1 Now that we do not need to do runtime detection for the broken default
fp emulator, stop doing the runtime selection of hardware or emulated
floating point operations on i386.  Note that I have not suppressed the
duplicate compiles yet.

While here, fix the alpha.  It has provided specific copysign/copysignf
functions since the beginning of time, but they have never been used.
2003-07-23 04:23:36 +00:00
Ruslan Ermilov
c7b111cba8 Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
2002-05-12 16:01:00 +00:00
Bruce Evans
46d7c2979e Resurrect Lite1's gamma() as C99's tgamma(). Minimal changes. 2002-03-26 11:59:29 +00:00
David E. O'Brien
118ce04e39 We need an frexp() function. 2002-03-01 01:58:20 +00:00
Alexey Zelkin
4b667ee0db * remove reference to m68k-dependent sources
* fix comment
2001-12-13 17:18:26 +00:00
Bruce Evans
6a8ba2f960 Don't install manpage links for the nonexistent functions exp2(),
exp2f(), log2() and log2f().
2001-10-03 06:30:11 +00:00
Ruslan Ermilov
4a558355e5 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
Ruslan Ermilov
0414fc4dd0 Don't use MANDEPEND and MANSRC. 2001-03-26 07:28:26 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Doug Rabson
6f93bf5f4b Disable building with alpha software completion options until we upgrade
compilers.
1998-12-24 13:17:58 +00:00
Doug Rabson
b7f762137a Implement fpsetmask() and other fp*() functions. Programs should use
#include <ieeefp.h>

to access these functions instead of the i386 specific

	#include <machine/floatingpoint.h>

Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1998-12-23 11:50:52 +00:00
John Birrell
05b706676b Add alpha support. m68k crept in too. Oops. 8-) 1998-02-20 07:44:29 +00:00
Bruce Evans
3bc097d098 Added -D_ARCH_INDIRECT=i387_ to CFLAGS. _ARCH_INDIRECT will soon be used
to control generation of indirections in ENTRY().  Only msun needs it.

Use ${ARCH} consistently.
1997-04-15 14:05:28 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Bruce Evans
2e6184e901 Split up the Bessel function wrapper files so that most wrapper functions
are in their own file.
1997-02-20 13:35:15 +00:00
Bruce Evans
dab159e3d6 Select between the generic math functions and the i387-specific ones
at runtime.

etc/make.conf:
Nuked HAVE_FPU option.

lib/msun/Makefile:
Always build the i387 objects.  Copy the i387 source files at build
time so that the i387 objects have different names.  This is simpler
than renaming the files in the cvs repository or repeating half of
bsd.lib.mk to add explicit rules.

lib/msun/src/*.c:
Renamed all functions that have an i387-specific version by adding
`__generic_' to their names.

lib/msun/src/get_hw_float.c:
New file for getting machdep.hw_float from the kernel.

sys/i386/include/asmacros.h:
Abuse the ENTRY() macro to generate jump vectors and associated code.
This works much like PIC PLT dynamic initialization.  The PIC case is
messy.  The old i387 entry points are renamed.  Renaming is easier
here because the names are given by macro expansions.
1997-02-16 18:26:31 +00:00
Jordan K. Hubbard
c4ebcb3423 Put back .endif clobbered by the previous commit, breaking the
build.
1997-02-15 14:05:42 +00:00
Bruce Evans
ec7d3a3282 Disabled the i387 version if log1p(). It just evaluates log(1 + x).
This defeats the point of log1p().  ucbtest reports errors of +-5e+15
ULPs.  A correct version would use the i387 fyl2xp1 instruction for
small x and maybe scale to small x.  The C version does the scaling
reasonably efficiently, and fyl2px1 is slow (at least on P5s), so not
much is lost by always using the C version (only 25% for small x even
with the broken i387 version; 50% for large x).
1997-02-15 05:21:16 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman
e76da59456 Delete -D_POSIX_MODE and -D_MULTI_LIBM from CFLAGS. They never had any effect
because _IEEE_LIBM always takes priority, so the definition just served
to confuse.

Reviewed by:	bde
1997-01-08 13:22:28 +00:00
Peter Wemm
bc4c97465a consistancy fixup
Submitted by: "Philippe Charnier" <charnier@xp11.frmug.org>
1996-08-30 21:21:52 +00:00
Peter Wemm
345be915f7 cmp -s || install -c ==> install -C 1996-08-30 02:12:07 +00:00
Mike Pritchard
50ab12d9c0 Correct one small typo in previous commit. 1996-02-09 00:48:52 +00:00
Mike Pritchard
c211e812bb Added some missing MLINKS for section 3 man pages.
Also corrected a few minor formatting errors, file location and cross
references in some of the section 3 man pages.

This shuts up a lot of the output from "manck" for section 3.
1996-02-09 00:45:45 +00:00
Bruce Evans
6644bf3e9b Undo the the changes in the previous revision (MANSRC now works right again).
Use ${INSTALL} instead of install.
1995-10-22 19:16:01 +00:00
Garrett Wollman
973f098aab Compress manual pages (if desired) in the obj directory rather
than in the installation destination.  Should make release-building
substantially faster.  The msun Makefile changes simple adapt to the new
scheme.
1995-10-02 20:02:05 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Bruce Evans
b2fd1f671d Obtained from: NetBSD
Remove common sources from ${SRCS} when they are replaced by arch-specific
sources.
1995-03-08 01:41:40 +00:00
Bruce Evans
510cdfd2cf Install math.h. 1994-09-08 10:40:23 +00:00