Summary: | devel/boost-libs and BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Mikhail Teterin <mi> |
Component: | Individual Port(s) | Assignee: | FreeBSD Office Team <office> |
Status: | New --- | ||
Severity: | Affects Only Me | CC: | bapt, danfe, dclarke, pi, powerpc, sbruno |
Priority: | --- | Keywords: | needs-patch, needs-qa |
Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(office) |
Hardware: | Any | ||
OS: | Any | ||
URL: | https://github.com/lballabio/QuantLib/pull/597 |
Description
Mikhail Teterin
2019-03-03 23:23:16 UTC
FreeBSD libm (aka msun) does support long double functions but not everything as required by C99 e.g., tgammal(3) is a stub. Disabling all C99 math is likely to break a number of ports. Similar to bug 193528 the cost of pre-C99-math support was too high. Besides, QuantLib test case works fine on armv6 and armv7 which are also 32-bit architectures. Feel free to request exp-run and find out. Can someone on powerpc (preferably, 32bit) check the following sample? $ cat a.cc // from https://github.com/lballabio/QuantLib/pull/597#issuecomment-466716805 #include <iostream> #include <boost/math/distributions/non_central_chi_squared.hpp> using namespace boost::math; int main() { const double q = 0.3142; std::cout << std::setprecision(16) << quantile( non_central_chi_squared_distribution<double>(3.0,1.0),q) << std::endl; } $ pkg install boost-libs $ c++ a.cc -isystem/usr/local/include $ ./a.out 2.034589723572673 c++ won't work on FreeBSD/powerpc, because it is gcc 4.2.1. I've built fresh devel/boost-libs using g++7, so it goes like this: $ g++7 a.cc -isystem/usr/local/include -Wl,-rpath=/usr/local/lib/gcc7 $ ./a.out 2.034589723572673 This is on Mac mini G4, 32-bit, ~r302710 12.0-CURRENT. (In reply to Alexey Dokuchaev from comment #3) I have 'current' head at the moment here and would have to swap around hard disks and re-install 12-RELEASE to test. hydra# uname -a FreeBSD hydra 13.0-CURRENT FreeBSD 13.0-CURRENT r344744 GENERIC powerpc I'll make up a post-it note todo list for this. ref12-ppc64.freebsd.org does exist and is a jail on real ppc64 hardware if you need to test things (for freebsd.org committers only). Great! Can you guys document its (ppc64 reference box) existence at the https://www.freebsd.org/internal/machines.html page? |