aboutsummaryrefslogtreecommitdiff
path: root/lib/msun/man
Commit message (Collapse)AuthorAgeFilesLines
* Fix a few mandoc issuesGordon Bergling2020-10-091-10/+10
| | | | | | | | | | - skipping paragraph macro: Pp after Sh - sections out of conventional order: Sh EXAMPLES - whitespace at end of input line - normalizing date format Notes: svn path=/head/; revision=366583
* Fix typoSergio Carlavilla Delgado2020-04-041-1/+1
| | | | Notes: svn path=/head/; revision=359629
* Note some functions that appeared in First Edition UnixWarner Losh2020-04-013-3/+18
| | | | | | | | | These functions first appeared in the First Edition of Unix (or earlier in the pdp-7 version). Just claim 1st Edition for all this. The pdp-7 code is too fragmented at this point to extend history that far back. Notes: svn path=/head/; revision=359547
* Add HISTORY sections to log(3) man pageSergio Carlavilla Delgado2020-03-261-1/+12
| | | | | | | | | | | PR: 240265 Submitted by: gbergling@gmail.com Approved by: bcr@(mentor), imp@ MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D24148 Notes: svn path=/head/; revision=359326
* Add some HISTORY sections to manpagesSergio Carlavilla Delgado2020-02-191-1/+4
| | | | | | | | | | | | | | | | | environ(7) was in AT&T Version 7 ac(8): Add a HISTORY section sa(8): Add a HISTORY section sqrt(3): Add the actual sqrt function to the HISTORY section Obtained from: OpenBSD Submitted by: gbergling@gmail.com Approved by: bcr@(mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23693 Notes: svn path=/head/; revision=358099
* Introduce <sys/qmath.h>, a fixed-point math library from Netflix.
Edward Tomasz Napierala2019-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to perform mathematical operations
on fractional values without using floating point. It operates on Q numbers, which are integer-sized, opaque structures initialized to hold a chosen number of integer and fractional
bits.
 For a general description of the Q number system, see the "Fixed Point Representation & Fractional Math" whitepaper[1]; for the actual API see the qmath(3) man page. This is one of dependencies for the upcoming stats(3) framework[2] that will be applied to the TCP stack in a later commit. 1. https://www.superkits.net/whitepapers/Fixed%20Point%20Representation%20&%20Fractional%20Math.pdf 2. https://reviews.freebsd.org/D20477 Reviewed by: bcr (man pages, earlier version), sef (earlier version) Discussed with: cem, dteske, imp, lstewart Sponsored By: Klara Inc, Netflix Obtained from: Netflix Differential Revision: https://reviews.freebsd.org/D20116 Notes: svn path=/head/; revision=351544
* csqrt(3): Fix some typos in the manual pageMateusz Piotrowski2018-11-041-2/+2
| | | | | | | | | | Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> Reviewed by: eadler Approved by: krion (mentor, implicit), mat (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D17831 Notes: svn path=/head/; revision=340115
* Recommit r336497: Fix powl, cpow, cpowf, and cpowl imports from OpenBSDDimitry Andric2018-07-201-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to r336299. * lib/msun/Makefile: . Remove polevll.c * lib/msun/ld80/e_powl.c: . Copy contents of polevll.c to here. This is the only consumer of these functions. Make functions 'static inline'. . Make reducl a 'static inline' function. * lib/msun/man/exp.3: . Remove BUGS section that no longer applies. * lib/msun/src/math_private.h: . Remove prototypes of __p1evll() and __polevll() * lib/msun/src/s_cpow.c: * lib/msun/src/s_cpowf.c: * lib/msun/src/s_cpowl.c . Include math_private.h. . Use the CMPLX macro from either C99 or math_private.h (depends on compiler support) instead of the problematic use of complex I. Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> PR: 229876 MFC after: 1 week Notes: svn path=/head/; revision=336563
* Revert r336497 for now, as it breaks on architectures using gcc, with:Dimitry Andric2018-07-191-2/+9
| | | | | | | | | cc1: warnings being treated as errors /usr/src/lib/msun/src/s_cpow.c: In function 'cpow': /usr/src/lib/msun/src/s_cpow.c:63: warning: implicit declaration of function 'CMPLX' Notes: svn path=/head/; revision=336500
* Fix powl, cpow, cpowf, and cpowl imports from OpenBSDDimitry Andric2018-07-191-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to r336299. * lib/msun/Makefile: . Remove polevll.c * lib/msun/ld80/e_powl.c: . Copy contents of polevll.c to here. This is the only consumer of these functions. Make functions 'static inline'. . Make reducl a 'static inline' function. * lib/msun/man/exp.3: . Remove BUGS section that no longer applies. * lib/msun/src/math_private.h: . Remove prototypes of __p1evll() and __polevll() * lib/msun/src/s_cpow.c: * lib/msun/src/s_cpowf.c: * lib/msun/src/s_cpowl.c . Use the CMPLX macro from either C99 or math_private.h (depends of compiler support) instead of the problematic use of complex I. Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> PR: 229876 MFC after: 1 week Notes: svn path=/head/; revision=336497
* msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsdMatt Macy2018-07-152-5/+65
| | | | | | | | | | | | | | | | | | | | | | This corresponds to the latest status (hasn't changed in 9+ years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, cpowl (the complex power functions for float complex, double complex, and long double complex) which are required for C99 compliance and were missing from FreeBSD. Also required for some numerical codes using complex numbered Hamiltonians. Thanks to jhb for tracking down the issue with making weak_reference compile on powerpc. When asked to review, bde said "I don't like it" - but provided no actionable feedback or superior implementations. Discussed with: jhb Submitted by: jmd Differential Revision: https://reviews.freebsd.org/D15919 Notes: svn path=/head/; revision=336299
* clog.3, complex.3: Fix typos and igor style issuesConrad Meyer2018-06-062-14/+12
| | | | | | | | PR: 228783 Reported by: Karsten <freebsd-bugzilla AT kkoenig.net> Notes: svn path=/head/; revision=334721
* Add implementations for clog(3), clogf(3), and clog(3).Konstantin Belousov2018-05-132-4/+109
| | | | | | | | | PR: 216863 Submitted by: bde, Steven G. Kargl <sgk@troutmask.apl.washington.edu> MFC after: 2 weeks Notes: svn path=/head/; revision=333577
* cacos(3): correct spelling of 'I'Eitan Adler2017-12-311-2/+2
| | | | | | | | | | In some cases we had 'i' instead of 'I'. PR: 195517 Submitted by: stephen Notes: svn path=/head/; revision=327400
* Correct r326748, indicating that tgammal(3) is mapped to tgamma(3), notDimitry Andric2017-12-101-1/+1
| | | | | | | | | | to itself. Noticed by: jilles MFC after: 3 days Notes: svn path=/head/; revision=326753
* Document the existence and precision of the remaining long doubleDimitry Andric2017-12-102-6/+29
| | | | | | | | | | | functions for which an imprecise stub implementation was added in r255294, namely powl(3) and tgammal(3). Submitted by: Steve Kargl MFC after: 3 days Notes: svn path=/head/; revision=326748
* Remove the sentence in math(3) about some long double math functions notDimitry Andric2017-12-071-7/+1
| | | | | | | | | | being available. Submitted by: Steve Kargl MFC after: 3 days Notes: svn path=/head/; revision=326669
* Implement sincos, sincosf, and sincosl.Michal Meloun2017-05-281-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary benefit of these functions is that argument reduction is done once instead of twice in independent calls to sin() and cos(). * lib/msun/Makefile: . Add s_sincos[fl].c to the build. . Add sincos.3 documentation. . Add appropriate MLINKS. * lib/msun/Symbol.map: . Expose sincos[fl] symbols in dynamic libm.so. * lib/msun/man/sincos.3: . Documentation for sincos[fl]. * lib/msun/src/k_sincos.h: . Kernel for sincos() function. This merges the individual kernels for sin() and cos(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/k_sincosf.h: . Kernel for sincosf() function. This merges the individual kernels for sinf() and cosf(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/k_sincosl.h: . Kernel for sincosl() function. This merges the individual kernels for sinl() and cosl(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/math.h: . Add prototytpes for sincos[fl](). * lib/msun/src/math_private.h: . Add RETURNV macros. This is needed to reset fpsetprec on I386 hardware for a function with type void. * lib/msun/src/s_sincos.c: . Implementation of sincos() where sin() and cos() were merged into one routine and possibly re-arranged for better performance. * lib/msun/src/s_sincosf.c: . Implementation of sincosf() where sinf() and cosf() were merged into one routine and possibly re-arranged for better performance. * lib/msun/src/s_sincosl.c: . Implementation of sincosl() where sinl() and cosl() were merged into one routine and possibly re-arranged for better performance. PR: 215977, 218300 Submitted by: Steven G. Kargl <sgk@troutmask.apl.washington.edu> MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10765 Notes: svn path=/head/; revision=319047
* Renumber copyright clause 4Warner Losh2017-02-2832-32/+32
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Add documentations related to new APIs of r313761Mahdi Mokhtari2017-02-171-8/+38
| | | | | | | | | | | | PR: 216850 216851 216852 216856 216857 216858 Submitted by: sgk@troutmask.apl.washington.edu Reported by: sgk@troutmask.apl.washington.edu Reviewed by: bde emaste hselasky Approved by: bde emaste hselasky Differential Revision: https://reviews.freebsd.org/D9491 Notes: svn path=/head/; revision=313864
* Bump .DdEnji Cooper2015-11-091-1/+1
| | | | Notes: svn path=/head/; revision=290606
* Document powl(3)Enji Cooper2015-11-091-5/+10
| | | | | | | | PR: 191751 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290605
* .ie is not supposed to be used in manpagesBaptiste Daroussin2015-07-141-6/+2
| | | | | | | Submitted by: carsten.kunze@arcor.de Notes: svn path=/head/; revision=285542
* mdoc: fix function declarationBaptiste Daroussin2015-04-261-2/+2
| | | | Notes: svn path=/head/; revision=282016
* mdoc: remove empty lineBaptiste Daroussin2015-04-261-1/+0
| | | | Notes: svn path=/head/; revision=282015
* Remove end of line whitespaceBaptiste Daroussin2015-04-261-3/+3
| | | | Notes: svn path=/head/; revision=282013
* According to POSIX.1-2008, the Bessel functions of second kindSteve Kargl2015-03-101-25/+20
| | | | | | | | | | | | should raise a divide-by-zero floating point exception for x = +-0 and an invalid floating point exception for x < 0 including x = -Inf. Update the code to raise the exception and update the documentation with hopefully better description of the behavior. Reviewed by: bde (code only) Notes: svn path=/head/; revision=279856
* mdoc: remove EOL whitespace.Joel Dahl2014-12-291-1/+1
| | | | Notes: svn path=/head/; revision=276360
* mdoc: improvements to SEE ALSO.Joel Dahl2014-12-273-3/+3
| | | | Notes: svn path=/head/; revision=276293
* Minor Xr fix.Joel Dahl2014-12-261-1/+1
| | | | Notes: svn path=/head/; revision=276235
* * Makefile:Steve Kargl2014-09-151-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . Hook e_lgammal[_r].c to the build. . Create man page links for lgammal[-r].3. * Symbol.map: . Sort lgammal to its rightful place. . Add FBSD_1.4 section for the new lgamal_r symbol. * ld128/e_lgammal_r.c: . 128-bit implementataion of lgammal_r(). * ld80/e_lgammal_r.c: . Intel 80-bit format implementation of lgammal_r(). * src/e_lgamma.c: . Expose lgammal as a weak reference to lgamma for platforms where long double is mapped to double. * src/e_lgamma_r.c: . Use integer literal constants instead of real literal constants. Let compiler(s) do the job of conversion to the appropriate type. . Expose lgammal_r as a weak reference to lgamma_r for platforms where long double is mapped to double. * src/e_lgammaf_r.c: . Fixed the Cygnus Support conversion of e_lgamma_r.c to float. This includes the generation of new polynomial and rational approximations with fewer terms. For each approximation, include a comment on an estimate of the accuracy over the relevant domain. . Use integer literal constants instead of real literal constants. Let compiler(s) do the job of conversion to the appropriate type. This allows the removal of several explicit casts of double values to float. * src/e_lgammal.c: . Wrapper for lgammal() about lgammal_r(). * src/imprecise.c: . Remove the lgamma. * src/math.h: . Add a prototype for lgammal_r(). * man/lgamma.3: . Document the new functions. Reviewed by: bde Notes: svn path=/head/; revision=271651
* * Makefile:Steve Kargl2014-07-131-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . Add s_erfl.c to building libm. . Add MLINKS for erfl.3 and erfcl.3. * Symbol.map: . Move erfl and erfcl to their proper location. * ld128/s_erfl.c: . Implementations of erfl and erfcl in the IEEE 754 128-bit format. * ld80/s_erfl.c: . Implementations of erfl and erfcl in the Intel 80-bit format. * man/erf.3: . Document the new functions. . While here, remove an incomplete sentence. * src/imprecise.c: . Remove the stupidity of mapping erfl and erfcl to erf and erfc. * src/math.h: . Move the declarations of erfl and erfcl to their proper place. * src/s_erf.c: . For architectures where double and long double are the same floating point format, use weak references to map erfl to erf and ercl to erfc. Reviewed by: bde (many earlier versions) Notes: svn path=/head/; revision=268593
* * msun/man/cosh.3:Steve Kargl2013-12-313-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * msun/man/sinh.3: * msun/man/tanh.3: . Fix grammar. * msun/src/e_coshl.c: * msun/src/e_sinhl.c: . Fix comment. * msun/src/s_tanhl.c: . Remove unused variables. . Fix location/indentation of comments. . Use comparison involving ints instead of long double. . Re-order polynomial evaluation on ld128 for |x| < 0.25. For now, retain the older order in an "#if 0 ... #else" block. . Use int comparison to short-circuit the |x| < 1.5 condition. Requested by: bde Notes: svn path=/head/; revision=260145
* Fix a mismerge of my local doc changes to msun/man/sinh.3.Steve Kargl2013-12-301-2/+4
| | | | Notes: svn path=/head/; revision=260089
* * Makefile:Steve Kargl2013-12-303-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . Hook coshl, sinhl, and tanhl into libm. . Create symbolic links for corresponding manpages. . While here remove a nearby extraneous space. * Symbol.map: * src/math.h: . Move coshl, sinhl, and tanhl to their proper locations. * man/cosh.3: * man/sinh.3: * man/tanh.3: . Update the manpages. * src/e_cosh.c: * src/e_sinh.c: * src/s_tanh.c: . Add weak reference for LBDL_MANT_DIG==53 targets. * src/imprecise.c: . Remove the coshl, sinhl, and tanhl kludge. * src/e_coshl.c: . ld80 and ld128 implementation of coshl(). * src/e_sinhl.c: . ld80 and ld128 implementation of sinhl(). * src/s_tanhl.c: . ld80 and ld128 implementation of tanhl(). Obtained from: bde (mostly), das and kargl Notes: svn path=/head/; revision=260067
* Add implementations of acoshl(), asinhl(), and atanhl(). This is aDavid Schultz2013-06-103-39/+60
| | | | | | | merge of the work done by bde and myself. Notes: svn path=/head/; revision=251599
* ld80 and ld128 implementations of expm1l(). This code started lifeSteve Kargl2013-06-031-3/+7
| | | | | | | | | | | | | | | | | as a fairly faithful implementation of the algorithm found in PTP Tang, "Table-driven implementation of the Expm1 function in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 18, 211-222 (1992). Over the last 18-24 months, the code has under gone significant optimization and testing. Reviewed by: bde Obtained from: bde (most of the optimizations) Notes: svn path=/head/; revision=251343
* Add logl, log2l, log10l, and log1pl.David Schultz2013-06-031-11/+30
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=251292
* I'm happy to finally commit stephen@'s implementations of cacos,David Schultz2013-05-304-13/+137
| | | | | | | | | | | cacosh, casin, casinh, catan, and catanh. Thanks to stephen@ and bde@ for working on these. Submitted by: stephen@ Reviewed by: bde Notes: svn path=/head/; revision=251121
* mdoc: avoid nested displays.Joel Dahl2012-10-141-32/+35
| | | | Notes: svn path=/head/; revision=241545
* Minor mdoc fix.Joel Dahl2012-09-111-5/+5
| | | | Notes: svn path=/head/; revision=240368
* Compute the exponential of x for Intel 80-bit format and IEEE 128-bitSteve Kargl2012-07-231-5/+9
| | | | | | | | | | | | | | | | format. These implementations are based on PTP Tang, "Table-driven implementation of the exponential function in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15, 144-157 (1989). PR: standards/152415 Submitted by: kargl Reviewed by: bde, das Approved by: das (mentor) Notes: svn path=/head/; revision=238722
* General mdoc(7) and typo fixes.Glen Barber2012-05-112-2/+2
| | | | | | | | | PR: 167734 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Notes: svn path=/head/; revision=235286
* mdoc: fix column names, indentation, column separation within each row, andJoel Dahl2012-04-071-7/+7
| | | | | | | | | | quotation. Also make sure we have the same amount of columns in each row as the number of columns we specify in the head arguments. Reviewed by: brueffer Notes: svn path=/head/; revision=233992
* Remove superfluous paragraph macro.Joel Dahl2012-03-251-1/+0
| | | | Notes: svn path=/head/; revision=233462
* Minor corrections and clarifications regarding exceptions.David Schultz2011-10-211-12/+23
| | | | Notes: svn path=/head/; revision=226618
* It's no longer accurate to say that math.h "constitute[s] the C mathDavid Schultz2011-10-171-1/+16
| | | | | | | | | library," since complex.h, tgmath.h, and fenv.h are also part of the math library. Replace the outdated sentence with some references to the other parts. Notes: svn path=/head/; revision=226460
* Add c{cos,sin,tan}{,h}{,f} functions. This is joint work withDavid Schultz2011-10-179-9/+179
| | | | | | | bde and kargl. Notes: svn path=/head/; revision=226458
* - change "is is" to "is" or "it is"Eitan Adler2011-10-161-1/+1
| | | | | | | | | | | - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days Notes: svn path=/head/; revision=226436
* Implement the long double version for the cube root function, cbrtl.Steve Kargl2011-03-122-13/+23
| | | | | | | | | | | The algorithm uses Newton's iterations with a crude estimate of the cube root to converge to a result. Reviewed by: bde Approved by: das Notes: svn path=/head/; revision=219571