summaryrefslogtreecommitdiff
path: root/lib/libm
AgeCommit message (Collapse)Author
2015-09-14use .Va for global variables, and .Vt where the type is includedIngo Schwarze
2015-08-20Avoid left-shifting a negative integer, which is undefined. ReplaceChristian Weisgerber
it with the intended value, in a defined way. From FreeBSD (Dimitry Andric). ok miod@ deraadt@ kettenis@
2015-08-12fix a case where ceill() returns 1.0L: in the x86 extended precision formatChristian Weisgerber
the fraction part has no implicit bit ok deraadt@
2015-07-19Make exponents of x and y signed and fix esx and esyMartynas Venckus
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.
2015-07-16Adapt previous to extended-precision, and fix single-precision constants.Martynas Venckus
2015-07-16Signs of cacosh/cacoshf were not always correct (e.g., -1.1 -1.1i),Martynas Venckus
as found by fortran regression tests. Also added some complex regression tests for cacosh, casinh, catanh. Reported by John Marino @ DragonFlyBSD.
2015-01-22Fix logic botch causing warnings with Clang. Reported by dhill, matchesMiod Vallat
similar changes in FreeBSD a few years ago.
2015-01-22Possibly uninitialized variable. From Clang via dhill.Miod Vallat
2015-01-20Missing $OpenBSD$'s.Kenneth R Westerback
ok deraadt@
2015-01-15remove .Tn; from Jan Stary <hans at stare dot cz>Ingo Schwarze
2014-09-12Provide a sparc64 version of sqrtl(3) that simply calls _Qp_sqrt.Mark Kettenis
The generic sqrtl(3) is not nearly accurate enough for quad-precision floating point.
2014-07-21Switch from <sys/endian.h> or <machine/endian.h> to the new,Philip Guenther
being-standardized <endian.h> ok deraadt@ millert@ beck@
2014-06-05Extended precision floating-point numbers have an explicit integer part bit.Mark Kettenis
Correctly account for this bit, otherwise we'll get the wrong result for some inputs. ok martynas@, daniel@
2014-06-02Make sure STRICT_ASSIGN handles double as well. From FreeBSD, where theMark Kettenis
commit messages that fixes this says: "it was intentionally left broken as an optimization". right! ok martynas@, daniel@
2014-04-18It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
2014-03-18Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingMiod Vallat
this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
2014-02-11Make floor round to integral value less than x, when x is tiny.Martynas Venckus
Reported by dcoppa@, thanks! OK kettenis@, dcoppa@.
2013-11-22unsigned char casts for ctype macrosTheo de Raadt
ok martynas
2013-11-12Trick the compiler that volatile temporary is used while raisingMartynas Venckus
the underflow.
2013-11-12Declare __p1evll and __polevll protos in math_private.h instead ofMartynas Venckus
redeclaring each time in ld{80,128}. Pointed out by theo.
2013-11-12Add parentheses around comparison in operand of ^. Pointed out by theo.Martynas Venckus
2013-11-12Add explicit braces to avoid ambiguous else. Pointed out by theo.Martynas Venckus
2013-11-03NaN -> \*(NaMartynas Venckus
{infinity, inf} -> \*(If OK jmc@
2013-08-14no longer any need to quote macro lines with >9 args;Jason McIntyre
From: Jan Stary
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
2013-08-07Document lgamma_r, lgammaf_r, and lgammal_r.Todd C. Miller
Prodded by espie@, OK martynas@
2013-08-07simple inaccurate implementation of lrint* functions on vax, just soMarc Espie
we have them. Compiles on vax. okay martynas@
2013-08-06scalbnf on vax, okay miod@Marc Espie
2013-08-05tgamma(+-0) == +-InfMark Kettenis
ok martynas@
2013-08-02Fix a couple of corner cases in the implementation of pow(3) to make itMark Kettenis
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@
2013-07-17more library historyIngo Schwarze
facts checked by sobrado@ style tweaks and ok jmc@
2013-07-15Fix atan2f() and hypotf() by actually converting both their arguments to theMiod Vallat
larger type and passing them both the the double routine.
2013-07-15use some generic code on vax, to do round/roundf/scalbln...Marc Espie
suggested by martynas@ okay miod@ (just rearranges the !vax makefile, no compile change there)
2013-07-15use atan2f to add atanfMarc Espie
okay martynas@
2013-07-15bring reference C code that's not compiled in synch with asm codeMarc Espie
okay martynas@
2013-07-15add some missing asm functions to vax: long double as aliases to double,Marc Espie
and float functions by cvtfd/cvtdf (like in netbsd) scalbnf will have to wait, as it's more complicated... brings vax in line with the rest. okay miod@/martynas@
2013-07-05VAX ELF userland bits. Consists mostly of register prefix additions.Miod Vallat
2013-07-05... and gain rintf by using the same technique, along with aliases forMarc Espie
ceill/floorl okay martynas@, checked for build by miod@ as well. (note that these don't require bumps, as vax has no shared libraries...)
2013-07-05implement floorf and ceilf: same technique as floor and ceil, just withMarc Espie
appropriate constant to the mantissa size (and document what L is along the way). okay martynas@, tested by miod@ for results
2013-07-03reorganize NOIEEE_SRCS so that files not compiled on vax becauseMarc Espie
of assembly version are obvious. Move cproj/cprojf to the PURE club, as the asm support code provides copysignf okay martynas@
2013-07-03with DBL vs LDBL fixed, tedu some source in noieee which is actually theMarc Espie
same as code in generic src. introduce PURE_SRCS for completely MI math code. okau martynas@
2013-07-03test LDBL_MANT_DIG == DBL_MANT_DIG instead of hardcoding 53.Marc Espie
-> test becomes meaningful on vax No actual change, no bump okay martynas@
2013-06-05use fancy .In macro for includes. from Jan Klemkow. ok jmc schwarzeTed Unangst
2013-03-28Switch libc and libm to use strong aliases rather than weak aliasesMartynas Venckus
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@.
2013-02-02Userland bits for m68k/ELF. Mostly addition of register prefixes to theMiod Vallat
assembler instructions, and cope with the few changes in return values location.
2013-01-13Get rid of the very ugly lint workarounds: LINTLIBRARY, PROTOLIB,Martynas Venckus
and a few empty files for lint to chew on.
2013-01-05Switch m88k ports to ELF.Miod Vallat
2012-12-30Provide proper ldexp{f,l} aliases to scalbn{f,l} to match the MI (ld80) code.Miod Vallat
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-09-15m88k does not have the m68k long double type actually (long double == doubleMiod Vallat
on this platform), so don't pretend it does, and don't build long double libm routines.