summaryrefslogtreecommitdiffstats
path: root/lib/libm/src/ld128 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix ilogb(3) implementation. The results have to match FP_ILOGB0 andkettenis2020-11-071-0/+51
| | | | | | | | | | FP_ILOGBNAN which isn't the case for the amd64 and i386 assembly versions. Drop these in favour of C implementations. Als reimplement ilogbl(3) by providing separate ld80 and ld128 implementations that replace the existing implementation which may hit an infinite loop when built for quad-precision long double. ok patrick@, gkoehler@
* Implement sicos(3), sincosf(3) and sincosl(3). These functions are commonkettenis2018-03-101-0/+68
| | | | | | | extensions and modern compilers (such as clang) will use them to optimize separate calculations of sine and cosine. ok tom@, patrick@, deraadt@, jmc@
* Reduce libm's exports and make internal calls go direct.guenther2016-09-1214-8/+23
| | | | | | All dependencies on libc are now via reserved/standardized names. ok kettenis@ millert@ deraadt@
* Per fpclassify(3): isinff(), isnanf(), finite(), and finitef() are deprecatedguenther2016-09-121-2/+2
| | | | | | in favor of isinf(), isnan(), and isfinite(). ok tb@ martynas@
* Switch from <sys/endian.h> or <machine/endian.h> to the new,guenther2014-07-211-2/+1
| | | | | | being-standardized <endian.h> ok deraadt@ millert@ beck@
* Make floor round to integral value less than x, when x is tiny.martynas2014-02-111-3/+4
| | | | Reported by dcoppa@, thanks! OK kettenis@, dcoppa@.
* Declare __p1evll and __polevll protos in math_private.h instead ofmartynas2013-11-121-3/+3
| | | | redeclaring each time in ld{80,128}. Pointed out by theo.
* Switch libc and libm to use strong aliases rather than weak aliasesmartynas2013-03-281-1/+1
| | | | | | | | | | | where appropriate. Among other things makes the symbols consistent across all architectures (notably where ldbl mantissa is 53 bits). While at it, kill unused LINTLIBRARY/PROTOLIB1 cruft which was there to trick lint into recording the right prototypes for aliased functions. Most of the work done at the awesome n2k13 hackathon. Agreed by kettenis@, guenther@, matthew@.
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-054-16/+0
| | | | ok guenther millert kettenis
* - Make constants const.martynas2011-07-202-7/+7
| | | | | | - Fix aliasing issue in s_frexpf.c; spotted by gcc. Many other ones were fixed in NetBSD long ago, but this one was forgotten. It looks like recently they fixed it too.
* Make the zero condition properly raise the exception and return.martynas2011-07-091-1/+2
|
* signbitl -> signbit.martynas2011-07-081-2/+2
|
* Finalize work on the math library. It's time to do this monstermartynas2011-07-0627-0/+5359
| | | | | | | | | | | | | | | | | | commit, and deal with problems (if any) in tree. Note that this adds the following functions. Ports with hacks might need adjustments. nexttoward(3), fma(3), nexttowardf(3), fmaf(3), acoshl(3), asinhl(3), atanhl(3), coshl(3), sinhl(3), tanhl(3), expl(3), expm1l(3), logl(3), log10l(3), log1pl(3), log2l(3), modfl(3), cbrtl(3), hypotl(3), powl(3), erfl(3), erfcl(3), lgammal(3), tgammal(3), ceill(3), floorl(3), lrintl(3), llrintl(3), roundl(3), lroundl(3), llroundl(3), truncl(3), fmodl(3), remainderl(3), remquol(3), nextafterl(3), nexttowardl(3), fmal(3). With this commit, our library implements all functionality required by C99. Documentation bits will follow.
* - 80-bit and quad precision trigonometric and other mostmartynas2008-12-097-0/+940
important functions: acosl, asinl, atanl, atan2l, cosl, sinl, tanl, exp2l, frexpl, ilogbl, ldexpl, logbl, scalbnl, fabsl, hypotl, powl, sqrtl, rintl, copysignl, nanl, fdiml, fmaxl, fminl. mostly taken from freebsd, needed alot of changes to adapt. note, these are all c versions; and are quite slow when architectures have, e.g. sqrt. assembly versions will be added afterwards - make them .weak/__weak_alias to the double precision versions on other archs - no need to have two finites. finite() and finitef() are non-standard 3BSD obsolete versions of isfinite. remove from libm. make them weak_alias in libc to __isfinite and __isfinitef instead. similarly make 3BSD obsolete versions of isinf, isinff, isnan, isnanf weak_aliases to C99's __isinf, __isinff, __isnan, __isnanf - remove unused infinity.c. the c library has infinities for each supported platform - use STRICT_ASSIGN cast hack for _kernel_rem_pio2, so that the double version has a chance of working on i386 with extra precision - avoid storing multiple copies of the pi/2 array, since it won't vary - bump major due to removed finite/finitef. although they will be in libc, which anything is linked to, minor bump might be enough ok millert@. tested by sthen@, jsg@, ajacoutot@, kili@, naddy@