Commit Graph

355 Commits

Author SHA1 Message Date
christos 47c5991d7a PR/15748: Ray Brownrigg: exp(log(0)) is broken.
Use FreeBSD's version. Handles inf/nan and rounding modes.
2002-02-27 16:32:46 +00:00
matt 0ce5ca145f Change to use a register prefix. 2002-02-24 01:06:18 +00:00
matt d9dae701a5 Don't bsbb to an external symbol. the dynamic linker won't like it. 2002-02-21 07:49:55 +00:00
wiz 306d24c5d4 Sort SEE ALSO. 2002-02-20 11:53:02 +00:00
wiz 9b53792eb8 Drop superfluous .Pp, punctuation nit. 2002-02-20 11:52:39 +00:00
wiz dcd750ae30 Sort sections. 2002-02-20 11:52:13 +00:00
wiz 22a40c69b3 Use standard headers, sort sections. 2002-02-20 11:51:43 +00:00
wiz 363989ac63 Punctuation nits, use standard headers, sort sections, remove Tahoe references. 2002-02-20 11:51:15 +00:00
ross dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
ross 9856438e91 generate & symbolically 2002-02-07 09:24:04 +00:00
ross 814f296b77 Generate <>& symbolically. 2002-02-07 07:00:09 +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
wiz bed5b7e260 Whitespace nit. 2002-01-15 02:53:28 +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
wiz b4371d47f5 Replace some misuses of "then" with "than". 2001-12-04 17:56:30 +00:00
gmcgarry 1077b95a4c - sort sections
- introduce commented-out FILES section until page is mdoc'ified.
2001-11-10 06:29:57 +00:00
lukem c1b95c0073 explicitly set to WARNS?=1 2001-11-05 15:22:23 +00:00
fvdl d191029b13 2 more bitnumber mistakes fixed while removing sahf. 2001-06-25 16:47:05 +00:00
fvdl c5b64cb062 Oops, when I replaced sahf with a btw, I made it test the wrong bit
(2 vs. 10).
2001-06-25 16:44:34 +00:00
fvdl 120d96874f %rbp -> %rsp in 2 cases. 2001-06-19 17:49:36 +00:00
fvdl 8ecba6c681 Modify the i387 code so that it can be shared between the i386 port
and the x86_64 port. XXX some files should be distinct.
2001-06-19 00:26:29 +00:00
fvdl d27b141b4e Use arch/i387 for x86_64. 2001-06-19 00:25:36 +00:00
aymeric 839708d0cf revert previous (obviously wrong) change 2001-05-26 16:49:58 +00:00
aymeric 4d029c3f35 Make this compile when _USE_WRITE is defined 2001-05-22 08:31:27 +00:00
wiz 7d69dd4748 Fix date and (missing) punctuation. 2001-04-11 18:20:37 +00:00
bjh21 fe6fa58436 Add support for ARM VFP-format doubles, conditional on __VFP_FP__. 2001-02-21 18:09:25 +00:00
bjh21 b2ffea9b75 __arm26__ || __arm32__ -> __arm__
Not least because the unified NetBSD/arm compiler probably won't predefine
__arm26__ or __arm32__.
2001-02-09 18:38:32 +00:00
christos fe98f4b896 remove redundant declarations; use __MATH_PRIVATE__ to override math.h
declarations.
2001-01-06 00:15:00 +00:00
kleink 26c512aade Make these idempotent as far as the FPU register stack is concerned. 2000-09-26 07:28:23 +00:00
matt 94827a09a3 Well, duh! Use indexed addressing since that's why it's there. That way
the code is PIC.  (mmm.  linker warning's about non-PIC code).
2000-07-14 22:26:15 +00:00
matt 584a2f53ee Clean up & prepare for ELF. Don't define isnan since it's in libc. Add a
powf (really a wrapper for pow).
2000-07-14 04:50:58 +00:00
is 7c1da7b0c9 Regenerate, after changing internal label used for linkage to the wrapper
scripts.
2000-05-16 19:07:35 +00:00
is 9ba8ffc293 Change libm-68060 internal, but file external labels (used for linkage between
wrapper functions and the Motorola code) to guarantee consistent protection
of the user namespace.
2000-05-16 19:05:37 +00:00
is 287de693da Regenerated files after this change:
Move each wrapper function to its own source file, such that redefining one
function doesn't give link errors when another one is pulled in from the
library.
Problem discovered by Klaus Klein.
2000-05-12 20:11:11 +00:00
is 183dfce153 Move each wrapper function to its own source file, such that redefining one
function doesn't give link errors when another one is pulled in from the
library.
Problem discovered by Klaus Klein.
2000-05-12 20:08:04 +00:00
bjh21 6c97e2bd78 Initial commit of arm26 port 2000-05-09 21:55:44 +00:00
is 97df1401a1 Move original Motorola files to the "dist" subdirectory, in response
to PR 9626 by Kris Shannon.
2000-04-14 20:24:29 +00:00
kleink 0c766839fc G/c label orphaned since rev. 1.6. 2000-01-31 18:28:49 +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
christos e133a9e685 Makefile and shared library for libm387. 1999-12-13 09:36:29 +00:00
enami 82d7115cf2 Don't pass so many args to .Nd macro. It just overflows. 1999-11-19 01:12:39 +00:00
thorpej bebf6897b4 Add register prefixes. 1999-11-10 16:45:33 +00:00
thorpej 627a762f23 Regen; add register prefixes. 1999-11-10 16:34:56 +00:00
thorpej c958703527 Add register prefixes. 1999-11-10 16:32:45 +00:00
simonb 72ccb213b7 Remove SCCS revision line from the middle of the copyright - the version
info is still in the usual place after the "THIS SOFTWARE IS..." blurb.
1999-09-10 06:28:10 +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 2dc451b448 *gamma* need k_sin*/k_cos* 1999-08-22 08:25:42 +00:00
is 3f2d2fc0e5 Copied from mc68881/s_rint.S,v 1999-08-21 21:26:40 +00:00
is 455f7bb90c Copied from mc68881/s_floor.S,v 1999-08-21 21:26:28 +00:00
is c78325ae61 Copied from mc68881/s_ceil.S,v 1999-08-21 21:26:16 +00:00
is c81875b78b Copied from mc68881/s_finite.S,v 1999-08-21 21:25:40 +00:00
is 11d34cdce5 Copied from mc68881/s_copysign.S,v 1999-08-21 21:24:46 +00:00
is 9e6d62796f wrap lines in Makefile.list 1999-08-21 21:04:17 +00:00
is a33bf8cb4b Clarify instructions 1999-08-21 20:50:21 +00:00
is 9f72d71dcd Same reason as for ldexp.S: most applications don't scale 0.0. 1999-08-21 17:29: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
is 8c65b3f672 Motorola floating point library support package based architecture dependent
code for libm - generated files. Currently, easy functions only.
1999-08-19 21:43:52 +00:00
is 00c9560d0c Motorola 68060 floating point library support package based architecture
dependent code for libm. Currently, easy functions only.
1999-08-19 21:41:35 +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 9ef6f05359 G/C this copy of <math.h> in favor of the version found in basesrc/include,
which is actually the one installed.  The latter (which is derived from this
file) has evolved since, and the argument that it is exlusively associated
with libm (and thus should be installed from this directory) no longer holds
since two interfaces (isinf() and isnan()) are part of libc these days.
1999-08-16 21:13:16 +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
kleink 58bbec2442 Make these SVR4 ABI ready. 1999-08-15 18:45:18 +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
garbled 38c96853cf Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Wheee!
1999-03-22 19:44:33 +00:00
abs edc1a24a56 Add a note to update src/distrib/sets/lists/base/shl.*, and add a missing
RCS Id.
1999-02-25 08:02:19 +00:00
he 04d7a85c7b NOLINT -> MKLINT=no. 1999-02-15 09:33:41 +00:00
hubertf 36f9d7790a RCS ID police 1999-02-15 04:03:03 +00:00
christos 956c293b6d Mention cabsf, and explain struct complex usage. 1999-01-31 19:38:00 +00:00
kristerw 14e0e5307d The scalb* functions left data on the floting point register stack.
Remove it before leaving the function.

The solution is taken from OpenBSD.
1999-01-02 05:15:40 +00:00
kristerw 0a31df6329 Fix a typo. 1999-01-02 01:11:55 +00:00
mycroft 0298a4dd05 Use __arm32__, not arm32, for egcs. 1998-11-24 09:25:30 +00:00
matt 5bf0199231 Fix PIC code and fix problem with obj dirs. 1998-11-11 15:26:14 +00:00
ragge 4380475d73 Fixe some forgotten vax -> __vax__ changes. 1998-11-08 19:29:34 +00:00
matt 93bbcb05b4 Add .type _sym,@foo for shared libraries 1998-10-31 02:06:01 +00:00
matt c34b7ca182 vax --> __vax__ (also egcsify the code; missing ints, braces, etc.) 1998-10-20 02:26:09 +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
lukem ce83c69e00 first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
1998-08-29 08:32:32 +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
thorpej 08c09aef0c Add some braces to make egcs happy. (This code could kill me.) 1998-08-19 00:45:36 +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
fair b54911c568 fix mdoc reference 1998-04-29 01:42:03 +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
perry 312aca536f add LIBRARY section to man page 1998-02-05 18:45:17 +00:00
perry 4e067afcb1 RCS Id Police. 1998-01-09 03:15:09 +00:00
perry 93db5caa95 RCSID Police. 1998-01-05 07:41:06 +00:00
mrg 6be07a674c add missing .Nm calls and MLINKS. from spz@serpens.swb.de 1997-11-12 00:47:32 +00:00
veego c4a0e6d765 Fix a brain error from luke while he WARNSifyed libm.
Erik Bertelsen found the missplaced brakes.
1997-11-11 22:34:01 +00:00
mycroft 219751628c Nuke trailing comma in SEE ALSO section. 1997-11-01 06:42:53 +00:00
lukem 69c06ad713 use CPPFLAGS instead of CFLAGS 1997-10-23 02:41:28 +00:00
ragge 04195f0e89 Fix a bunch of warnings introduced by more flags to cc. 1997-10-20 14:11:35 +00:00
mikel c7534c9f97 kill tab on line by itself, keep contents within 80 columns 1997-10-18 05:34:11 +00:00
is 7c9cfab805 Same reason as for ldexp.S: most applications don't scale 0.0. 1997-10-10 10:40:40 +00:00
lukem 118c71a6fa rcsid facism, WARNSify 1997-10-09 11:34:16 +00:00
lukem 41f0dee6a6 rcsid facism, WARNSify 1997-10-09 11:33:05 +00:00
lukem 61187201c6 rcsid facism, WARNSify 1997-10-09 11:31:07 +00:00
lukem dd7adfbf0c rcsid facism, WARNSify 1997-10-09 11:27:48 +00:00
lukem bee8515057 rcsid facism, WARNSify 1997-10-09 11:26:55 +00:00
mikel 5982e278af comment out reference to missing FORTRAN math lib; PR 4153 1997-09-28 06:24:45 +00:00
jtc 990a11b9c6 Fix files using old TNF copyright notice 1997-07-30 23:53:32 +00:00
jtc 9088826695 Removed confusing text which implies that gamma() computes the gamma
instead of log gamma function.  This was true with 4.4BSD's libm, but
they are equivalent on all other systems (XPG4.2 requires this).
1997-07-25 20:41:18 +00:00
kleink 899eb5a41b Add missing standards conformance statements. 1997-07-14 23:23:47 +00:00
mikel 1b973c5082 add parens for gcc -Wall 1997-06-20 07:42:01 +00:00
mikel ee7c998913 add isnan(3) and isinf(3) to table, replacing obsolescent infnan(3);
from Jon Buller in PR lib/3488.
also added some more functions to table and corrected xrefs.
1997-04-18 07:41:16 +00:00
christos af726e9c88 PR/3405: Krister Walfridsson: Various typos; since we compile with POSIX
libm, we should not xref matherr(3), and describe the errno settings.
1997-03-29 23:10:55 +00:00
cgd f4543b19b0 force NOLINT on the Alpha, at least until we fix FP underflow/denorm handling 1996-12-19 08:03:40 +00:00
christos b47990743d <machine/endian.h> -> <sys/types.h> 1996-10-13 00:05:33 +00:00
christos bba370bbe9 remove inclusion of <machine/endian.h> 1996-10-13 00:04:56 +00:00
ragge 1ef19c7c74 Non-IEEE assembler files wasn't handled correctly. Trouble pointed out by
Robin Birch, fix by Mats O Jansson/Christos Zoulas.
1996-10-12 18:32:38 +00:00
thorpej caae5cd93d Use <machine/asm.h> 1996-08-13 17:00:28 +00:00
explorer a9347d2469 Fix description of ceil(3). Closes pr lib/2690 1996-08-12 22:39:34 +00:00
thorpej 688ff1ddf9 Correct think-o; this is an assembler source file (and the Makefile
expected as such).
1996-07-08 03:27:25 +00:00
jtc ca7561ba59 Fix typo 1996-07-06 00:15:45 +00:00
explorer 7e4136b303 Add a continuation slash in the commented-out i387 section 1996-07-05 22:26:51 +00:00
jtc 9fc92b384e Add new i387 math functions to ARCH_SRCS 1996-07-03 18:02:43 +00:00
jtc a5e2dfa95f use one less fp stack slot 1996-07-03 17:31:28 +00:00
jtc 0ab3a0b137 It's necessary to use 64 bit precision to avoid errors in the least
significant bit(s) (for some operands).
1996-07-03 17:27:34 +00:00
jtc 88420f2e4d this simple adaptation exp() does not work 1996-07-03 17:20:16 +00:00
jtc 5f9accdf53 Assembly versions of expf(), logf(),log10f(), scalbf(), expm1() and expm1f(). 1996-07-03 16:50:20 +00:00
jtc 991d9c139a we don't need to branch 1996-06-26 14:44:05 +00:00
jtc 6f5348dbbd Enable mc68881 version of fmod 1996-06-26 14:39:49 +00:00
jtc 3a2de776bf add m68881 specific fmod() 1996-06-26 14:36:14 +00:00
jtc 6655b8bb1f enable alpha-specific libm files 1996-06-26 07:38:42 +00:00
jtc c13e010e3c Alpha versions of copysign() and copysignf() 1996-06-26 07:29:59 +00:00
jtc 5743dc5d7a Fix from Bruce Evans. Commited to FreeBSD earlier this month, but was
never forwarded to me :-(.

> Clean up the FP stack before returning.  The i387 exp() leaked an FP
> register on its first call.  Subsequent calls reused the register so
> the leak didn't accumulate.
1996-06-25 02:07:09 +00:00
jtc 84fc678011 Use setne instead of setnel, new versions of gas balk at the bad mnemonic.
Wrong mask was used in s_finitef.S.
1996-06-04 18:00:34 +00:00
mark ce67b636ad Get the word order of doubles correct for the arm32 port.
Note: The arm32 port is little endian except for the FP word order.
1996-05-07 20:26:07 +00:00
phil d9f99fc936 Removing a "volatile" put there for the ns32k which is no longer needed. 1996-04-08 15:43:41 +00:00
jtc 3bf9d01bf7 infnan(3) no longer exists. 1996-03-30 01:33:59 +00:00
jtc ee341062c6 Changed 3m to 3. There is no 3m manpage section. 1996-03-30 01:28:55 +00:00
jtc 977400602b Changed w_gamma.c, w_gamma_r.c, w_gammaf.c, w_gammaf_r.c to call
__ieee754_lgamma_r or __ieee754_lgammaf_r.
Removed e_gamma.c, e_gamma_r.c, e_gammaf.c, e_gammaf_r.c, e_lgamma.c,
e_lgamma_f.c.
1995-11-20 22:06:19 +00:00
pk 26646c7969 Setup stack-frame correctly (same as s_ilogb.S). 1995-10-22 20:32:43 +00:00
jtc e2143cf975 Fix from Jochen Pohl, i387 version of ilogb didn't set up the stack
frame correctly (PR #1590).
1995-10-12 15:53:09 +00:00
ragge a6a78ddeb9 Got Makefile to understand to use non-IEEE files on vax systems. 1995-10-10 23:43:31 +00:00
ragge d76e5e0af8 Machine specific math library files for vax. 1995-10-10 23:40:21 +00:00
ragge 25d43745af Machine independent math library files for non-IEEE architectures. 1995-10-10 23:36:31 +00:00
jtc c1c8f42080 Changed core routines to call __ieee754_sqrt() instead of sqrt(). I
reported this enhancement to fdlibm-comments, and got the following
reply:

Date: Thu, 11 May 1995 14:35:25 -0700
From: Kwok.Ng@Eng.Sun.COM (KC Ng)
To: fdlibm-comments@sunpro.Eng.Sun.COM, jtc@cygnus.com
Subject: Re: fdlibm 5.2: why do core functions use sqrt?

> I noticed that core (e_*.c) fdlibm functions like __ieee754_acos()
> ensure that they call sqrt() with arguments in range (x > 0), when
> they could call __ieee754_sqrt() directly.
>
> Since sqrt() does a lot more work (verifies x is in range, etc.) is
> there any reason for this?  I'd think that calling __iee754_sqrt()
> would be more appropriate.  ....

You are right. __ieee754_sqrt should be in use with e_*.c.
1995-05-12 04:57:13 +00:00
jtc 9ae90685f2 Winning Strategies has placed this code in the public domain. 1995-05-11 23:03:44 +00:00
jtc d042a3eb20 Id -> NetBSD 1995-05-10 20:44:22 +00:00
jtc 5abf82e236 Id -> NetBSD 1995-05-08 23:55:16 +00:00
jtc 0898887210 Id -> NetBSD 1995-05-08 23:44:37 +00:00
jtc 750e07c91c i387 float version of atan2() 1995-05-08 23:35:10 +00:00
jtc 11fa45b258 Add i387 "float" functions to the makefile 1995-05-03 20:42:23 +00:00
jtc 684161edae Added i387 remainderf and sqrtf 1995-05-03 14:47:35 +00:00
jtc 5c7208348c Winning Strategies has placed this code into the Public Domain 1995-04-28 22:43:31 +00:00
jtc 5e5fe216ab removed log2 from manpage, libm doesn't provide that function. 1995-04-27 18:21:43 +00:00