aboutsummaryrefslogtreecommitdiff
path: root/lib/msun
Commit message (Collapse)AuthorAgeFilesLines
* MFC rev 1.64. Rev 1.51.2.3 claimed to be an MFC of 1.53, 1.55, 1.56,David Schultz2005-09-121-1/+1
| | | | | | | | | 1.59, 1.60, 1.62, and 1.64, but I left out 1.64. Reported by: asmodai@ Notes: svn path=/stable/5/; revision=150068
* MFC s_ceill.c 1.2 and s_floorl.c 1.2:Stefan Farfeleder2005-06-102-14/+24
| | | | | | | | Fix raising the inexact exception (FE_INEXACT) if the result differs from the argument. Notes: svn path=/stable/5/; revision=147275
* MFC rev 1.1, 1.2:David Schultz2005-05-311-1/+1
| | | | | | | | | More optimized math functions. Prevent these functions from using stack outside of their frame. Notes: svn path=/stable/5/; revision=146848
* MFC rev 1.2:David Schultz2005-05-312-10/+10
| | | | | | | Prevent these functions from using stack outside of their frame. Notes: svn path=/stable/5/; revision=146847
* This commit was manufactured by cvs2svn to create branch 'RELENG_5'.cvs2svn2005-05-101-0/+26
| | | | Notes: svn path=/stable/5/; revision=146069
* MFC math.h,v 1.57:David Schultz2005-03-291-1/+2
| | | | | | | | | | Add missing prototypes for fma() and fmaf(), and remove an inaccurate comment. Approved by: re Notes: svn path=/stable/5/; revision=144269
* MFC fenv.h,v 1.3:David Schultz2005-03-291-1/+1
| | | | | | | | | Work around a gcc bug. Approved by: re Notes: svn path=/stable/5/; revision=144268
* MFC:Christian Brueffer2005-03-012-16/+16
| | | | | | | | | Markup nits. Original revisions by: ru Notes: svn path=/stable/5/; revision=142928
* Combined MFC of roughly 1300 lines of man page updates.David Schultz2005-03-0121-813/+647
| | | | Notes: svn path=/stable/5/; revision=142865
* MFC Makefile,v 1.53David Schultz2005-03-011-32/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add and document ilogbl(), a long double version of ilogb(). MFC Makefile,v 1.55 Hook up and document floorl(). MFC Makefile,v 1.56 Implement and document ceill(). MFC Makefile,v 1.59 Add fma() and fmaf(), which implement a fused multiply-add operation. MFC Makefile,v 1.60 - Move the functions presently described in in ieee(3) to their own manpages. They are not very related, so separating them makes it easier to add meaningful cross-references and extend some of the descriptions. - Move the part of math(3) that discusses IEEE 754 to the ieee(3) manpage. MFC Makefile,v 1.62 Move machine-dependent crud to its own makefile. MFC Makefile,v 1.64 Un-document the non-extant exp10() and exp10f() functions. exp10() was a casualty of the transition away from the VAX. Notes: svn path=/stable/5/; revision=142863
* MFC Makefile.inc,v 1.1 e_sqrt.S,v 1.1 e_sqrtf.S,v 1.1David Schultz2005-03-012-4/+4
| | | | | | | | | Use hardware instructions for sqrt() and sqrtf(). In RELENG_5, these are called __ieee754_sqrt() and __ieee754_sqrtf(). Notes: svn path=/stable/5/; revision=142862
* MFC e_sqrt.S,v 1.1 s_llrint.S,v 1.1 s_lrint.S,v 1.1David Schultz2005-03-011-1/+1
| | | | | | | amd64 assembly versions of sqrt(), lrint(), and llrint() using SSE2. Notes: svn path=/stable/5/; revision=142860
* MFC s_cosf.S,v 1.2 s_sinf.S,v 1.2 s_tanf.S,v 1.2David Schultz2005-03-013-46/+0
| | | | | | | | | Remove the float versions of the i387 trig functions obtained from NetBSD. They're buggy, particularly for inputs larger in magnitude than 2**63. Notes: svn path=/stable/5/; revision=142859
* MFC e_atan2.S,v 1.8 s_atan.S,v 1.7 e_atan2f.S,v 1.3David Schultz2005-03-011-44/+0
| | | | | | | | | Remove the i387 versions of atan(), atan2(), and atan2f(). They are slower than the MI routines on modern hardware, except for degenerate cases such as the Pentium 4. Notes: svn path=/stable/5/; revision=142858
* MFC e_acos.S,v 1.9 e_asin.S,v 1.9David Schultz2005-03-012-111/+0
| | | | | | | | | Remove i387 versions of asin() and acos(). Although the hardware instruction was faster on the 486, it's slower than our MD version on modern processors. Notes: svn path=/stable/5/; revision=142857
* MFC s_nextafter.c,v 1.8 s_nextafterf.c,v 1.8David Schultz2005-03-012-2/+2
| | | | | | | | | | | | If x == y, return y, not x. C99 (though not IEEE 754) requires that nextafter(+0.0, -0.0) returns -0.0 and nextafter(-0.0, +0.0) returns +0.0. MFC s_nextafter.c,v 1.9 s_nextafterf.c,v 1.9 Update comment to reflect the code change in the previous revision. Notes: svn path=/stable/5/; revision=142853
* MFC s_ilogb.c,v 1.9 s_ilogbf.c,v 1.7David Schultz2005-03-012-6/+13
| | | | | | | | Use the FP_ILOG macros from <math.h> rather than hardcoded return values. Also be prepared for FP_ILOGBNAN != INT_MAX. Notes: svn path=/stable/5/; revision=142851
* MFC math.h,v 1.45David Schultz2005-03-011-34/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add and document ilogbl(), a long double version of ilogb(). MFC math.h,v 1.47 Whitespace nit. MFC math.h,v 1.48 Implement floorl(). MFC math.h,v 1.49 Implement and document ceill(). MFC math.h,v 1.51 Set math_errhandling to MATH_ERREXCEPT. Now that we have fenv.h, we basically support this, subject to gcc's lack of FENV_ACCESS support. In any case, the previous setting of math_errhandling to 0 is not allowed by POSIX. MFC math.h,v 1.53 Only annotate pure routines with __pure2. MFC math.h,v 1.54 Add fma() and fmaf(), which implement a fused multiply-add operation. Notes: svn path=/stable/5/; revision=142847
* MFC e_scalb.c,v 1.12David Schultz2005-03-011-5/+6
| | | | | | | Reduce diffs against vendor source (Sun fdlibm 5.3). Notes: svn path=/stable/5/; revision=142846
* MFC (partly): rev. 1.17 by ruChristian Brueffer2005-02-281-1/+1
| | | | | | | Fixed too many of "the" Notes: svn path=/stable/5/; revision=142836
* MFC:Christian Brueffer2005-02-283-11/+11
| | | | | | | | | Scheduled mdoc(7) sweep. Original revisions by: ru Notes: svn path=/stable/5/; revision=142749
* This commit was manufactured by cvs2svn to create branch 'RELENG_5'.cvs2svn2005-02-254-0/+80
| | | | Notes: svn path=/stable/5/; revision=142450
* This commit was manufactured by cvs2svn to create branch 'RELENG_5'.cvs2svn2005-02-0714-0/+918
| | | | Notes: svn path=/stable/5/; revision=141453
* MFC rev. 1.2:David Schultz2005-01-152-2/+2
| | | | | | | s/isnormal/isfinite/ so subnormals are rounded correctly. Notes: svn path=/stable/5/; revision=140336
* MFC fenv.h:1.2,1.3:David Schultz2005-01-151-4/+4
| | | | | | | Mark all inline asms as volatile. Notes: svn path=/stable/5/; revision=140335
* MFC fenv.h:1.2:David Schultz2005-01-154-6/+6
| | | | | | | Mark all inline asms as volatile. Notes: svn path=/stable/5/; revision=140334
* MFC s_log1p.S:1.8:David Schultz2005-01-151-55/+0
| | | | | | | Remove unused file. Notes: svn path=/stable/5/; revision=140333
* MFC Makefile:1.54,1.57:David Schultz2005-01-151-6/+11
| | | | | | | | Add single-precision x86-optimized math routines. Implement [l]lrint[f]() and [l]lround[f](). Notes: svn path=/stable/5/; revision=140332
* MFC math.h:1.44,1.46:David Schultz2005-01-151-2/+10
| | | | | | | | Allow math.h to compile with versions of icc prior to 8.0. Add MI implementations of [l]lrint[f]() and [l]lround[f](). Notes: svn path=/stable/5/; revision=140331
* MFC math.h:1.13,1.14,1.15,1.16:David Schultz2005-01-151-213/+216
| | | | | | | Various content and markup updates. Notes: svn path=/stable/5/; revision=140330
* MFC round.3:1.3,1.4:David Schultz2005-01-151-1/+3
| | | | | | | Cross reference lrint(3) and lround(3). Whitespace. Notes: svn path=/stable/5/; revision=140329
* MFC rint.3:1.11:David Schultz2005-01-151-0/+2
| | | | | | | Cross-reference lrint(3) and lround(3). Notes: svn path=/stable/5/; revision=140328
* MFC rev. 1.1:David Schultz2005-01-152-16/+16
| | | | | | | Implement [l]lrint[f]() and [l]lround[f](). Notes: svn path=/stable/5/; revision=140327
* This commit was manufactured by cvs2svn to create branch 'RELENG_5'.cvs2svn2005-01-1532-0/+956
| | | | Notes: svn path=/stable/5/; revision=140276
* This commit was manufactured by cvs2svn to create branch 'RELENG_5'.cvs2svn2004-10-241-0/+54
| | | | Notes: svn path=/stable/5/; revision=136863
* MFC: Bump of library version numbers for:Ken Smith2004-10-011-0/+1
| | | | | | | | | | | | | | | | | | | /lib/{libm,libreadline} /usr/lib/{libhistory,libopie,libpcap} Versions of effected files being MFC-ed from commit done to HEAD: Revision Changes Path 1.367 +15 -0 src/UPDATING 1.10 +1 -1 src/gnu/lib/libreadline/Makefile.inc 1.19 +1 -1 src/lib/libopie/Makefile 1.34 +1 -1 src/lib/libpcap/Makefile 1.52 +1 -0 src/lib/msun/Makefile Approved by: re (scottl) Notes: svn path=/stable/5/; revision=136030
* This commit was manufactured by cvs2svn to create branch 'RELENG_5'.cvs2svn2004-08-184-517/+0
| | | | Notes: svn path=/stable/5/; revision=133968
* Add man pages for the cimag(), conj() and creal() functions.Stefan Farfeleder2004-08-072-2/+107
| | | | Notes: svn path=/head/; revision=133289
* Only use rfs and wfs if ARM_HARD_FLOAT is defined, and use stubs if it is not,Olivier Houchard2004-08-051-2/+7
| | | | | | | | | in order to unbreak arm make world. The right way to do it with soft floats will be figured out later. Discussed with: das Notes: svn path=/head/; revision=133174
* Replace s_isnan.c and s_isnanf.c with the more compact s_isnan.c fromDavid Schultz2004-08-053-67/+53
| | | | | | | | | | libc. The externally-visible effect of this is to add __isnanl() to libm, which means that libm.so.2 can once again link against libc.so.4 when LD_BIND_NOW is set. This was broken by the addition of fdiml(), which calls __isnanl(). Notes: svn path=/head/; revision=133147
* Use isnormal() instead of fpclassify() to avoid dependency on libc.so.5.David Schultz2004-08-052-6/+2
| | | | Notes: svn path=/head/; revision=133146
* Work around known GCC 3.4.x problem and use ANSI prototype for dremf().Alexander Kabaev2004-07-281-2/+2
| | | | Notes: svn path=/head/; revision=132760
* Fix two bugs in the signbit() macro, which was implemented last year:David Schultz2004-07-194-4/+124
| | | | | | | | | | | - It was added to libc instead of libm. Hopefully no programs rely on this mistake. - It didn't work properly on large long doubles because its argument was converted to type double, resulting in undefined behavior. Notes: svn path=/head/; revision=132382
* Fix minor namespace pollution: The prototypes for f{dim,max,min}(),Stefan Farfeleder2004-07-171-6/+6
| | | | | | | | nearbyint(), round() and trunc() shouldn't be visible when compiling with -D_XOPEN_SOURCE=500. Notes: svn path=/head/; revision=132292
* Tweak the conditions under which certain gcc builtins are used:David Schultz2004-07-161-2/+2
| | | | | | | | | | | | | | | - Unlike the builtin relational operators, builtin floating-point constants were not available until gcc 3.3, so account for this.[1] - Apparently some versions of the Intel C Compiler fallaciously define __GNUC__ without actually being compatible with the claimed gcc version. Account for this, too.[2] [1] Noticed by: Christian Hiris <4711@chello.at> [2] Submitted by: Alexander Leidinger <Alexander@Leidinger.net> Notes: svn path=/head/; revision=132246
* Remove the declaration of isnan() from this file. It is no longerDavid Schultz2004-07-092-6/+0
| | | | | | | needed as of math.h v1.40, and its prototype is incorrect here. Notes: svn path=/head/; revision=131865
* Implement the classification macros isfinite(), isinf(), isnan(), andDavid Schultz2004-07-094-7/+146
| | | | | | | | | | | | | | | | | | | | | | | | isnormal() the hard way, rather than relying on fpclassify(). This is a lose in the sense that we need a total of 12 functions, but it is necessary for binary compatibility because we have never bumped libm's major version number. In particular, isinf(), isnan(), and isnanf() were BSD libc functions before they were C99 macros, so we can't reimplement them in terms of fpclassify() without adding a dependency on libc.so.5. I have tried to arrange things so that programs that could be compiled in FreeBSD 4.X will generate the same external references when compiled in 5.X. At the same time, the new macros should remain C99-compliant. The isinf() and isnan() functions remain in libc for historical reasons; however, I have moved the functions that implement the macros isfinite() and isnormal() to libm where they belong. Moreover, half a dozen MD versions of isinf() and isnan() have been replaced with MI versions that work equally well. Prodded by: kris Notes: svn path=/head/; revision=131852
* Define the following macros in terms of [gi]cc builtins when theDavid Schultz2004-07-091-0/+29
| | | | | | | | | | | | | | | | | | | | | builtins are available: HUGE_VAL, HUGE_VALF, HUGE_VALL, INFINITY, and NAN. These macros now expand to floating-point constant expressions rather than external references, as required by C99. Other compilers will retain the historical behavior. Note that it is not possible say, e.g. #define HUGE_VAL 1.0e9999 because the above may result in diagnostics at translation time and spurious exceptions at runtime. Hence the need for compiler support for these features. Also use builtins to implement the macros isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), and isunordered() when such builtins are available. Although the old macros are correct, the builtin versions are much faster, and they avoid double-expansion problems. Notes: svn path=/head/; revision=131851
* Add C99's nearbyint{,f}() functions as wrappers around rint().David Schultz2004-07-064-6/+94
| | | | | | | | | | These trivial implementations are about 25 times slower than rint{,f}() on x86 due to the FP environment save/restore. They should eventually be redone in terms of fegetround() and bit fiddling. Notes: svn path=/head/; revision=131676
* Eliminate double whitespace.Ruslan Ermilov2004-07-033-7/+7
| | | | Notes: svn path=/head/; revision=131539