|
Boost : |
From: Gero Peterhoff (g.peterhoff_at_[hidden])
Date: 2023-04-11 17:08:50
a) __STDCPP_FLOAT80_T__
With C++23 we get std::floatN_t-types, which are displayed by the macros __STDCPP_FLOATn_T__. However I miss __STDCPP_FLOAT80_T__, which has its justification/relevance. One could retrofit this
#if defined(BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE)
#define __STDCPP_FLOAT80_T__
namespace std
{
using float80_t = boost::float80_t;
}
#endif
Would this be useful/wanted like this?
b) complex-functions
Since C++11 there are the functions abs, asin/h, acos/h, atan/h. These are also defined in boost/math/complex.hpp. But now with 1.82 boost::math is based on C++14, which makes these manual implementations obsolete -> boost/math/complex.hpp can be removed.
c) constexpr
I want to upgrade some functions in boost::math. How should/can I handle constexpr there? My problem is:
- in gcc almost all math functions are constexpr
- otherwise only some math functions with C++23 are constexpr
Now it would be suboptimal not to use constexpr just because it is currently not in the standard.
- If I don't define the additional functions as constexpr or stick strictly to the standard, performance might be wasted, which I don't want.
- Can I simply define the additional functions with constexpr/BOOST_CXX14_CONSTEXPR? In case of an error there will be the standard-error "not constexpr".
d) implementation
In https://www.boost.org/doc/libs/1_82_0_beta1/libs/math/doc/html/math_toolkit/special_tut/special_tut_impl.html you describe how to implement a new math function. Is this still up to date or is it necessary for simple functions? E.g. cot -> 1/tan.
thx
Gero
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk