[Boost-bugs] [Boost C++ Libraries] #10219: quantile and quantile-complement for poisson and student-t fail to build on Xcode 5.5.1 + Intel 15 Beta icpc

Subject: [Boost-bugs] [Boost C++ Libraries] #10219: quantile and quantile-complement for poisson and student-t fail to build on Xcode 5.5.1 + Intel 15 Beta icpc
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-20 08:03:31


#10219: quantile and quantile-complement for poisson and student-t fail to build on
Xcode 5.5.1 + Intel 15 Beta icpc
-------------------------------------+-------------------------
 Reporter: HS <tan@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
  Version: Boost Development Trunk | Severity: Showstopper
 Keywords: |
-------------------------------------+-------------------------
 I would probably check with Intel since building with clang++ is fine
 (icl++ is even worst), but thought I check here first to see if anything
 "jumps out" at the author(s).

 The following code (to be saved as main.cpp) fails to build when the
 commmented parts are uncommented one block at a time. The attached file
 qt_builderr.txt is obtained when the student-t quantile block is
 uncommented and qct_builderr.txt is that obtained when the quantile-
 complement for the student-t is uncommented (and etc).

 Note that the non-central t (and a number of others eg. extreme_value,
 logistic, normal and weibull, say) appears fine.

 Thank you.

 HS

 {{{
 // icpc -std=c++11 -o test main.cpp

 #include <cstdlib>
 #include <cstdio>

 #include <algorithm>
 #include <vector>

 #include <boost/math/distributions.hpp>

 // Problem building quantiles.
 void test_t()
 {
    const double _x = 3.8;
    const double _p = 0.3;
    const double _df = 7.0;

    boost::math::students_t_distribution<> _dist( _df );

    std::printf(
          "dt(x=%g;df=%g) = %g\n",
          _x,
          _df,
          boost::math::pdf( _dist, _x ) );

    std::printf(
          "pt(x=%g;df=%g) = %g\n\n",
          _x,
          _df,
          boost::math::cdf( _dist, _x ) );

 // std::printf(
 // "qt(p=%g;df=%g) = %g\n\n",
 // _p,
 // _df,
 // boost::math::quantile( _dist, _p ) );

    std::printf(
          "c-pt(x=%g;df=%g) = %g\n\n",
          _x,
          _df,
          boost::math::cdf( boost::math::complement( _dist, _x ) ) );

 // std::printf(
 // "c-qt(p=%g;df=%g) = %g\n\n",
 // _p,
 // _df,
 // boost::math::quantile( boost::math::complement( _dist, _p ) ) );
 }

 // No problem building and using.
 void test_nt()
 {
    const double _x = 5.3;
    const double _p = 0.3;

    const double _df = 7.0;
    const double _nc = 2.0;

    boost::math::non_central_t_distribution<> _dist( _df, _nc );

    std::printf(
          "dnt(x=%g;df=%g,nc=%g) = %g\n",
          _x,
          _df,
          _nc,
          boost::math::pdf( _dist, _x ) );

    std::printf(
          "pnt(x=%g;df=%g,nc=%g) = %g\n",
          _x,
          _df,
          _nc,
          boost::math::cdf( _dist, _x ) );

    std::printf(
          "qnt(p=%g;df=%g) = %g\n\n",
          _p,
          _df,
          boost::math::quantile( _dist, _p ) );

    std::printf(
          "c-pnt(x=%g;df=%g,nc=%g) = %g\n",
          _x,
          _df,
          _nc,
          boost::math::cdf( boost::math::complement( _dist, _x ) ) );

    std::printf(
          "c-qnt(p=%g;df=%g) = %g\n\n",
          _p,
          _df,
          boost::math::quantile( boost::math::complement( _dist, _p ) ) );
 }

 // Problem building quantiles.
 void test_poisson()
 {
    const double _x = 3.0;
    const double _p = 0.3;
    const double _m = 54.3;

    boost::math::poisson_distribution<> _dist( _m );

    std::printf(
          "dpois(x=%g;mean=%g) = %g\n",
          _x,
          _m,
          boost::math::pdf( _dist, _x ) );

    std::printf(
          "ppois(x=%g;mean=%g) = %g\n\n",
          _x,
          _m,
          boost::math::cdf( _dist, _x ) );

 // std::printf(
 // "qpois(p=%g;mean=%g) = %g\n\n",
 // _p,
 // _m,
 // boost::math::quantile( _dist, _p ) );

    std::printf(
          "c-ppois(x=%g;mean=%g) = %g\n\n",
          _x,
          _m,
          boost::math::cdf( boost::math::complement( _dist, _x ) ) );

 // std::printf(
 // "c-qpois(p=%g;mean=%g) = %g\n\n",
 // _p,
 // _m,
 // boost::math::quantile( boost::math::complement( _dist, _p ) ) );
 }

 int main()
 {
    test_t();
    test_nt();
    test_poisson();

    return EXIT_SUCCESS;
 }
 }}}

 I have attached the error messages

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10219>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC