Commit Graph

326 Commits

Author SHA1 Message Date
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
drochner
b774d2ae7d add licenses 2004-10-13 15:18:31 +00:00
drochner
458288a626 pull in an accuracy fix for corner cases from FDLIBM 5.3
(affects large arguments which are close to N*Pi+Pi/2):
    2. k_tan.c error was > 1 ulp target for FDLIBM
        5.2: Worst error at least 1.45 ulp at
        tan(1.7765241907548024E+269) = 1.7733884462610958E+16
        5.3: Worst error 0.96 ulp
2004-07-22 18:24:09 +00:00
drochner
c351eda960 amd64: stack sanity, leave the return PC alone 2004-07-16 18:40:24 +00:00
junyoung
ffb3101064 round(3) and roundf(3) appeared in 2.0.
Bump date.
2004-07-15 12:12:39 +00:00
wiz
f46be40b71 Move RCS Id to top of file; comment out reference to trunc(3),
which we do not have.
2004-07-10 14:11:18 +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
3e7f9e1481 allocate stack space for temporary storage 2004-07-02 10:17:23 +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
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