summaryrefslogtreecommitdiff
path: root/lib/msun/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove intel compiler support from math.hWarner Losh2020-10-241-2/+2
| | | | | | | | | | | The intel compiler support has badly decayed over the years. Stop pretending that we support it. Note, I've stopped short of requiring gcc builtin support with this commit since other compilers may be used to build non-base software and we need to support those so more investigation is needed before simplifying further. Notes: svn path=/head/; revision=367030
* Apply an opimization for the kernels used by cexp(x) and cexpf(x) submittedStefan Eßer2020-09-202-6/+8
| | | | | | | | | | | | | by Steve Kargl: - Use sincos[f] instead of a call to cos[f] and a call to sin[f]. - While here, alphabetize declaration. Submitted by: sgk at troutmask.apl.washington.edu (Steve Kargl) Notes: svn path=/head/; revision=365922
* msun: swap words order instead of bits order on BIG ENDIANAlfredo Dal'Ava Junior2020-03-261-4/+5
| | | | | | | | | | | | | | | | | The "for" loop on big endian was inverting all the bits instead of just the words Issue reported by TestSuite (msun lib nan_test case) Submitted by: Renato Riolino <renato.riolino@eldorado.org.br> Submitted by: Fernando Valle <fernando.valle@eldorado.org.br> Reviewed by: pfg, alfredo Approved by: jhibbits (mentor) Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D23926 Notes: svn path=/head/; revision=359342
* The fdlibm hypot() implementations shouldn't potentially left-shiftDimitry Andric2019-11-262-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | negative numbers (invoking undefined behavior) Summary: Various paths through hypot(x, y) will multiply x and y by a power of two, perform the calculation in a range where IEEE-754 provides greater precision, then undo the multiplication to determine the true result. Undoing that multiplication is implemented as t1*w, where t1=2**k. 2**k is often computed by taking the high word of 1.0, then adding k<<20 (for doubles or long doubles) or k<<23 (for floats) to it, then overwriting that high word. But when k is negative this left-shifts a negative value -- and that's undefined behavior in many editions of C and C++. This patch should fix all hypot implementations to compute 2**k without triggering this particular bit of undefined behavior. Test Plan: I've only very lightly tested out the hypot(double, double) change, in SpiderMonkey's JavaScript engine, for consistency with prior behavior. The other functions' changes have more or less only been eyeballed. Careful examination appreciated! Do note, however, that an error in any of these changes would most likely produce a value that is incorrect by a factor of two, so any mistake would most likely be glaring if invoked. Submitted by: Jeff Walden <jwalden@mit.edu> Obtained from: https://github.com/freebsd/freebsd/pull/414 Reviewed by: dim, lwhsu MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D22354 Notes: svn path=/head/; revision=355120
* Get the fix in back by reverting the part accidentally included in r354491.Li-Wen Hsu2019-11-071-2/+2
| | | | | | | | | | This brings back r354467. MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354520
* libcompat: build 32-bit rtld and ldd as part of "everything"Brooks Davis2019-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alter bsd.compat.mk to set MACHINE and MACHINE_ARCH when included directly so MD paths in Makefiles work. In the process centralize setting them in LIBCOMPATWMAKEENV. Alter .PATH and CFLAGS settings in work when the Makefile is included. While here only support LIB32 on supported platforms rather than always enabling it and requiring users of MK_LIB32 to filter based TARGET/MACHINE_ARCH. The net effect of this change is to make Makefile.libcompat only build compatability libraries. Changes relative to r354449: Correct detection of the compiler type when bsd.compat.mk is used outside Makefile.libcompat. Previously it always matched the clang case. Set LDFLAGS including the linker emulation for mips where -m32 seems to be insufficent. Reviewed by: imp, kib (origional version in r354449) Obtained from: CheriBSD (conceptually) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22251 Notes: svn path=/head/; revision=354491
* Fix declaration of S1 by swapping misplaced ',' and ';'.Brooks Davis2019-11-071-2/+2
| | | | | | | | | Reported by: kargl Obtained from: OpenBSD (tb@openbsd.org) MFC after: 1 week Notes: svn path=/head/; revision=354467
* Revert change accidentally included in r354465.Brooks Davis2019-11-071-2/+2
| | | | | | | Will recommit with a proper commit message shortly. Notes: svn path=/head/; revision=354466
* Revert r354449: libcompat: build 32-bit rtld and ldd as part of "everything"Brooks Davis2019-11-071-2/+2
| | | | | | | Additional testing is required.. Notes: svn path=/head/; revision=354465
* Add __isnan()/__isnanf() aliases for compatibility with glibc and CUDADimitry Andric2019-11-022-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though clang comes with a number of internal CUDA wrapper headers, compiling sample CUDA programs will result in errors similar to: In file included from <built-in>:1: In file included from /usr/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:204: /usr/home/arr/cuda/var/cuda-repo-10-0-local-10.0.130-410.48/usr/local/cuda-10.0//include/crt/math_functions.hpp:2910:7: error: no matching function for call to '__isnan' if (__isnan(a)) { ^~~~~~~ /usr/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function __DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); } ^ CUDA expects __isnan() and __isnanf() declarations to be available, which are glibc specific extensions, equivalent to the regular isnan() and isnanf(). To provide these, define __isnan() and __isnanf() as aliases of the already existing static inline functions __inline_isnan() and __inline_isnanf() from math.h. Reported by: arrowd PR: 241550 MFC after: 1 week Notes: svn path=/head/; revision=354255
* msun: Silence new harmless -Wimplicit-int-float-conversion warningsBrooks Davis2019-10-081-3/+3
| | | | | | | | | | | | | | | | Clang from trunk recently added a warning for when implicit int-to-float conversions cause a loss of precision. The code in question is designed to be able to handle that, so add explicit casts to silence this. Submitted by: James Clarke <jrtc27@jrtc27.com> Reviewed by: dim Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21913 Notes: svn path=/head/; revision=353329
* Do not left-shift a negative number (inducing undefined behavior inDimitry Andric2019-09-254-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C/C++) in exp(3), expf(3), expm1(3) and expm1f(3) during intermediate computations that compute the IEEE-754 bit pattern for |2**k| for integer |k|. The implementations of exp(3), expf(3), expm1(3) and expm1f(3) need to compute IEEE-754 bit patterns for 2**k in certain places. (k is an integer and 2**k is exactly representable in IEEE-754.) Currently they do things like 0x3FF0'0000+(k<<20), which is to say they take the bit pattern representing 1 and then add directly to the exponent field to get the desired power of two. This is fine when k is non-negative. But when k<0 (and certain classes of input trigger this), this left-shifts a negative number -- an operation with undefined behavior in C and C++. The desired semantics can be achieved by instead adding the possibly-negative k to the IEEE-754 exponent bias to get the desired exponent field, _then_ shifting that into its proper overall position. (Note that in case of s_expm1.c and s_expm1f.c, there are SET_HIGH_WORD and SET_FLOAT_WORD uses further down in each of these files that perform shift operations involving k, but by these points k's range has been restricted to 2 < k <= 56, and the shift operations under those circumstances can't do anything that would be UB.) Submitted by: Jeff Walden, https://github.com/jswalden Obtained from: https://github.com/freebsd/freebsd/pull/411 Obtained from: https://github.com/freebsd/freebsd/pull/412 MFC after: 3 days Notes: svn path=/head/; revision=352710
* Replace calls to sin(x) and cos(x) with a single call to sincos().Peter Jeremy2019-02-105-26/+20
| | | | | | | | | | | | Replace calls to sinf(x) and cosf(x) with a single call to sincosf(). Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> Reviewed by: bde Approved by: grog MFC after: 3 days Notes: svn path=/head/; revision=343953
* msun: reduce diff between src/e_j0.c and src/e_j0f.cPedro F. Giffuni2019-01-142-10/+12
| | | | | | | | PR: 229501 MFC after: 1 week Notes: svn path=/head/; revision=343023
* pow(3): Workaround possible signed shift Undefined Behavior.Pedro F. Giffuni2019-01-071-1/+1
| | | | | | | | | | j is int32_t and thus j<<31 is undefined if j==1. Hinted by: muusl-lib (git 688d3da0f1730daddbc954bbc2d27cc96ceee04c) Discussed with: freebsd-numerics (kargl) Notes: svn path=/head/; revision=342851
* msun: Fix some old typos.Pedro F. Giffuni2018-12-311-1/+1
| | | | | | | Seen in a posting from July 27 by "CM Graff" in musl-libc. Notes: svn path=/head/; revision=342651
* libm: Include float.h to get LDBL_MANT_DIGJustin Hibbits2018-12-283-1/+3
| | | | | | | | | | | | | | The long double aliases of double functions are only exposed as aliases if LDBL_MANT_DIG is 53 (same as DBL_MANT_DIG). Without float.h included these files were not exposing weak aliases as expected, leading to link failures if programs use the *l functions. This should fix editors/calligra on targets with 64-bit long double, which uses erfl and erfcl. Found on powerpc64. Reviewed by: kargl@ Notes: svn path=/head/; revision=342563
* In C remquol() and thus also in C remainderl(), don't clobber the sign bitBruce Evans2018-07-241-6/+1
| | | | | | | | | | | | | | | | of NaNs before possible returning a NaN. The remquo*() and remainder*() functions should now give bitwise identical results across arches and implementations, and bitwise consistent results (with lower precisions having truncated mantissas) across precisions. x86 already had consistency across amd64 and i386 and precisions by using the i387 consistently and normally not using the C versions. Inconsistencies for C reqmquol() were first detected on sparc64. Remove double second clearing of the sign bit and extra blank lines. Notes: svn path=/head/; revision=336665
* Fix the conversion to use nan_mix() in r336362. fmod*(x, y),Bruce Evans2018-07-249-16/+23
| | | | | | | | | | | | | | | | | | remainder*(x, y) and remquo*(x, y, quo) were broken for y = 0 by changing multiplication by y to addition of y. (When y is 0, the result should be NaN but became 1 for finite x.) Use a new macro nan_mix_op() to give more control over the mixing, and expand comments. Recent re-testing missed finding this bug since I only tested the macro version on amd64 and i386 and these arches don't use the C versions (they use either asm versions or builtins). Reported by: enh via freebsd-numerics Notes: svn path=/head/; revision=336663
* Recommit r336497: Fix powl, cpow, cpowf, and cpowl imports from OpenBSDDimitry Andric2018-07-205-114/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Centralize the complications for special efficient rounding to integers.Bruce Evans2018-07-203-30/+86
| | | | | | | | | | | | | | | | | | | | | | | | This was open-coded in range reduction for trig and exp functions. Now there are 3 static inline functions rnint[fl]() that replace open-coded expressions, and type-generic irint() and i64rint() macros that hide the complications for efficiently using non-generic irint() and irintl() functions and casts. Special details: ld128/e_rem_pio2l.h needs to use i64rint() since it needs a 46-bit integer result. Everything else only needs a (less than) 32-bit integer result so uses irint(). Float and double cases now use float_t and double_t locally instead of STRICT_ASSIGN() to avoid bugs in extra precision. On amd64, inline asm is now only used for irint() on long doubles. The SSE asm for irint() on amd64 only existed because the ifdef tangles made the correct method of simply casting to int for this case non-obvious. Notes: svn path=/head/; revision=336545
* Revert r336497 for now, as it breaks on architectures using gcc, with:Dimitry Andric2018-07-195-6/+114
| | | | | | | | | 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-195-114/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix spurious and extra underflows and resulting inaccuracies for some casesBruce Evans2018-07-192-10/+10
| | | | | | | | | | | | with 1 huge component and 1 tiny (but nowhere near denormal) component. Rescale earlier so that a scale factor of 2 can be combined with a non- scale divisor of 2, so that the division doesn't shift out a bit. In the usual case where the scale factor is just 1, the division may shift out a bit, but then the underflow is not spurious and the inaccuracies are harder to fix. Notes: svn path=/head/; revision=336488
* Oops, r336412 undid the fix of the overflow threshold in r323003. RestoreBruce Evans2018-07-191-6/+11
| | | | | | | the previous overflow threshold and adjust comments. Notes: svn path=/head/; revision=336484
* Minor cleanups to csqrt*(), mostly in comments.Bruce Evans2018-07-173-36/+14
| | | | | | | | | | | | Remove the STDC CX_LIMITED_RANGE pragma and its verbose comment. We still don't have any C99 compilers (that support fenv pragmas), and if we did then there are thousands of other places in libm that would need to use them more than here. The other cleanups are smaller. Notes: svn path=/head/; revision=336412
* Fix scaling bugs which gave innaccuracies and spurious underflows in csqrt()Bruce Evans2018-07-172-28/+48
| | | | | | | | | | | | | | | | | | | and csqrtl(). When one component is huge and the other is tiny, scaling down the tiny component gave spurious underflow. When both components are denormal, not scaling them up gave inaccuracies of 34+ ulps on not very carefully selected args. Fixing this reduces the maximum error to 1.6 ulps on the same set of args (mosly not denormal ones). The scaling used multiplication of a complex variable by 2, but clang messes this on amd64 up by losing the sign of -0.0. Calculate the components separately, as is well known to be needed for operations on more exceptional values. Notes: svn path=/head/; revision=336400
* Add a macro nan_mix() and use it to get NaN results that are (bitwise)Bruce Evans2018-07-1729-52/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | independent of the precision in most cases. This is mainly to simplify checking for errors. r176266 did this for e_pow[f].c using a less refined expression that often didn't work. r176276 fixes an error in the log message for r176266. The main refinement is to always expand to long double precision. See old log messages (especially these 2) and the comment on the macro for more general details. Specific details: - using nan_mix() consistently for the new and old pow*() functions was the only thing needed to make my consistency test for powl() vs pow() pass on amd64. - catrig[fl].c already had all the refinements, but open-coded. - e_atan2[fl].c, e_fmod[fl].c and s_remquo[fl] only had primitive NaN mixing. - e_hypot[fl].c already had a different refined version of r176266. Refine this further. nan_mix() is not directly usable here since we want to clear the sign bit. - e_remainder[f].c already had an earlier version of r176266. - s_ccosh[f].c,/s_csinh[f].c already had a version equivalent to r176266. Refine this further. nan_mix() is not directly usable here since the expression has to handle some non-NaN cases. - s_csqrt.[fl]: the mixing was special and mostly wrong. Partially fix the special version. - s_ctanh[f].c already had a version of r176266. Notes: svn path=/head/; revision=336362
* msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsdMatt Macy2018-07-157-8/+374
| | | | | | | | | | | | | | | | | | | | | | 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
* Reduce diff between msun/src/e_pow.c and msun/src/e_powf.c.Mark Johnston2018-07-082-8/+14
| | | | | | | | | | | | | Remove unnecessary casts, use integer literal constants instead of floating point constants where possible, and introduce three const static variables to hold 0.5, 0.25, and 1/3. PR: 229420 Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> MFC after: 1 week Notes: svn path=/head/; revision=336090
* Fix whitespace issues in bessel function routines.Mark Johnston2018-07-084-40/+36
| | | | | | | | | PR: 229423 Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> MFC after: 3 days Notes: svn path=/head/; revision=336089
* Add implementations for clog(3), clogf(3), and clog(3).Konstantin Belousov2018-05-134-2/+478
| | | | | | | | | PR: 216863 Submitted by: bde, Steven G. Kargl <sgk@troutmask.apl.washington.edu> MFC after: 2 weeks Notes: svn path=/head/; revision=333577
* msun: signed overflow in atan2Eitan Adler2018-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | As a component of atan2(y, x), the case of x == 1.0 is farmed out to atan(y). The current implementation of this comparison is vulnerable to signed integer underflow (that is, undefined behavior), and it's performed in a somewhat more complicated way than it need be. Change it to not be quite so cute, rather directly comparing the high/low bits of x to the specific IEEE-754 bit pattern that encodes 1.0. Note that while there are three different e_atan* files in the relevant directory, only this one needs fixing. e_atan2f.c already compares against the full bit pattern encoding 1.0f, while e_atan2l.cuses bitwise-ands/ors/nots and so doesn't require a change. Closes #130 Submitted by: Jeff Walden (@jswalden github PR #130) Reviewed by: bde MFC After: 1 month Notes: svn path=/head/; revision=329259
* lib: Fix several typos and minor errorsEitan Adler2017-12-271-1/+1
| | | | | | | | | | | - duplicate words - typos - references to old versions of FreeBSD Reviewed by: imp, benno Notes: svn path=/head/; revision=327232
* lib/msun: remove trailing whitespace from e_pow.cEd Maste2017-12-031-18/+18
| | | | | | | | Submitted by: Steve Kargl MFC after: 1 week Notes: svn path=/head/; revision=326482
* lib: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2667-0/+134
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326219
* lib/msun: avoid referring to broken LDBL_MAXRyan Libby2017-08-293-5/+23
| | | | | | | | | | | | | | | | | LDBL_MAX is broken on i386: https://lists.freebsd.org/pipermail/freebsd-numerics/2012-September/000288.html Gcc has produced +Infinity for LDBL_MAX on i386 and amd64 with -m32 for some time, and newer versions of gcc are now warning that the "floating constant exceeds range of 'long double'". Avoid this by referring to proxy values instead. Reviewed by: bde Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=323003
* Revert r322418, LDBL_MAX_EXP unsuitable for macro pasting on some archesRyan Libby2017-08-123-11/+2
| | | | | | | | | | Either need a different way to spell HALF_LDBL_MAX, or a different way to spell LDBL_MAX_EXP, or a different approach. Reported by: ian Notes: svn path=/head/; revision=322435
* lib/msun: avoid referring to broken LDBL_MAXRyan Libby2017-08-113-2/+11
| | | | | | | | | | | | | | | | | LDBL_MAX is broken on i386: https://lists.freebsd.org/pipermail/freebsd-numerics/2012-September/000288.html Gcc has produced +Infinity for LDBL_MAX on i386 and amd64 with -m32 for some time, and newer versions of gcc are now warning that the "floating constant exceeds range of 'long double'". Avoid this by referring to half the value of LDBL_MAX instead. Reviewed by: bde Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=322418
* Implement sincos, sincosf, and sincosl.Michal Meloun2017-05-288-1/+556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Silence a -Wunused warning about the junk variable being used to raiseDimitry Andric2017-05-133-3/+3
| | | | | | | | | | | | an inexact floating point exception. The variable cannot be eliminated, unfortunately, otherwise the desired addition triggering the exception will be emitted neither by clang, nor by gcc. Reviewed by: Steve Kargl, bde MFC after: 3 days Notes: svn path=/head/; revision=318259
* msun: Remove trailing space in Sunsoft copyright statement.Pedro F. Giffuni2017-04-231-1/+1
| | | | | | | Submittedby: kargl Notes: svn path=/head/; revision=317349
* Fix building of r313761 on platforms thatMahdi Mokhtari2017-02-171-0/+9
| | | | | | | | | | | | | `long double` is alias of `double` (MIPS, etc) PR: 216850 216851 216852 216856 216857 216858 Reported by: emsate Reviewed by: bde emaste hselasky Approved by: bde emaste hselasky Differential Revision: https://reviews.freebsd.org/D9491 Notes: svn path=/head/; revision=313863
* Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msunMahdi Mokhtari2017-02-151-0/+412
| | | | | | | | | | | | | | to improve C11 conformance. PR: 216850 216851 216852 216856 216857 216858 Submitted by: mmokhi Reported by: sgk@troutmask.apl.washington.edu Reviewed by: bde, mat, theraven Approved by: bde (src committer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D9491 Notes: svn path=/head/; revision=313761
* Don't use fmaxl/fminl on platforms with no long double support,Ruslan Bukin2016-10-112-0/+10
| | | | | | | | | | | | | | use fmax/fmin instead. This fixes fmaxmin test failure on MIPS64. Reviewed by: emaste Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D8216 Notes: svn path=/head/; revision=307066
* libm: remove unused variablesEd Maste2016-10-051-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=306709
* libm: remove unused variables for LDBL_MANT_DIG != 113Ed Maste2016-09-303-1/+8
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=306527
* libm: fix some unused variable (rcsid) and dangling else warningsEd Maste2016-09-285-24/+21
| | | | | | | | | | | | s_{fabs,fmax,logb,scalb}{,f,l}.c may be built elsewhere with a higher WARNS setting. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8061 Notes: svn path=/head/; revision=306409
* Fix missing fmodl() on arches with 53-bit long doubles.Bruce Evans2016-09-041-0/+6
| | | | | | | | PR: 199422, 211965 MFC after: 1 week Notes: svn path=/head/; revision=305380
* Fix frexpl() declaration to not include the field name.Edward Tomasz Napierala2016-06-091-1/+1
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=301761