summaryrefslogtreecommitdiffstats
path: root/libcxx/include/complex
Commit message (Collapse)AuthorAgeFilesLines
* [NFC][libcxx] Remove trailing whitespaceLouis Dionne2019-05-291-2/+2
| | | | | | It's incredibly annoying when trying to create diffs llvm-svn: 361981
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* Implement the infrastructure for feature-test macros. Very few actual ↵Marshall Clow2018-09-121-0/+1
| | | | | | feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955 llvm-svn: 342073
* [libcxx] Improve accuracy of complex asinh and acoshMikhail Maltsev2018-02-191-3/+14
| | | | | | | | | | | | | | | | | | | | Summary: Currently std::asinh and std::acosh use std::pow to compute x^2. This results in a significant error when computing e.g. asinh(i) or acosh(-1). This patch expresses x^2 directly via x.real() and x.imag(), like it is done in libstdc++/glibc, and adds tests that checks the accuracy. Reviewers: EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D41629 llvm-svn: 325510
* Implement LWG2870: Default value of parameter theta of polar should be dependentMarshall Clow2018-01-311-2/+2
| | | | llvm-svn: 323918
* cmath: Support clang's -fdelayed-template-parsingDuncan P. N. Exon Smith2017-07-071-79/+79
| | | | | | | | | | | r283051 added some functions to cmath (in namespace std) that have the same name as functions in math.h (in the global namespace). Clang's limited support for `-fdelayed-template-parsing` chokes on this. Rename the ones in `cmath` and their uses in `complex` and the test. rdar://problem/32848355 llvm-svn: 307357
* [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VISEric Fiselier2017-01-041-7/+7
| | | | | | | | | | | | | The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both _LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to __attribute__((__type_visibility__)) with Clang. The only remaining difference is that _LIBCPP_TYPE_VIS_ONLY can be applied to templates whereas _LIBCPP_TYPE_VIS cannot (due to dllimport/dllexport not being allowed on templates). This patch renames _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS. llvm-svn: 291035
* Fix unused parameters and variablesEric Fiselier2016-12-231-1/+1
| | | | llvm-svn: 290459
* Use __builtin_isnan/isinf/isfinite in complexHal Finkel2016-10-011-80/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libc-provided isnan/isinf/isfinite macro implementations are specifically designed to function correctly, even in the presence of -ffast-math (or, more specifically, -ffinite-math-only). As such, on most implementation, these either always turn into external function calls (e.g. glibc) or are specifically function calls when FINITE_MATH_ONLY is defined (e.g. Darwin). Our implementation of complex arithmetic makes heavy use of isnan/isinf/isfinite to deal with corner cases involving non-finite quantities. This was problematic in two respects: 1. On systems where these are always function calls (e.g. Linux/glibc), there was a performance penalty 2. When compiling with -ffast-math, there was a significant performance penalty (in fact, on Darwin and systems with similar implementations, the code may in fact be slower than not using -ffast-math, because the inline definitions provided by libc become unavailable to prevent the checks from being optimized out). Eliding these inf/nan checks in -ffast-math mode is consistent with what happens with libstdc++, and in my experience, what users expect. This is critical to getting high-performance code when using complex<T>. This change replaces uses of those functions on basic floating-point types with calls to __builtin_isnan/isinf/isfinite, which Clang will always expand inline. When using -ffast-math (or -ffinite-math-only), the optimizer will remove the checks as expected. Differential Revision: https://reviews.llvm.org/D18639 llvm-svn: 283051
* Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception ↵Marshall Clow2016-08-251-3/+0
| | | | | | type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. llvm-svn: 279744
* Add SFINAE on additional overloads of std::complex functions. Fixes PR19921.Eric Fiselier2016-07-201-145/+60
| | | | | | | | | | The functions arg, conj, imag, norm, proj, and real have additional overloads for arguments of integral or floating point types. However these overloads should not allow conversions to the integral/floating point types, only exact matches. This patch constrains these functions so they no longer allow conversions. llvm-svn: 276067
* Cleanup: move visibility/linkage attributes to the first declaration.Evgeniy Stepanov2016-04-221-6/+12
| | | | | | http://reviews.llvm.org/D15404 llvm-svn: 267093
* Fix for Bug #27193; 'std::acos on complex does not agree with C'. Tests need ↵Marshall Clow2016-04-041-1/+1
| | | | | | work; so the bug will stay open. llvm-svn: 265306
* Implement literal suffixes for compledMarshall Clow2013-10-051-0/+41
| | | | llvm-svn: 192048
* Nico Rieck: this patch series fixes visibility issues on Windows as ↵Howard Hinnant2013-08-121-7/+7
| | | | | | explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>. llvm-svn: 188192
* Implement constexpr (n3302) and fix operator *= and /=Marshall Clow2013-07-311-49/+49
| | | | llvm-svn: 187529
* No functionality change at this time. I've split _LIBCPP_VISIBLE up into ↵Howard Hinnant2013-03-061-7/+7
| | | | | | two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute. llvm-svn: 176593
* Dimitry Andric: Silence some miscellaneous warnings.Howard Hinnant2012-11-061-0/+2
| | | | llvm-svn: 167493
* Add overflow check to tanh(complex) and reduce to finite answer. Fixes ↵Howard Hinnant2012-09-191-1/+5
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=13874 llvm-svn: 164266
* constexpr applied to <complex>.Howard Hinnant2012-07-201-21/+21
| | | | llvm-svn: 160585
* Fix http://llvm.org/bugs/show_bug.cgi?id=11734Howard Hinnant2012-01-101-4/+8
| | | | llvm-svn: 147853
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* _STD -> _VSTD to avoid macro clash on windowsHoward Hinnant2011-06-301-3/+3
| | | | llvm-svn: 134190
* LWG 1522Howard Hinnant2010-11-181-27/+27
| | | | llvm-svn: 119710
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* visibility-decoration.Howard Hinnant2010-09-211-21/+7
| | | | llvm-svn: 114486
* Fixing whitespace problemsHoward Hinnant2010-08-221-71/+71
| | | | llvm-svn: 111750
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-111-1/+1
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-111-0/+1528
llvm-svn: 103490
OpenPOWER on IntegriCloud