summaryrefslogtreecommitdiffstats
path: root/lib/msun
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a u suffix to the IEEEl2bits unions o_threshold and u_threshold,kargl2013-06-031-4/+7
| | | | | | | and use macros to access the e component of the unions. This allows the portions of the code in ld80 to be identical to the ld128 code. Obtained from: bde
* Introduce the macro LOG2_INTERVAL, which is log2(number of intervals).kargl2013-06-032-2/+5
| | | | | | | Use the macroi as a micro-optimization to convert a subtraction and division to a shift. Obtained from: bde
* Whitespace.kargl2013-06-032-4/+4
|
* * Rename the polynomial coefficients from P2, P3, ... to A2, A3, ....kargl2013-06-032-25/+24
| | | | | | | | | | The names now coincide with the name used in PTP Tang's paper. * Rename the variable from s to tbl to better reflect that this is a table, and to be consistent with the naming scheme in s_exp2l.c Reviewed by: bde (as part of larger diff)
* * Style(9). Start non-Copyright fancy formatted comments with /**.kargl2013-06-031-1/+1
| | | | Reviewed by: bde (as part of larger diff)
* ld80/s_expl.c:kargl2013-06-032-2/+2
| | | | | | | | | | | * Update Copyright years to include 2013. ld128/s_expl.c: * Correct and update Copyright years. This code originated from the ld80 version, so it should reflect the same time period. Reviewed by: bde (as part of larger diff)
* Add logl, log2l, log10l, and log1pl.das2013-06-0311-18/+1809
| | | | Submitted by: bde
* I'm happy to finally commit stephen@'s implementations of cacos,das2013-05-308-15/+1186
| | | | | | | | cacosh, casin, casinh, catan, and catanh. Thanks to stephen@ and bde@ for working on these. Submitted by: stephen@ Reviewed by: bde
* Style(9)kargl2013-05-271-1/+1
| | | | | Approved by: das (implicit) Reported by: jh
* * Update polynomial coefficients.kargl2013-05-271-33/+30
| | | | | | | | * Use ENTERI/RETURNI to allow the use of FP_PE on i386 target. Reviewed by: das (and bde a long time ago) Approved by: das (mentor) Obtained from: bde (polynomial coefficients)
* Fix some regressions caused by the switch from gcc to clang. The fixesdas2013-05-2720-40/+53
| | | | | | | | | | are workarounds for various symptoms of the problem described in clang bugs 3929, 8100, 8241, 10409, and 12958. The regression tests did their job: they failed, someone brought it up on the mailing lists, and then the issue got ignored for 6 months. Oops. There may still be some regressions for functions we don't have test coverage for yet.
* Merge the 386 and amd64 versions of the fenv.h, to make cc -m32kib2013-04-213-286/+164
| | | | | | | compilations which use fenv.h work. Reviewed by: tjil Sponsored by: The FreeBSD Foundation
* Only define isnan, isnanf, __isnan and __isnanf in libc.so, not indim2012-11-101-3/+4
| | | | | | | | | | | libc.a and libc_p.a. In addition, define isnan in libm.a and libm_p.a, but not in libm.so. This makes it possible to statically link executables using both isnan and isnanf with libc and libm. Tested by: kargl MFC after: 1 week
* Fix typo; s/ouput/outputkevlo2012-11-071-1/+1
|
* Revert r241756imp2012-10-221-62/+0
|
* Revert r241755imp2012-10-221-51/+0
|
* Document the method used to compute expf. Taken from exp, withimp2012-10-191-0/+62
| | | | changes to reflect differences in computation between the two.
* Document the methods used to compute logf. Taken and edited from theimp2012-10-191-0/+51
| | | | | double version, with adaptations for the differences between it and the float version.
* mdoc: avoid nested displays.joel2012-10-141-32/+35
|
* * Update the comment that explains the choice of values in thekargl2012-10-131-6/+7
| | | | | | | | | | table and the requirement on trailing zero bits. * Remove the __aligned() compiler directives as these were found to have a negative effect on the produced code. Submitted by: bde Approved by: das (mentor)
* * src/math_private.h:kargl2012-09-292-7/+11
| | | | | | | | | | | | | | | . Change the API for the LD80C by removing the explicit passing of the sign bit. The sign can be determined from the last parameter of the macro. . On i386, load long double by bit manipulations to work around at least a gcc compiler issue. On non-i386 ld80 architectures, use a simple assignment. * ld80/s_expl.c: . Update the only consumer of LD80C. Submitted by: bde Approved by: das (mentor)
* * ld80/s_expl.c:kargl2012-09-232-9/+6
| | | | | | | | | | | | | | | | . Fix the threshold for expl(x) where |x| is small. . Also update the previously incorrect comment to match the new threshold. * ld128/s_expl.c: . Re-order logic in exceptional cases to match the logic used in other long double functions. . Fix the threshold for expl(x) where is |x| is small. . Also update the previously incorrect comment to match the new threshold. Submitted by: bde Approved by: das (mentor)
* Fix whitespace issue.kargl2012-09-231-1/+1
| | | | Approved by: das (mentor, implicit)
* * ld80/s_expl.c:kargl2012-09-232-13/+17
| | | | | | | | | | | | | | | | | . Guard a comment from reformatting by indent(1). . Re-order variables in declarations to alphabetical order. . Remove a banal comment. * ld128/s_expl.c: . Add a comment to point to ld80/s_expl.c for implementation details. . Move the #define of INTERVAL to reduce the diff with ld80/s_expl.c. . twom10000 does not need to be volatile, so move its declaration. . Re-order variables in declarations to alphabetical order. . Add a comment that describes the argument reduction. . Remove the same banal comment found in ld80/s_expl.c. Reviewed by: bde Approved by: das (mentor)
* * Update the lookup table to use 53-bit high and low values.kargl2012-09-231-131/+134
| | | | | | | | | | | | | Also, update the comment to describe the choice of using a high and low decomposition of 2^(i/INTERNVAL) for 0 <= i <= INTERVAL in preparation for an implementation of expm1l. * Move the #define of INTERVAL above the comment, because the comment refers to INTERVAL. Reviewed by: bde Approved by: das (mentor)
* * Use ENTERI() and RETURNI() to toggle the rounding precision ifkargl2012-09-223-6/+21
| | | | | | | | | necessary, so that cosl(), sinl() and tanl() work on i386 even for naive callers. Suggested by: bde Reviewed by: bde Approved by: das (mentor)
* * Make STRICT_ALIGN() work for doubles as well as for floats. Thiskargl2012-09-221-2/+2
| | | | | | | | | | | | | | | only affects i386. The double case was intentionally left broken as an optimization, but we are getting closer to supporting applications and/or kernels that change the (FreeBSD i386) default rounding precision from FP_PD to FP_PE and never change it back, and this requires the STRICT_ALIGN()s that were added to support FP_PE to actually work in all precisions. * Remove an extraneous semicolon at the end of a macro that was supposed to be function-like. Submitted by: bde Approved by: das (mentor)
* Optimise i387 trigonometric functions. Replace "andw 0x400,%ax \ jnz" withtijl2012-09-163-16/+16
| | | | "sahf \ jp", "fprem1" with "fprem" and "fstsw %ax" with "fnstsw %ax".
* Minor mdoc fix.joel2012-09-111-5/+5
|
* Add __always_inline to __ieee754_rem_pio2() and __ieee754_rem_pio2f(),dim2012-08-112-2/+2
| | | | | | | since some older versions of gcc refuse to inline these otherwise. Requested by: bde MFC after: 1 week
* Change a few extern inline functions in libm to static inline, sincedim2012-08-116-28/+23
| | | | | | | | | | | they need to refer to static constants, which C99 does not allow for extern inline functions. While here, change a comment in e_rem_pio2f.c to mention the correct number of bits. Reviewed by: bde MFC after: 1 week
* ieeefp.h is only needed on i386 class hardware.kargl2012-07-301-0/+2
| | | | | Submitted by: bde Approved by: das (pre-approved)
* Whitespace.kargl2012-07-303-4/+3
| | | | | Submitted by: bde Approved by: das (pre-approved)
* Replace the macro name NUM with INTERVALS. This change provideskargl2012-07-262-15/+16
| | | | | | | | | | | compatibility with the INTERVALS macro used in the soon-to-be-commmitted expm1l() and someday-to-be-committed log*l() functions. Add a comment into ld128/s_expl.c noting at gcc issue that was deleted when rewriting ld80/e_expl.c as ld128/s_expl.c. Requested by: bde Approved by: das (mentor)
* * ld80/expl.c:kargl2012-07-262-8/+3
| | | | | | | | | | | | | . Remove a few #ifdefs that should have been removed in the initial commit. . Sort fpmath.h to its rightful place. * ld128/s_expl.c: . Replace EXPMASK with its actual value. . Sort fpmath.h to its rightful place. Requested by: bde Approved by: das (mentor)
* Replace code that toggles between 53 and 64 bits on i386kargl2012-07-261-19/+4
| | | | | | | | class hardware with the ENTERI and RETURNI macros, which are now available in math_private.h. Suggested by: bde Approved by: das (mentor)
* Hook ld80/s_expl.c or ld128/s_expl.c into the building of libm.kargl2012-07-231-1/+1
| | | | | PR: standards/152415 Approved by: das (mentor)
* Compute the exponential of x for Intel 80-bit format and IEEE 128-bitkargl2012-07-237-6/+620
| | | | | | | | | | | | | 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)
* Allow inclusion of libc++ <cmath> to work after including math.htheraven2012-05-271-43/+36
| | | | | | Submitted by: Yamaya Takashi Reviewed by: das MFC after: 1 week
* General mdoc(7) and typo fixes.gjb2012-05-112-2/+2
| | | | | | PR: 167734 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days
* I stopped using my middle name years ago.des2012-04-251-1/+1
|
* mdoc: fix column names, indentation, column separation within each row, andjoel2012-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
* Fix a bug in remquo{,f,l}, in which the quotient didn't always have thedas2012-04-073-5/+8
| | | | | | | | | | | | | | | correct sign when the remainder was 0. Fix a separate bug in remquo alone, in which the remainder and quotient were both off by a bit in certain cases involving subnormal remainders. The bugs affected all platforms except amd64 and i386, on which the routines are implemented in assembly. PR: 166463 Submitted by: Ilya Burylov MFC after: 2 weeks
* Remove superfluous paragraph macro.joel2012-03-251-1/+0
|
* Fix a small nit noted by bde: exp_x should be of type float, not double.das2012-01-201-1/+1
|
* Add a change I missed in r230367 (don't inline arm's fenv.h functions).das2012-01-201-1/+0
|
* Don't inline fenv.h functions on arm for now. Inlining makes sense:das2012-01-203-13/+31
| | | | | | | | the function bodies require only 2 to 10 instructions. However, it leads to application binaries that refer to a private ABI, namely, the softfloat innards in libc. This could complicate future changes in the implementation of the floating-point emulation layer, so it seems best to have programs refer to the official fe* entry points in libm.
* Add an implementation of fenv.h intended for platforms that lack an FPU anddas2012-01-164-6/+205
| | | | | | | use softfloat. Thanks to Ian Lepore for testing and debugging this patch. The fenv regression tests pass (at least for Ian's arm chip) with this change.
* Convert files to UTF-8 and add some copyright markers where missing.uqs2012-01-071-1/+1
|
* Expose the unimplemented libm functions in the math.h header. This allows ↵theraven2011-11-121-13/+13
| | | | | | | C++'s <cmath> to work without the compiler complaining that the C++ versions are calling implicitly-declared functions. You will still get a linker error when they are called. OpenBSD 5.0 claims to fully implement the C99 <math.h> stuff, so might be worth investigating... Reviewed by: das Approved by: dim (mentor)
OpenPOWER on IntegriCloud