summaryrefslogtreecommitdiffstats
path: root/lib/libm/src/ld128
AgeCommit message (Collapse)AuthorFilesLines
2020-11-07Fix ilogb(3) implementation. The results have to match FP_ILOGB0 andkettenis1-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@
2018-03-10Implement sicos(3), sincosf(3) and sincosl(3). These functions are commonkettenis1-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@
2016-09-12Reduce libm's exports and make internal calls go direct.guenther14-8/+23
All dependencies on libc are now via reserved/standardized names. ok kettenis@ millert@ deraadt@
2016-09-12Per fpclassify(3): isinff(), isnanf(), finite(), and finitef() are deprecatedguenther1-2/+2
in favor of isinf(), isnan(), and isfinite(). ok tb@ martynas@
2014-07-21Switch from <sys/endian.h> or <machine/endian.h> to the new,guenther1-2/+1
being-standardized <endian.h> ok deraadt@ millert@ beck@
2014-02-11Make floor round to integral value less than x, when x is tiny.martynas1-3/+4
Reported by dcoppa@, thanks! OK kettenis@, dcoppa@.
2013-11-12Declare __p1evll and __polevll protos in math_private.h instead ofmartynas1-3/+3
redeclaring each time in ld{80,128}. Pointed out by theo.
2013-03-28Switch libc and libm to use strong aliases rather than weak aliasesmartynas1-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@.
2012-12-05Remove excessive sys/cdefs.h inclusionderaadt4-16/+0
ok guenther millert kettenis
2011-07-20- Make constants const.martynas2-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.
2011-07-09Make the zero condition properly raise the exception and return.martynas1-1/+2
2011-07-08signbitl -> signbit.martynas1-2/+2
2011-07-06Finalize work on the math library. It's time to do this monstermartynas27-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.
2008-12-09- 80-bit and quad precision trigonometric and other mostmartynas7-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@