Commit Graph

85 Commits

Author SHA1 Message Date
christos 6e8524778b Remove 3 functions that exist in libc. This does not break binary compatibility
since we always link with libc.
2008-04-26 19:49:38 +00:00
christos f5e7bbccfe Put back USE_SHLIBDIR and remove the confusing lint comment that made me
comment it out in the first place.
2008-04-26 19:19:06 +00:00
christos 98e7e8e9f7 avoid shadow variables, and enable lint. 2008-04-25 22:21:53 +00:00
drochner c7a43da627 Add manpages for the complex math functions, originally from SUSv3,
roff source from the Linux documentation project.
Modifications before import:
-added NetBSD RCS ID
-removed Linux PROLOG and declarations with "long double"
-ran the "deshallify" script as required by The Open Group
Split out complex related things into an own Makefile fragment.
Thanks to hubertf for directions.
2008-02-20 09:55:37 +00:00
mrg ecc90aa046 make all sun2 use -O0 and move most of the hacks out into just 3 files. 2008-02-09 02:37:21 +00:00
mrg e6f4791d95 make sun2 build again with liberal use of -O0. 2008-02-05 02:41:15 +00:00
drochner 9d8b5fa74e Add C99 complex support, for double and float.
Most complex function implementations are from the "c9x-complex" library,
originating from the "cephes" math library, see
http://www.netlib.org/cephes/, from Stephen L. Moshier, incorporated and
redistributed with the NetBSD license by permission of the author.

Error behaviour and other boundary conditions (branch cuts)
need to be looked at.

For namespace sanity, I've done the rename/weak alias procedure to
most of the exported functions which are also used internally.
Didn't do so for sin/cos(f) yet because assembler implementations use
them directly, and renaming functions shared between the main libm
and the machine specific "overlay" might raise binary compatibility
issues.
2007-08-20 16:01:28 +00:00
drochner 7161d089aa -get cabs() and cabsf() out of public view - these are historical and
conflict with C99 functions which are builtins in newer gcc
 (actually, the old cabs() is ABI compatible with the new _complex one
  on i386, but this is purely accidental)
 remove public prototypes and manpages, move the code into a compat
 subdirectory as libc does so that binary compatibility is kept
-add a manpage for the isgreater() etc macros, borrowed from FreeBSD
2007-02-22 22:08:17 +00:00
drochner 51086becae move manpages for frexp/ldexp/modf to libm -- the (most) implementation is
already there
2006-07-03 16:03:56 +00:00
mrg 9f0110033d noieee src is not strict-aliasing compliant. apply -fno-strict-aliasing. 2006-07-01 08:57:14 +00:00
mrg ec0b42887d build w_cabs.c/w_cabsf.c with -fno-builtin-cabs[f]
XXX: our cabs()/cabsf() are different to others.
2006-05-11 00:37:53 +00:00
xtraeme f1336fbda3 Add trunc() and truncf() C99 functions, from FreeBSD. 2006-03-25 16:41:11 +00:00
drochner 4ece2172cf Build the sun versions of frexp(), ldexp() and modf().
While the versions in libc/gen are prettier to look at, having single
precision versions in libm and double precision versions in libc causes
a lot of confusion, and to favor libm gets us coprocessor support.
2006-03-21 18:46:05 +00:00
kleink d73d316468 Add nan(3), nanf(3), and nanl(3); welcome libm.so.0.4. 2006-03-15 22:07:08 +00:00
is 42796049d0 C versions of non-IEEE round() / roundf(). Alas, using the VAX
cvtrdl; cvtld doesn't work for big numbers.
2006-01-17 13:16:08 +00:00
is 5703e44cdb Implement round(3), so that jot(1) can link again. 2006-01-15 12:39:44 +00:00
wiz c4b850a8a6 Add man page for l{,l}rint{,f}(3), very loosely based on the FreeBSD one.
Requested by martin@
Reviewed by drochner@
2005-09-16 15:26:47 +00:00
rpaulo 1185f13617 Add i387 FPU routines for log2(3) and log2f(3).
ok christos@
2005-07-21 20:58:21 +00:00
christos 9aa540a2b5 Add wrappers for the newly added functions. Thanks Klaus! 2005-07-21 16:58:39 +00:00
christos e5c18e58f2 Add log2 and log2f from FreeBSD PR 83845 2005-07-21 12:55:58 +00:00
jmmv 8740cbe236 Add a conditional for proper m68k softfloat operation. It looks like I
forgot to commit this file back when this functionality was added.
Noted by Bruce O'Neel (the original author) in port-mac68k@.
2004-11-13 20:29:47 +00:00
junyoung bc836a3102 lib/24252: Add C99 functions round(3) and roundf(3).
libm minor unchanged; ride a recent bump.

From FreeBSD.
2004-07-10 13:49:09 +00:00
drochner 07be12b505 also provide an alpha assembler implemtation of lrint() 2004-07-01 19:08:21 +00:00
drochner 5d151d763f enable lrint.S for amd64 (which doesn't build libm387),
and tighten the generic->machdep source distribution a bit to avoid
unwanted substitutions
2004-07-01 17:33:16 +00:00
drochner 147d852dbc being here, add the (l)lround(f) functions to libm
(almost the same like lrint)
2004-07-01 16:09:21 +00:00
drochner d76992e490 Implement (l)lrint(f).
(Could get some optimization for LP64; this would need a change to
the float access macros in math_private.h.)
2004-06-30 15:08:30 +00:00
matt 0202d560cf Compile libm on VAX at WARNS=2; leave other architectures at WARNS=1 2002-06-15 00:13:07 +00:00
ross de50fe2e64 Drink ALL the Kool-Aid.
(Move -mieee from lib/ to bsd.*.mk; new var MKIEEEFP defaults to yes.)
2002-01-27 23:33:51 +00:00
thorpej 4586df0992 On Alpha, build libc and libm with -mieee ... A metric crapload
of 3rd party software expects this.

XXX TODO: consider libm-fast for alpha that is not -mieee.  Possibly
determine -mieee or not at run-time based on a bit in the executable
headers.
2002-01-27 21:59:18 +00:00
lukem efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00
tv 001067bbd1 Readability cleanups; MKfoo=no -> NOfoo. 2001-12-12 00:51:00 +00:00
lukem c1b95c0073 explicitly set to WARNS?=1 2001-11-05 15:22:23 +00:00
fvdl d27b141b4e Use arch/i387 for x86_64. 2001-06-19 00:25:36 +00:00
christos 25b059b813 If we are not including i387 support in libm, build a separate libi387. 1999-12-13 09:40:27 +00:00
is 7afc17a12a Use arch/m68k copies of the common functions even for mc68881 hardware. 1999-08-22 18:28:37 +00:00
is beb22e60b3 Pull in Motorola 68060 floating point library support package based
libm code, .ifdef M68060.
1999-08-19 21:53:03 +00:00
kleink b3f30828b1 Document isinff(3) and isnanf(3), cloned from the corresponding double-
precision manual page.  It is kept separately since the latter are part of
libc and thus impose different linkage instructions.
1999-08-16 23:10:20 +00:00
kleink 72c8365c20 Document reentrant log gamma interfaces. 1999-08-16 12:35:18 +00:00
kleink f8173630a0 Add single-precision versions of interfaces to their manual pages' NAME section
and install links as appropriate.
1999-08-15 22:23:53 +00:00
simonb 42724dd4d2 More trailing white space. 1999-07-02 15:37:33 +00:00
is 456bf68494 Quick and dirty hook to compile a non-6888[12] libm for 68040 and 68060.
This is switched to by the M68040 or M68060 defines.
XXX Eventually, a M060SP based libm should be built for M68060.
1999-07-01 20:46:35 +00:00
he 04d7a85c7b NOLINT -> MKLINT=no. 1999-02-15 09:33:41 +00:00
matt 5bf0199231 Fix PIC code and fix problem with obj dirs. 1998-11-11 15:26:14 +00:00
matt 99d642287b Actually build __setjmp.S/__sigsetjmp.S for vax. PICifiy the setjmp code.
Fix libm Makefile to handle obj directories.
1998-10-10 00:08:50 +00:00
ragge 9f749c2036 The Mariah chip lacks the POLYD instruction, so some assembly coded
calculations must be done in C instead. Fast fix until the POLY{D,F,G,H}
insn's are written.
1998-08-22 12:49:08 +00:00
perry 3e3611d479 on i386, use FPU instructions in libm if I387_LIBM is set, from dan@geek.com.au 1998-08-09 23:51:33 +00:00
cgd 0dfe3ba2cc move NOLINT definition 1998-02-19 06:58:07 +00:00
cgd 0924c4443d Make sure the reason that NOLINT is set is documented. Additionally
in places where it should be set (or has to be set right now), do so.
1998-02-19 02:17:05 +00:00
lukem 69c06ad713 use CPPFLAGS instead of CFLAGS 1997-10-23 02:41:28 +00:00
mikel c7534c9f97 kill tab on line by itself, keep contents within 80 columns 1997-10-18 05:34:11 +00:00