summaryrefslogtreecommitdiff
path: root/lib/libm
AgeCommit message (Collapse)Author
2009-04-11in the old days compiler could not convert decimal constantsMartynas Venckus
accurately, hence the tricks in libm, using machine representation of constants. remove kludges and switch to use decimal constants, much simplifying the code. since, the compiler converts them accurately. generated values match on vaxfp discussed with millert@, and miod@ testing todd@, and myself ok millert@
2009-04-10lrint, llrint, lrintf, llrintf for amd64. ok kettenis@, oga@Martynas Venckus
2009-04-08missing rcs ids; spacingMartynas Venckus
2009-04-08remove i386/x86_64 ifdefs. i386 lives @ i387. miod@ agreesMartynas Venckus
object code matches so this got to be oki
2009-04-08fix hexadecimal constant that was wrong; and confused with ieee. ok miod@Martynas Venckus
2009-04-05implement and use sqrt, sqrtf & fabsf in hardware; since it'sMartynas Venckus
faster that way. tested by myself. discussed w/ & ok miod@, millert@
2009-04-05const static -> static const; since it's deprecated per C99. ok millert@Martynas Venckus
2009-03-28add C99-conformant nan, nanf, nanl for vax. always return zero,Martynas Venckus
since its fp does not have distinguished values for qnans. tested by naddy@; fixes libnova. ok theo
2008-12-22Let this compile with gcc 2.Miod Vallat
2008-12-12spaceMartynas Venckus
2008-12-12document and mlink long double functions. ok jmc@Martynas Venckus
2008-12-11remove an unneccessary addition to SEE ALSO: all the informationJason McIntyre
is already there; ok martynas
2008-12-10use sys/cdefs.h; pointed out by theoMartynas Venckus
2008-12-09pass CPPFLAGS+= -D__STDC__ for vax, to get the right definitionsMartynas Venckus
from asm.h. discussed w/ millert@
2008-12-09alias fabsl to fabs on these archsMartynas Venckus
2008-12-09- 80-bit and quad precision trigonometric and other mostMartynas Venckus
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@
2008-11-20float math functions: copysignf and logbf. ok millert@Martynas Venckus
2008-10-07- noieee_src: adapt complex versions of the functions it alreadyMartynas Venckus
supports (which is all, except the float ones) ok millert@
2008-09-16remove d_cbrt, dcbrt, d_sqrt. ok millert@Martynas Venckus
2008-09-16typo: is -> if. ok millert@Martynas Venckus
2008-09-16gc unused files, the functions are in libc. ok millert@Martynas Venckus
2008-09-13remove z_abs. ok millert@Martynas Venckus
2008-09-11since these got no ieee-specific code anymore, add fmin, fmax, fdim,Martynas Venckus
fminf, fmaxf, fdimf, fdiml for VAX. looks good to millert@
2008-09-11- make much more readable: don't reimplement isnan, signbit eachMartynas Venckus
time we need them ok millert@
2008-09-09sigh, gamma got lostMartynas Venckus
2008-09-07- replace dtoa w/ David's gdtoa, version 2008-03-15Martynas Venckus
- provide proper dtoa locks - use the real strtof implementation - add strtold, __hdtoa, __hldtoa - add %a/%A support - don't lose precision in printf, don't round to double anymore - implement extended-precision versions of libc functions: fpclassify, isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is fixed - separate vax versions of strtof, and __hdtoa - add complex math support. added functions: cacos, casin, catan, ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp, clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf, casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf, ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf, cimagf, conjf, cprojf, crealf - add fdim, fmax, fmin - add log2. (adapted implementation e_log.c. could be more acruate & faster, but it's good enough for now) - remove wrappers & cruft in libm, supposed to work-around mistakes in SVID, etc.; use ieee versions. fixes issues in python 2.6 for djm@ - make _digittoint static - proper definitions for i386, and amd64 in ieee.h - sh, powerpc don't really have extended-precision - add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h for LDBL_* - merge lead to frac for m{6,8}k, for gdtoa to work properly - add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa to use - add EXT_IMPLICIT_NBIT definition, which indicates implicit normalization bit - add regression tests for libc: fpclassify and printf - arith.h & gd_qnan.h definitions - update ieee.h: hppa doesn't have quad-precision, hppa64 does - add missing prototypes to gdtoaimp - on 64-bit platforms make sure gdtoa doesn't use a long when it really wants an int - etc., what i may have forgotten... - bump libm major, due to removed&changed symbols - no libc bump, since this is riding on djm's libc major crank from a day ago discussed with / requested by / testing theo, sthen@, djm@, jsg@, merdely@, jsing@, tedu@, brad@, jakemsr@, and others. looks good to millert@ parts of the diff ok kettenis@ this commit does not include: - man page changes
2008-08-08revertMartynas Venckus
2008-08-08make _digittoint staticMartynas Venckus
2008-07-30various markup/grammar fixes for previous, and a missing MLINKJason McIntyre
for remquof.3;
2008-07-29add descriptions for fpclassify, isfinite, isnormal, nan, remquo,Martynas Venckus
signbit
2008-07-29- add man pages for nan and remainder, from freebsdMartynas Venckus
- mlink drem, dremf, remainderf to remainder; nanf to nan - describe that drem and dremf are obsolete aliases - remove descriptions for remainder and remainderf from ieee looked over by jmc@, but it's easier for him to work on when they are in tree
2008-07-29describe exp2, exp2f and mlink themMartynas Venckus
2008-07-29remove finite from ieee.3, and unmlink from makefileMartynas Venckus
2008-07-24- remove isinff, isnanf. this has been moved to libcMartynas Venckus
- remove never-enabled signbit. libc has is now - add C99 implementations, from freebsd, for nan(), nanf() (needed to write _digittoint for it), exp2(), exp2f(), remquo(), remquof(), needed STRICT_ASSIGN macro for math_private.h - bump major man pages will follow exp2{,f} has been requested by chl@ ok millert@
2008-07-22remez -> Remes here, too. for consistencyMartynas Venckus
2008-07-21NetBSD's C library supplies these functions -> OpenBSD's C libraryMartynas Venckus
supplies these functions. in comments
2008-07-21rename lround.c lroundf.c llround.c llroundf.c to s_lround.cMartynas Venckus
s_lroundf.c s_llround.c s_llroundf.c, for naming consistency looks fine to millert@
2008-07-20Reme algorithm -> Remes algorithm. in commentsMartynas Venckus
2008-07-20get in the bug fix for pow, from fdlibm 5.3. also adapt it forMartynas Venckus
powf, the float version of it > 1. e_pow.c incorrect results when > x is very close to -1.0 and y is very large, e.g. > pow(-1.0000000000000002e+00,4.5035996273704970e+15) = 0 > pow(-9.9999999999999978e-01,4.5035996273704970e+15) = 0 > Correct results are close to -e and -1/e. while here merge more changes for pow, fixes sign in oflow/uflow cases ok millert@
2008-07-20use more accurate algorithm for tan. from fdlibm 5.3:Martynas Venckus
> 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 ok millert@
2008-07-18fix cases, found by lint:Martynas Venckus
- actually raise inexacts for expm1, and support - __exp__E always returns, because inexact check always succeeds. add NOTREACHED - some cases in lgamma FALLTHROUGH, as intended ok millert@
2008-07-17properly raise inexact; ok millert@Martynas Venckus
2008-07-16some archaic 'n = a(b), c(d)' use that confused lintMartynas Venckus
ok millert@
2008-07-16install infnan.3 only for vax. pointed out by millert@Martynas Venckus
ok millert@
2008-07-16ansify infnan example. sure millert@Martynas Venckus
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-25- expressions such as x != x and x == x are prone to errors andMartynas Venckus
ugly, when we have isnan and isinf - no need to check for _IEEE, when checking for not-a-number - remove some impossible checks - while here, drem->remainder, as drem is just an obsolete alias now ok millert@
2008-06-21cleaning up, no functional changesMartynas Venckus
- no support for National 32000, removing ns32000/national ifdefs maze - remove tahoe defs - ansify looks fine to millert@; who also noticed rint removal
2008-06-16fix some errors found by lint, e.g. declaration w/o types, makeMartynas Venckus
zero const. also do the same fix as was found for ieee's trunc by lint; ok millert@. tested on VAX
2008-06-16- update list of functions. add functions that have been added inMartynas Venckus
the past years, including round, trunc, fmod, tgamma, finite - add missing ulp values - better descriptions for isnan/isinf - sort - remove man page column. we have mlinks so just mention man pages directly "yeah, that's the way to go" jmc@; ok millert@