summaryrefslogtreecommitdiffstats
path: root/lib/libm/src/ld80 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix ilogb(3) implementation. The results have to match FP_ILOGB0 andkettenis2020-11-071-0/+50
| | | | | | | | | | 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@
* Fix declaration of S1 by swapping misplaced ',' and ';'.tb2019-10-301-2/+2
| | | | | | | This is inside !(defined(__amd64__) || defined(__i386__)), while the file is only used on those two architectures. "Free commit! No strings attached! No hidden tricks!" from miod
* Implement sicos(3), sincosf(3) and sincosl(3). These functions are commonkettenis2018-03-101-0/+69
| | | | | | | extensions and modern compilers (such as clang) will use them to optimize separate calculations of sine and cosine. ok tom@, patrick@, deraadt@, jmc@
* Nuke whitespace foolish enough to expose itself during the greatkrw2017-01-2114-28/+28
| | | | "warning:" rectification.
* Implement gcc suggestion of extra parentheses. No functional change.krw2017-01-201-2/+2
| | | | ok guenther@
* 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@
* fix a case where ceill() returns 1.0L: in the x86 extended precision formatnaddy2015-08-121-1/+1
| | | | | the fraction part has no implicit bit ok deraadt@
* Make exponents of x and y signed and fix esx and esymartynas2015-07-191-4/+5
| | | | | | | comparisons. The offending input in gfortran's round_4.f90 was nextafterl(0.10000000000000000000135525271560688L, -INFINITY) which caused an ulp addition rather than subtraction. Reported by John Marino @ DragonFlyBSD.
* 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@
* Extended precision floating-point numbers have an explicit integer part bit.kettenis2014-06-051-11/+10
| | | | | | | Correctly account for this bit, otherwise we'll get the wrong result for some inputs. ok martynas@, daniel@
* 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@.
* Trick the compiler that volatile temporary is used while raisingmartynas2013-11-122-0/+8
| | | | the underflow.
* Declare __p1evll and __polevll protos in math_private.h instead ofmartynas2013-11-127-22/+21
| | | | redeclaring each time in ld{80,128}. Pointed out by theo.
* tgamma(+-0) == +-Infkettenis2013-08-051-1/+3
| | | | ok martynas@
* Fix a couple of corner cases in the implementation of pow(3) to make itkettenis2013-08-021-5/+5
| | | | | | | | | | | compatible with C99. Most notably: - 1**y == 1, even if y is NaN - (-1)**+-Inf == 1 and adjust the cephes testsuite to test for the right thing here. ok martynas@
* 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-055-21/+0
| | | | ok guenther millert kettenis
* Make huge constants actually long, so they don't overflow and becomemartynas2011-07-252-26/+26
| | | | infinite.
* - Make constants const.martynas2011-07-206-23/+23
| | | | | | - 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.
* signbitl -> signbit.martynas2011-07-081-2/+2
|
* Finalize work on the math library. It's time to do this monstermartynas2011-07-0627-0/+4358
| | | | | | | | | | | | | | | | | | 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.
* Let this compile with gcc 2.miod2008-12-221-4/+4
|
* - 80-bit and quad precision trigonometric and other mostmartynas2008-12-097-0/+798
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@