Commit Graph

110 Commits

Author SHA1 Message Date
nakayama 88e42b609b Add fenv support for sparc. Mostly copied from sparc64 and share with it. 2011-05-20 21:42:48 +00:00
jruoho 881e57fce3 Remove trailing '\'. 2011-05-10 09:07:51 +00:00
jruoho 31061e207a Split out the ilogb(3) family out of ieee(3) and properly document it. 2011-05-10 06:38:33 +00:00
jruoho e77640da5b Merge floor(3) to ceil(3). 2011-04-16 05:48:50 +00:00
jruoho 9d56ec39d7 Split out from ieee(3) also the remainder(3) and copysign(3) families. 2011-04-13 04:57:10 +00:00
jruoho 9305ee0c33 Split the nextafter(3) family of functions to their own page and properly
document these.
2011-04-12 07:29:50 +00:00
christos e60f59b973 remquo{,f} from FreeBSD via Stathis Kamperis 2011-02-06 00:44:08 +00:00
christos ae8a4fc798 not everyone has fenv.c, pointed by Havard Eidnes 2011-01-31 15:06:01 +00:00
christos 17b8402a39 fenv support for sparc64 from Stathis Kamperis 2011-01-31 00:19:33 +00:00
joerg 0e4ac962b5 Remove NOMANDOC, the documents are at least parsed somewhat sensible. 2011-01-12 23:03:55 +00:00
jakllsch cfb57741fb Imlementations of fmax, fmaxf, fmin and fminf libm functions for VAX. 2011-01-09 02:32:13 +00:00
abs eb439bf1a7 Add noieee versions for lround(), lroundf(), lrint(), lrintf(),
llrint() and llrintf().  Code copied from round(), roundf() and
rint() and modified for return values.  Its possible this may not
do the right things in edge cases, but if so its likely to have
the same issues as the existing round(), roundf() and rint().

All this used by vax (only), and should allow xnest to complete
build.
2010-12-09 22:52:59 +00:00
christos e2a86dd3c7 Commit SoC long double support from Stathis Kamperis 2010-09-15 16:11:28 +00:00
drochner 2dcdd0a999 two disgusting hacks:
-mk/bsd.lib.mk picks up a .S asm file behind our back (did it do so
 always?). s_modf.S is incorrect; I'm undecided whether it makes sense
 to fix it, so add a stupid rule to enforce the .c file to be used.
-on i386, s_tanh.c gets miscompiled. It works with -O0, so add
 COPTS for exactly that file.
2010-08-10 17:53:08 +00:00
wiz 16b537c3d2 Fix typo in MLINKS, from Stathis Kamperis. Adapt set lists, and run
them through sort while there.
2010-08-07 18:12:45 +00:00
joerg 7f1183f226 Add support for fenv.h interface for i386 and amd64.
Submitted by Stathis Kamperis as part of GSoC 2010 and ported from
FreeBSD.
2010-07-31 21:47:52 +00:00
drochner d4def06880 -build ldexp/frexp/modf locally again rather than relying on libc
reaching over, to get things into a sane state,
-do the usual namespace protection game with scalbn(f) because it
 is used internally
(more symbol renamings are necessary)

The weak_alias change for mc68881 is untested.
2010-04-23 19:17:07 +00:00
mrg d5a3d97bc4 build s_frexp.c, s_ldexp.c and s_modf.c here for new platforms, since they
don't exist as compat functions in libc.

current list of new platforms: powerpc64.

from dennis.c.ferguson@gmail.com in PR#43042.  idea to not put compat
functions into new platforms from drochner@netbsd.
2010-03-29 06:59:42 +00:00
christos 5f7c431ef4 Add exp2 and exp2m 2010-01-11 16:28:39 +00:00
joerg d3ac1c4282 Disable the use of mandoc for now until support for conditional
expression exists.
2009-10-23 23:42:52 +00:00
christos 26573d8819 add f{min,max,dim}{,l,f} from FreeBSD 2009-10-04 22:04:30 +00:00
he fddc3457b2 Change the use of formally undocumented features, which have now been
made to fail.  Specifically, change
.ifdef(SYMBOL) -> .ifdef SYMBOL or .if defined(SYMBOL),
and corresponding for .ifndef.

Also correct one error in lib/libm/Makefile (.ifdef (${MKCOMPLEX} != "no")?!?).
2009-01-18 20:42:11 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
gmcgarry 396359b261 Check MKCOMPLEX variable to build complex support into libm. 2008-07-12 12:23:13 +00:00
ad 1b74c9b77c - Fold libm387 into libm.
- Leave libm387 as an empty shell.
2008-06-03 18:47:28 +00:00
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