Commit Graph

348 Commits

Author SHA1 Message Date
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 af7cf00a5a provide an assembler implementation of lrint() for i386 and amd64 2004-07-01 17:30:48 +00:00
drochner 9768ef916d bump libm minor version (functions added) 2004-07-01 16:14:18 +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 54e35f616a aboid to shift an int by more than 31 bits - behaviour is implementation
dependant in this case
2004-07-01 16:06:30 +00:00
drochner d45473e8a3 fic the <close-to-1>^<huge number> fix as in e_pow.c 2004-06-30 18:45:25 +00:00
drochner a6d8e4cf79 -fix a long-standing bug which affects the <close-to-1>^<huge number> case
(fixed in fdlibm-5.3)
-being here, sync with -5.3 as far as possible (There is another bugfix -
 sign in overflow/underflow cases -; this doesn't change anything for us
 because the wrapper (w_pow.c) fixes this up. Keep things in sync anyway
 to ease further maintainance.)
2004-06-30 18:43:15 +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
drochner dddd0e25a3 ANSIfy 2004-06-25 15:57:38 +00:00
mhitch a6d522d13c Add ceilf(), floorf(), and sqrtf() (as wrappers using ceil(), floor(), and
sqrt() repectively).  The fixes PR#22796.
2004-05-13 20:35:40 +00:00
wiz 848e689872 Typo fix, from skrueger at europe com. 2004-03-22 13:41:09 +00:00
jschauma 355765bffd Add a list of pre-defined values (such as pi, e etc.).
Ok by wiz@.
2003-12-03 23:31:21 +00:00
wiz fff16e7f65 Uppercase name; from Jared Yanovich via jmc@openbsd. 2003-11-02 11:17:16 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
wennmach be03f9bd59 Avoid the PIC dance. 2003-09-16 18:17:11 +00:00
fvdl 8eb02ce5c0 Make log1p and log1pf work in shared libraries again. 2003-09-14 21:26:14 +00:00
wennmach cf92bf760d Reimplement s_log1p.S and s_log1pf.S to use the fyl2xp1 instruction
where necessary.

The log1p() function is provided to compute an accurate value of
log(1 + x), even for tiny values of x. The i387 FPU provides the
fyl2xp1 instruction for this purpose.

However, since the range of the fyl2xp1 function is limited to
-(1 - (sqrt(2) / 2)) <= x <= sqrt(2) - 1
          (-0.292893 <= x <= 0.414214)
we need to check if the argument is in the valid range.

In order to reduce the cost for testing the range, we only use
fyl2xp1 if the argument is in the range
               -0.25 <= x <= 0.25
which can be checked with just one conditional branch.

Fixes PR lib/22599 by Ray Brownrigg.
2003-09-10 16:45:43 +00:00
agc eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
salo 99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
wiz fc7bf2b10c Nit fixes from jmc@openbsd. 2003-05-20 10:15:16 +00:00
wiz f0679cbc4d Restore \fR that got lost in last. 2003-05-01 09:36:49 +00:00
gmcgarry f72c56c419 Remove reference to non-existent infnan(3) function. 2003-05-01 08:01:52 +00:00
wiz 472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
perry ca9aafe282 bessel->Bessel, from Igor Sobrado in PR misc/19814 2003-03-31 18:47:42 +00:00
perry 896b16517d bessel->Bessel from Igor Sobrado PR misc/19814 2003-03-31 18:46:38 +00:00
matt 88dc468feb Fix some assembly botches. 2003-02-21 06:40:47 +00:00
wiz 617b132aac Spell output with two ts. 2003-01-04 23:43:02 +00:00
scw 69cddf09e6 Avoid a strict-alias warning. 2002-12-05 16:03:42 +00:00
wiz 71dd1ccd73 New sentence, new line. From Robert Elz. 2002-10-01 19:21:30 +00:00
lukem ec5dbc56b8 Explicitly move setting of NOxxx and USE_SHLIBDIR to the top of the
Makefile (before including <bsd.own.mk>)
2002-08-19 14:55:14 +00:00
lukem ebb6fc9eb8 Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc).
(Reduces make output by ~ 20%)
2002-08-19 09:41:27 +00:00
matt 778e246527 Add sinf/cosf. 2002-07-14 19:55:24 +00:00
matt 5ac19a376b Add finitef 2002-06-23 21:55:12 +00:00
matt 7a0238324a Add cosf/sinf. 2002-06-23 21:54:37 +00:00
wiz a81e53dde5 Remove unnecessary spaces. 2002-06-15 09:39:52 +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
matt f1009ecdff Ansify libm noieeesrc (for VAX). Also make const data really const.
libm for VAX can compiles with WARNS=2
2002-06-15 00:10:17 +00:00
wiz aa30599e06 __STDC__ is always defined on NetBSD. 2002-05-26 22:01:47 +00:00
thorpej 7c1988dc5f #if 0 one; it's not used. 2002-04-09 01:55:48 +00:00
thorpej b07be1ff9d #if 0 invsqrtpi; it's not used. 2002-04-09 01:55:13 +00:00
fvdl 059c5712b9 Fix mistake in previous. 2002-03-30 10:03:44 +00:00
fvdl edcf4b63ed Fix stack usage for temporary storage. From Stephen Ma in PR xsrc/15404. 2002-03-26 15:17:37 +00:00
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