[libcxx-commits] [PATCH] D59937: Added implementation of expint (Math Special Functions) in std::experimental.

Andre Brand via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 28 08:32:20 PDT 2019

thebrandre created this revision.
thebrandre created this object with edit policy "Only User: thebrandre (Andre Brand)".
thebrandre added a project: libc++.
Herald added a subscriber: libcxx-commits.

Added implementations of std::expint  as specified in ISO/IEC JTC 1/SC 22/WG 21 N3060 and in the C++17 standard.

The implementation is based on Press, William H., et al. Numerical recipes 3rd edition: The art of scientific computing. Cambridge university press, 2007.

It is tested against the implementations of Visual Studio 2017, boost-1.66, and libstdc++.
Another reference that I check against in the unit tests is the table from Harris, Frank E. "Tables of the exponential integral Ei (x)." Mathematical Tables and Other Aids to Computation 11.57 (1957): 9-16.

There are also tests for analytical bounds for large arguments and arguments close to the singularity.
And we also check the corner cases when +/- infinity or 0 is passed as an argument.

One further note: libstdc++ does not pass all the tests (it produces nan instead of infinity) but Visual Studio 2017 does. boost-1.66 throws overflow errors in these cases.

  rG LLVM Github Monorepo



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59937.192642.patch
Type: text/x-patch
Size: 49147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190328/41a3dcd4/attachment-0001.bin>

More information about the libcxx-commits mailing list