Commit Graph

355 Commits

Author SHA1 Message Date
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 a82b6826f5 replace the last cast through void* by the SET_FLOAT_WORD macro, inspired
by a similar change in FreeBSD
2007-08-21 20:12:27 +00:00
drochner 58960d86a5 Adopt an (older) fix from FreeBSD: using ceil() on values in (0,0.5]
leads to loss of precision, leading to rounding into the wrong direction
for the case 0.5-epsilon. use floor() instead.
This also fixes a wrong sign of zero returned with non-default rounding
directions.
2007-08-21 20:10:27 +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 b36bcf93ef make the hypot/atan2 functions weak aliases, because they are used
internally by the historical cabs(), and the future c99 cabs/carg
2007-08-10 21:20:35 +00:00
matt ec31ca5aa4 Mark some internal libm symbols as hidden 2007-04-19 00:37:20 +00:00
matt ae3ada32fe Make the internal __libm_dsqrt_r6 have a fake entry mask of 0 to make
ld.elf_so.
2007-04-18 04:46:13 +00:00
drochner 7fc72a801d remove references to old cabs() 2007-02-26 12:10:56 +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
hubertf 55ac93d329 Remove more duplicate #includes, and a few spurious whitespaces at EOL
From Slava Semushin <slava.semushin@gmail.com>
2007-01-17 23:24:22 +00:00
wiz 4b19648772 s/greatful/grateful/, from Zafer. 2006-11-24 21:15:54 +00:00
drochner d81b3ce220 make an intermediate float variable "volatile" on i386 to work around a gcc
optimization problem: subsequent add/subs were done inside FPU registers,
with "double" precision, without rounding to "float" in between
2006-08-01 20:14:35 +00:00
matt d882b4c815 Rather than cast everything around (which upsets gcc4), use a union instead. 2006-07-08 00:28:21 +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
wiz e4293af91f Sort SEE ALSO, bump date for previous. 2006-04-04 20:26:33 +00:00
drochner 75d99205fc we don't have FE_TOWARDZERO (yet), refer to FP_RZ instead 2006-03-31 12:17:41 +00:00
xtraeme 500730a394 Mention trunc(3), reminded by kjk. 2006-03-26 02:02:38 +00:00
kleink f4003bf348 Add LIBRARY. 2006-03-25 22:18:40 +00:00
uwe 2660f98628 Uncomment crossreference to round(3), we do have one. 2006-03-25 20:03:06 +00:00
uwe 0b2a86e51d Uncomment crossreference to trunc now that we have it. 2006-03-25 20:01:36 +00:00
xtraeme 3e96ddc120 Add __RCSID(), u_intX_t -> uintX_t.
cvs: ----------------------------------------------------------------------
2006-03-25 16:55:53 +00:00
xtraeme f1336fbda3 Add trunc() and truncf() C99 functions, from FreeBSD. 2006-03-25 16:41:11 +00:00
drochner b0f21ee1ea merge libc/arch/{i386,x86_64}/gen/modf.S into one
(not quite a merge actually, just an #ifdef for now)
and build it in the i386 case (amd64 should work, just needs to be tested)
That way, a program linking against libm should get the optimized
version as expected.
2006-03-22 20:45:58 +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
drochner 0e514dc492 The second argument is not a float, so the "abi.h" abstraction
doesn't work.
Open-code the argument handling instead.
Should fix the ldexp() bug reported by Brendon Costa in port-amd64.
2006-03-21 11:35:21 +00:00
christos cd35252882 Use float constants! 2006-03-19 20:54:15 +00:00
christos a42e5c8db9 Coverity CID 562: Flip the order of the if statement to prevent unreachable
code.
2006-03-19 20:46:25 +00:00
christos fef1370818 Coverity CID 572: Comment out dead code. 2006-03-19 20:42:44 +00:00
christos 15da190f2c Coverity CID 573: Comment out unreachable code. 2006-03-19 20:41:24 +00:00
christos 4696019f20 Coverity CID 574: Unreachable code due to incorrect constants. Correct
constants according to the comments in the code, and add more comments.
2006-03-19 20:39:48 +00:00
christos 3511ea5c9b Coverity CID 575: comment out dead code. 2006-03-19 20:15:07 +00:00
wiz ca5de9d73f Bump date for previous. 2006-03-15 22:09:06 +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
kleink 0d57b38925 Note roundf() in STANDARDS, too. 2006-01-24 16:39:45 +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 e08ae477d9 Oops - round() is supposed to return double, not integer. 2006-01-17 10:39:23 +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
drochner 7ad8526195 activate e_atan2f.S which was there forever but not built, noticed
by Joerg Sonnenberger
2005-07-28 17:55:19 +00:00
rpaulo fcfde3ffb8 Bump minor version for log2{,f}. 2005-07-21 22:49:16 +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
wiz d957cc9d17 Punctuation fixes, bump date for log2{,f}. 2005-07-21 12:58:22 +00:00
christos e5c18e58f2 Add log2 and log2f from FreeBSD PR 83845 2005-07-21 12:55:58 +00:00
matt cedcd39661 Don't cast x to double, it already is one. 2005-05-03 04:18:32 +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